php - Mongo will not load in phpinfo with error_reporting enabled -
php - Mongo will not load in phpinfo with error_reporting enabled -
i have been trying mongo work on php 5.3 apache2 on ubuntu server 12.04 several hours now.
it giving error:
fatal error: class 'mongoclient' not found in /var/www/projects/learn/create.php on line 7
mongo showing in php -m
not in phpinfo()
. after long search tried commenting next in php.ini
:
default value: e_all & ~e_notice
this causes mongo appear in phpinfo()
statement, , $m = new mongoclient()
doesn't throw errors. problem need error reporting turned on (as new developer).
what perchance causing mongo fail load when verbose error reporting enabled?
edit: of possible note turned on error reporting in individual php file , shows errors properly, while still letting mongo load
in probability mongo extension not installed on dev/server setup. first check whether installed. create file called phpinfo.php contents:
run browser. search mongo. see version is. if not nowadays next command line:
sudo pecl install mongo
if have ubuntu desktop sudo gedit /etc/php5/conf.d/mongo.ini
if have ubuntu server sudo vi /etc/php5/conf.d/mongo.ini
insert next line in file: extension=mongo.so
save file. exit. restart apache sudo /etc/init.d/apache2 restart
never straight edit php.ini file loading/unloading extensions in ubuntu. changes in files @ /etc/php5/conf.d/
php apache mongodb ubuntu error-reporting
Comments
Post a Comment