Customizing PHP Directives Questions


Well-Known Member
Once again I crash frontally with the documentaciond and WHM / Cpanel.

In your page "How to Customize PHP Directives" with text at bottom, you will find the thing clear. During years use with different EA3 methods according to the server outside DSO, FCGI, SuPHP and all worked.

Now with the new EA4 (and certainly very green in terms of documentation and possibilities) I find it impossible.

Well, according to the doc, I put an .user.ini with the directives
Allow_url_fopen = On
Allow_url_include = On
Even restart the Apache server.

And nothing, when I try to see the contents of a phpinfo () for directory with .user.ini file, I found the global values Off/Off

Try with PHP-FPM activate for site, deactivate.

Whta it's wrong?

The PHP .user.ini file allows you to customize PHP directives on a per-directory basis.

System requirements
  • You must use PHP version 5.3.0 or higher.
  • You cannot use the DSO PHP handler.
Configuration requirements
We recommend that you review the .user.ini PHP documentation before you implement any configuration changes.

User.ini file setup
To set up a user.ini file, perform the following steps:

  1. Log in to your cPanel account.
  2. Navigate to the cPanel's File Manager interface ( Home >> Files >> File Manager ).
  3. Click the Web Root.
  4. Select the Show hidden files checkbox.
  5. Click Go.
  6. Click the target directory.
  7. Click New File.
  8. In the Create a New Field text box, enter .user.ini


    Do not forget to include the period that precedes the file name.

  9. Click Create New File.
  10. Click .user.ini and click Edit.
  11. Enter the PHP directives that you wish to adjust for the directory and click Save.
Last edited by a moderator:


Well-Known Member
User is with PHP 5.6, PHP-FPM

  • IF directive allow_url_open Off in php.ini global for php 5.6 through shell or through editor multiphp ini (/opt/cpanel/ea-php56/root/etc/php.d/local.ini) .user.ini not work (on path there're a info.php for debug). We need put ON for every server.
  • On same .user.ini for testing porpouses, the're are serialize_precision = 200. This work perfectly.


Staff member
Apr 11, 2011

The values within the php-fpm configuration override the ones in global php.ini. You'd have to follow the workaround instructions on the following thread to make changes to the php.ini when using PHP-FPM:

Enabling PHP-FPM in MultiPHP Manager

Thank you.