[solved] Where is php.ini?

#1
I compiled PHP Version 5.4.13 from LiteSpeed web interface with the following flags


'--with-mysqli' '--enable-mbstring' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--with-libdir=lib' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-openssl' '--with-png' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--without-sqlite' '--with-xml' '--with-system-tzdata' '--with-mysql' '--with-gd' '--without-odbc' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--enable-libxml' '--with-litespeed' '--with-freetype' '--with-ttf' '--with-jpeg-dir=/usr' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-libxml-dir=/usr' '--with-config-file-scan-dir=/etc/php.d'


My phpinfo says

Configuration File (php.ini) Path /usr/local/lsws/lsphp5/etc

but there is no "etc" under "/usr/local/lsws/lsphp5"

also
memory_limit 128M 128M

but in my /etc/php.ini
the memory_limit is set to 32M. So LiteSpeed php is not using this php.ini

I ran a memory test script got from your forum and infact it fails near 128M. I want to increase it.

Please help me find where is the loaded php.ini is in my CentOs?
 
Last edited by a moderator:
#3
Ok.. I created the folder etc and copied the php.ini.production to this folder [renamed php.ini]

its working good.

I increased the memory_limit to 256M. my site slowed down very bad.. I guess I don't have enough memory. So I put it back to 128M.

Thanks. At least I now have a php.ini to set. ;)
 

webizen

Well-Known Member
#4
You are welcome. You can also designate the path to directory that holds php.ini with compile option '--with-config-file-path=...'
 
Top