where is my php.ini ?

tomc

Verified User
Joined
Feb 22, 2006
Messages
25
I have installed directadmin, and everything (including php) seems to be working fine. Its the 64 bit version of directadmin on CentOS 4.2 64 bit.

I have come to update the php.ini file and cant find it ! I have tried updatedb then locate php.ini but there are only 2 results -
/usr/local/directadmin/customapache/php-4.4.2/php.ini-dist
/usr/local/directadmin/customapache/php-4.4.2/php.ini-recommended
and I'm assuming neither of these are the one thats in use. phpinfo says that the path is /usr/local/lib/php.ini however the file isnt there !

When trying to edit php.ini from the directadmin admin panel it gives the error "Unable to read /usr/local/lib/php.ini : Unable to open /usr/local/lib/php.ini for reading<br>"

Any ideas on where it is ? or if this is where its supposed to be ? or should I just add a php.ini file here (I have one from the same version of php & directadmin but on a 32 bit os)

Thanks,

Tom
 
Found this:

# cp /usr/local/directadmin/customapache/php-4.4.2/php.ini-recommended /usr/local/lib/php.ini
 
but surley there must be one in use for php to work? (and php does work), rather than coping the recomended one into where there should already be one.
 
I have now copied the recomended php.ini to where everything is expecting one, and edited it to how I want it. All the changes seem to have taken effect ok so I'm guessing that the directadmin install didnt bother to put a php.ini file there, and php seems to work ok without a php.ini file !
 
The php Makefile should have installed a php.ini file for you. The DA build script calls 'make install' in the php directory, and that will copy a php.ini file if one doesn't already exist. Perhaps there was an error during the build and 'make install' never completed.
 
Installing DA creates /usr/local/lib/php.ini.

Installing Zend renames that to php.ini-zend_optimizer.bak, and creates a link from /usr/local/lib/php.ini to /usr/local/Zend/etc/php.ini.

Jeff
 
Back
Top