Re: php.ini doesn't get loaded
| From: | Keith Roberts | Date: | Fri, 06 Jul 2007 17:52:34 +0000 |
| Subject: | Re: php.ini doesn't get loaded | ||
| References: | 1 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-18113@lists.php.net to get a copy of this message | ||
On Fri, 6 Jul 2007, php@fernandomarcelo.com wrote:
To: php-install@lists.php.net From: php@fernandomarcelo.com Subject: [PHP-INSTALL] php.ini doesn't get loaded Hello, I'm trying to compile PHP 5.2.3 on CentOS with the following configure: './configure' '--prefix=/usr/local/php' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--without-pear' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--with-zlib' '--with-apxs2=/usr/sbin/apxs'; Everything is compiled and installed correctely. I can run php scripts normally. But i need to change display_errors = on and install eaccelerator. So i created a page with phpinfo() to find out where is php.ini. I got this Configuration File (php.ini) Path /usr/local/php/lib Loaded Configuration File (none) It seens like php.ini is not being loaded. What can i do?You have told configure to install php in: {$prefix}/lib So, the default location for your php.ini when you compile from source code is: /usr/local/php/lib as mentioned in the above line:
So, instead of putting php.ini in /etc/ folder, you need to move it to /usr/local/php/lib/ - then php will be able to find it and use it. Also, if you do decide to use PEAR modules, then the default installation for those will be under: {$prefix}/lib/php Most other stuff is put under the {$prefix}/lib subdirectory as well, including php dynamically loaded extension modules, when you compile php from source code. Kind Regards Keith Roberts ------------------------------------------------------------ http://www.karsites.net http://www.raised-from-the-dead.org.uk This email address is challenge-response protected with http://www.tmda.net ------------------------------------------------------------Configuration File (php.ini) Path /usr/local/php/lib