It is recommended to set always off allow_url_fopen at a global level.
But allow_url_fopen is considered a global PHP configuration value, and thus enabling it on a per-domain basis isn't allowed when it's disabled in the global PHP configuration file.
allow_url_fopen is a value labeled system, and cannot be altered in a local ini file. Since the options set in the MultiPHP Manager through cPanel are local changes, this will not work.
(For a full list of values and their types, see http://php.net/manual/en/ini.list.php )
So, what if a single site need allow_url_fopen enabled ?
Any labeled PHP_INI_SYSTEM cannot be changed by local ini files. The exception to this is that when using the SuPHP handler you can overwrite the "system" ini location to the local files using suPHP_ConfigPath in the .htaccess file.
This can be done by specifying the new system php.ini in the users .htaccess file with a line like the following.
suPHP_ConfigPath /home/$user/php.ini
In order to enable this it's recommended that you set it in WHM for the System INI(Home »Software »MultiPHP Manager).
Since you do not want this change done system-wide, you do have the option of using a custom configuration using a local php.ini after changing the users PHP handler to SuPHP.
This requires a fully formed php.ini and would allow the user access to changing all variables in it.
The best method to start this configuration, would be to copy the php.ini to the local home directory.
cp /opt/cpanel/ea-php56/root/etc/php.ini /home/user/
If you place the php.ini in the public_html, it's recommended securing the file from being accessible with a standard deny entry.
For example:
<Files php.ini>
order allow,deny
deny from all
</Files>
But allow_url_fopen is considered a global PHP configuration value, and thus enabling it on a per-domain basis isn't allowed when it's disabled in the global PHP configuration file.
allow_url_fopen is a value labeled system, and cannot be altered in a local ini file. Since the options set in the MultiPHP Manager through cPanel are local changes, this will not work.
(For a full list of values and their types, see http://php.net/manual/en/ini.list.php )
So, what if a single site need allow_url_fopen enabled ?
Any labeled PHP_INI_SYSTEM cannot be changed by local ini files. The exception to this is that when using the SuPHP handler you can overwrite the "system" ini location to the local files using suPHP_ConfigPath in the .htaccess file.
This can be done by specifying the new system php.ini in the users .htaccess file with a line like the following.
suPHP_ConfigPath /home/$user/php.ini
In order to enable this it's recommended that you set it in WHM for the System INI(Home »Software »MultiPHP Manager).
Since you do not want this change done system-wide, you do have the option of using a custom configuration using a local php.ini after changing the users PHP handler to SuPHP.
This requires a fully formed php.ini and would allow the user access to changing all variables in it.
The best method to start this configuration, would be to copy the php.ini to the local home directory.
cp /opt/cpanel/ea-php56/root/etc/php.ini /home/user/
If you place the php.ini in the public_html, it's recommended securing the file from being accessible with a standard deny entry.
For example:
<Files php.ini>
order allow,deny
deny from all
</Files>