Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/170362-how-to-resetreload-phpini-file/
Share on other sites

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

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.

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)?

  • 4 months later...

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.    8)

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.    8)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.