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

What is the difference between a VPS and shared hosting?

VPS is an isolated environment with your own resources whereas in a shared hosting environment...

How do I manage my VPS?

VPS hosting accounts come with three control panels. Virtuozzo Power Panel (VZPP), WebHost...

What is a VPS?

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

Howto Register Name Servers

There are many registars in the world with different panels, however we have provided a...

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