inversesoft123 Posted August 15, 2009 Share Posted August 15, 2009 Hello, Because of email script installation my php.ini file location is changed. my phpinfo() is showing my loaded ini file location as /home/username/public_html/php.ini Now i want to reload this file back to /usr/local/lib/php.ini How to do this ? please help me I am having root access to server Thanks in Advance, Abhijeet Quote Link to comment https://forums.phpfreaks.com/topic/170362-how-to-resetreload-phpini-file/ Share on other sites More sharing options...
trq Posted August 15, 2009 Share Posted August 15, 2009 What OS? Quote Link to comment https://forums.phpfreaks.com/topic/170362-how-to-resetreload-phpini-file/#findComment-898668 Share on other sites More sharing options...
inversesoft123 Posted August 15, 2009 Author Share Posted August 15, 2009 What OS? its a CENTOS 4.7 i686 Quote Link to comment https://forums.phpfreaks.com/topic/170362-how-to-resetreload-phpini-file/#findComment-898670 Share on other sites More sharing options...
trq Posted August 15, 2009 Share Posted August 15, 2009 Then, as far as I'm aware your ini path is set at compile time. Did you recompile php lately? Quote Link to comment https://forums.phpfreaks.com/topic/170362-how-to-resetreload-phpini-file/#findComment-898671 Share on other sites More sharing options...
inversesoft123 Posted August 15, 2009 Author Share Posted August 15, 2009 Then, as far as I'm aware your ini path is set at compile time. Did you recompile php lately? Not recompiled but moved my sites to another servers recently and then copied back to this server again by cPmove over SSH Quote Link to comment https://forums.phpfreaks.com/topic/170362-how-to-resetreload-phpini-file/#findComment-898673 Share on other sites More sharing options...
inversesoft123 Posted August 15, 2009 Author Share Posted August 15, 2009 Restarted server and reloaded php.ini file at same location and all my problems are now fixed. but is there any way to relaod it back ? Quote Link to comment https://forums.phpfreaks.com/topic/170362-how-to-resetreload-phpini-file/#findComment-898678 Share on other sites More sharing options...
trq Posted August 15, 2009 Share Posted August 15, 2009 As I said, the location of your php.ini file is configured at compilation time. Are using cgi or something? You need to be allot more specific. This also doesn't belong under PHP Coding Help. Quote Link to comment https://forums.phpfreaks.com/topic/170362-how-to-resetreload-phpini-file/#findComment-898680 Share on other sites More sharing options...
inversesoft123 Posted August 15, 2009 Author Share Posted August 15, 2009 As I said, the location of your php.ini file is configured at compilation time. Are using cgi or something? You need to be allot more specific. This also doesn't belong under PHP Coding Help. The email client script which I ware using was based on cgi.. But now I have uninstalled that script.. At the time of installation of that script the installer warned me that this will reload your php.ini Also sory for posting topic here. Quote Link to comment https://forums.phpfreaks.com/topic/170362-how-to-resetreload-phpini-file/#findComment-898682 Share on other sites More sharing options...
PFMaBiSmAd Posted August 15, 2009 Share Posted August 15, 2009 About the only way that a script/installation could alter the location where the php.ini is being read from would be if it placed or had a statement in a .htaccess file. Have you checked the contents of your .htaccess file(s)? Quote Link to comment https://forums.phpfreaks.com/topic/170362-how-to-resetreload-phpini-file/#findComment-898791 Share on other sites More sharing options...
inversesoft123 Posted January 10, 2010 Author Share Posted January 10, 2010 I dig into issue and studied apache documentations and found that suEXEC loads php.ini file from root of every user on server or VPS. if you make any changes in .htaccess regarding file upload limit etc server returns Internal Server Error. This problem can be solved by changing values in php.ini on root of respective user. but now a days newer versions of suphp do not allow changes in php.ini in root unless server administrator permits it from server root. Server administrator can load different ini files per user adding following line inside httpd.conf <VirtualHost IP***> per user like suPHP_ConfigPath /home/username/public_html/[iF ANY:subdomainfolder]/php.ini Hope this information helps others who are dealing with php.ini issue on cpanel/WHM and suphp enabled servers. Quote Link to comment https://forums.phpfreaks.com/topic/170362-how-to-resetreload-phpini-file/#findComment-992166 Share on other sites More sharing options...
inversesoft123 Posted January 10, 2010 Author Share Posted January 10, 2010 I dig into issue and studied apache documentations and found that suEXEC loads php.ini file from root of every user on server or VPS. if you make any changes in .htaccess regarding file upload limit etc server returns Internal Server Error. This problem can be solved by changing values in php.ini on root of respective user. but now a days newer versions of suphp do not allow changes in php.ini in root unless server administrator permits it from server root. Server administrator can load different ini files per user adding following line inside httpd.conf <VirtualHost IP***> per user like suPHP_ConfigPath /home/username/public_html/[iF ANY:subdomainfolder]/php.ini [NOT RECOMMENDED] They should always load php.ini from non public accessible areas. like suPHP_ConfigPath /home/username/php.ini Hope this information helps others who are dealing with php.ini issue on cpanel/WHM and suphp enabled servers. Quote Link to comment https://forums.phpfreaks.com/topic/170362-how-to-resetreload-phpini-file/#findComment-992171 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.