Basic server requirements for a typical laravel app
1 . Bitnami Lamp stack for linux or XAMPP fpr windows
2 . Cacert file in the php folder
https://curl.haxx.se/ca/cacert.pem
3 . Add extension=mongodb.so (PHP > 7) or extension=mongo.so (PHP < 7) in php/etc/php.ini file
(Note : PHP ver 7.4.7 or newer doesn't require .so extension)
4 . The below command will download and place the required mongodb php driver for Linux which will build and install mongodb.so file under /php/lib/php/extensions
(Linux)
pecl install mongo (PPH version < 7)
pecl install mongodb (PPH version > 7)
(For windowsm download place it manually in the php extension folder)
https://pecl.php.net/package/mongodb
Run apt-get install autoconf if you haven't installed autoconf module yet then run pecl command again
no acceptable C compiler found in $PATH
sudo apt-get update
sudo apt install build-essential
sudo apt install gcc command to install C Compiler and then run pecl command again
5 . php -m to see the loaded php modules and which should include mongodb
2 . Cacert file in the php folder
https://curl.haxx.se/ca/cacert.pem
3 . Add extension=mongodb.so (PHP > 7) or extension=mongo.so (PHP < 7) in php/etc/php.ini file
(Note : PHP ver 7.4.7 or newer doesn't require .so extension)
4 . The below command will download and place the required mongodb php driver for Linux which will build and install mongodb.so file under /php/lib/php/extensions
(Linux)
pecl install mongo (PPH version < 7)
pecl install mongodb (PPH version > 7)
(For windowsm download place it manually in the php extension folder)
https://pecl.php.net/package/mongodb
Run apt-get install autoconf if you haven't installed autoconf module yet then run pecl command again
no acceptable C compiler found in $PATH
sudo apt-get update
sudo apt install build-essential
sudo apt install gcc command to install C Compiler and then run pecl command again
5 . php -m to see the loaded php modules and which should include mongodb
Comments
Post a Comment