user.ini over php.ini

Custom php.ini files are problematic in that they do not simply modify the server-wide php.ini configuration, rather they completely replace it. Additionally, any directives that do not explicitly appear in directory-specific php.ini revert to their factory defaults--something that is almost never desired!

You may want to consider using .user.ini files instead of per-directory php.ini files. User.ini files do _not_ replace the server-wide configuration and instead simply override the variables that appear within the file. More information about these can be found here:
- - - - - - - - - - - - - - - - - - - - - - - - - 
http://php.net/manual/en/configuration.file.per-user.php
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

So, to convert this php.ini file to a .user.ini file, you would need to do the following:

(). Enable .user.ini files server-wide. For example, you could run the following command to add the "user_ini.filename" directive:
- - - - - - - - - - - - - - - - - - - - - - - - - 
echo -e "\n# Enable user-defined php overrides\nuser_ini.filename" >> /usr/local/lib/php.ini
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

(). Rename the user's custom php config file from php.ini to .user.ini:
- - - - - - - - - - - - - - - - - - - - - - - - - 
mv -v /home/panguip2/public_html/php.ini /home/panguip2/public_html/.user.ini
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

That should be sufficient for the user's site to revert to using the server-wide php configuration, but also apply their own overrides.

Cheers

Was this answer helpful?

 Print this Article

Also Read

Migrating Accounts to your server

Most control panels have built in control panel to control panel migration tools that you can...

What are the advantages of a VPS ?

VPS gives you the functions and features and of a managed dedicated server but without the price....

Tips to free disk space on cPanel/WHM Server

Here are a few simple tricks to freeing up disk space on your cPanel server to help maximize your...

What is a VPS?

VPS stands for Virtual Private Servers. VPS is an isolated server that share the hardware of a...

How do I know what server I am on?

You can find out what server you are on using two different ways, each one revealing which server...