What file should I change the php configuration under ubuntuserver? Php. ini? Or not. Php. ini is located in the etcphp5apache2 Directory, which is the total configuration file of php. However, do not modify this file in ubuntu. The php configuration in ubuntu should be created in the etcphp5conf. d directory. Recently deployed a PHP Web Application
What file should I change the php configuration in ubuntu server? Php. ini? Or not. Php. ini is located in the/etc/php5/apache2/directory. It is the total configuration file of php, but do not modify it in ubuntu. The php configuration in ubuntu should be created in the/etc/php5/conf. d/directory. Recently deployed a php web Application
What file should I change the php configuration in ubuntu server? Php. ini? Or not.
Php. ini is located in the/etc/php5/apache2/directory. It is the total configuration file of php, but do not modify it in ubuntu.
The php configuration in ubuntu should be created in the/etc/php5/conf. d/directory.
I recently deployed a php web application and used mongoDB. The following error occurs after access:
Fatal error: Class 'mongo' not found in/var/www /......
Google knows that this is not caused by installing the mongo driver for php. Therefore, follow the online query results to install the mongo driver.
In the end, add extension = mongo. so to php. ini.
But vi php. after ini, the direct search for extension has any results, so I am wondering that php will never add extension, so I guess it should not be directly in php. configuration in ini (ubuntu is used more often ).
Later, I found the answer on the wiki of the ubuntu Chinese community: http://wiki.ubuntu.org.cn/lamp_server assemblies .e9.85.8d.e7.bd.aephp5.
After entering/etc/php5/conf. d/, I found many configuration files. The configuration files here should be automatically loaded by php. The configuration of mongo. so is simple:
Cd/etc/php5/conf. dsudo vi mongo. ini # Add the following content, save it, and exit # extension = mongo. so
Restart apache2 to solve the problem.
Attach the php method to add the mongoDB driver, from: http://www.iblue.cc/2011/06/mac-os-and ubuntuinstall mongodb-php driver/
# In the http://pecl.php.net/package/mongo select the driver Version you need to download tar zxf mongo-1.2.6.tgzcd mongo-1.2.6phpize # using ing for: # PHP Api Version: 20090626 # Zend Module Api No: 20090626 # Zend Extension Api No: 220090626. /configure -- enable-plugin make install # This way, the mongo php extension is installed, and the php extension is changed. add extension = mongo to the ini file. so
Original article address: Ubuntu server php config and mongodb driver configuration. Thank you for sharing it with me.