Skip to content

Instantly share code, notes, and snippets.

@nmvuong92
Last active September 5, 2018 08:59
Show Gist options
  • Save nmvuong92/046b97d7394a251fb781b322db3cca61 to your computer and use it in GitHub Desktop.
Save nmvuong92/046b97d7394a251fb781b322db3cca61 to your computer and use it in GitHub Desktop.

MongoDB

Bước 1: tải đúng file

cmd > php -v

PHP 7.1.19 (cli) (built: Jun 20 2018 23:37:55) ( ZTS MSVC14 (Visual C++ 2015) x86 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies

Ví dụ ở trên MSVC14 => phải tải cùng phiên bản Visual c++ về sau đó giải nén copy file php_mongodb.dll vào thư mục C:\xampp\php\ext

Địa chỉ download: https://windows.php.net/downloadS/pecl/releases/mongodb/1.5.2/ Ví dụ cho trường hợp trên:

php_mongodb-1.5.2-7.1-ts-vc14-x86.zip

Bước 2: setting file php.ini

Thêm dòng code dưới vào file php.ini sau đó reset xampp

extension=php_mongodb.dll

check

vào http://localhost/dashboard/phpinfo.php phpinfo kiểm tra có mongodb là thành công

Redis

1. redis server

https://github.com/rgl/redis/downloads download redis server và start nó ở services

2. php_redis.dll

download php_redis.dll https://windows.php.net/downloads/pecl/releases/redis/3.1.1rc2/ và làm tương tự mongo extension=php_redis.dll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment