Hi
I have a server with Plesk and Centos 7.
I configured a domain to PHP version 7.4 and wanted to add the mongodb extension to it.
Well I ended up installing the mongodb extension to the server by executing: php -r "phpinfo();" mongo appears on the server
MongoDB support => enabled
MongoDB extension version => 1.12.0
MongoDB extension stability => stable
But not when I run phpinfo on a domain php file or /opt/plesk/php/7.4/bin/php -r "phpinfo();".
I have performed the following actions and they have not worked:
1st
yum install plesk-php74-dev make gcc
apt-get install plesk-php71-dev build-essential
2nd
/opt/plesk/php/7.4/bin/pecl install mongodb
3rd
echo "extension=mongodb.so" > /opt/plesk/php/7.4/etc/php.d/mongo.ini
I also tried:
echo "extension=mongodb.so" > /opt/plesk/php/7.4/etc/php.d/mongodb.ini
echo "extension=mongo.so" > /opt/plesk/php/7.4/etc/php.d/mongo.ini
4th
plesk bin php_handler --reread
5th
/opt/plesk/php/7.4/bin/php -m | grep mongo
answer: mongodb
6th
plesk bin php_settings -u
7th
Whenever I finish some test I execute:
/etc/init.d/nginx restart
service httpd restart
I've even tried going to PHP from Plesk and putting the extension in the .ini, it didn't work either.
When executing my php file it tells me:
Fatal error: Uncaught Error: Class 'MongoDB\Driver\Manager' not found
But it's because I can't add the extension.
Please I need your help, thank you.
I have a server with Plesk and Centos 7.
I configured a domain to PHP version 7.4 and wanted to add the mongodb extension to it.
Well I ended up installing the mongodb extension to the server by executing: php -r "phpinfo();" mongo appears on the server
MongoDB support => enabled
MongoDB extension version => 1.12.0
MongoDB extension stability => stable
But not when I run phpinfo on a domain php file or /opt/plesk/php/7.4/bin/php -r "phpinfo();".
I have performed the following actions and they have not worked:
1st
yum install plesk-php74-dev make gcc
apt-get install plesk-php71-dev build-essential
2nd
/opt/plesk/php/7.4/bin/pecl install mongodb
3rd
echo "extension=mongodb.so" > /opt/plesk/php/7.4/etc/php.d/mongo.ini
I also tried:
echo "extension=mongodb.so" > /opt/plesk/php/7.4/etc/php.d/mongodb.ini
echo "extension=mongo.so" > /opt/plesk/php/7.4/etc/php.d/mongo.ini
4th
plesk bin php_handler --reread
5th
/opt/plesk/php/7.4/bin/php -m | grep mongo
answer: mongodb
6th
plesk bin php_settings -u
7th
Whenever I finish some test I execute:
/etc/init.d/nginx restart
service httpd restart
I've even tried going to PHP from Plesk and putting the extension in the .ini, it didn't work either.
When executing my php file it tells me:
Fatal error: Uncaught Error: Class 'MongoDB\Driver\Manager' not found
But it's because I can't add the extension.
Please I need your help, thank you.