As a cPanel admin, you can enable allow_url_fopen for a specific user by setting it in the MultiPHP INI Editor or the php.ini file for that user’s PHP version. Here’s how:
Method 1: Using MultiPHP INI Editor in WHM
Log into WHM (Web Host Manager).
Go to MultiPHP INI Editor:
In the WHM interface, search for MultiPHP INI Editor.
Select the User’s PHP Version:
Choose the Editor Mode for the specific PHP version that the user’s account is using.
Add or Edit allow_url_fopen:
In the php.ini file that appears, find allow_url_fopen. If it’s not present, add this line:
allow_url_fopen = On
Click Save to apply the change.
This change applies to all accounts using this PHP version on the server. To make the change specific to one user, use Method 2 below.
Method 2: User-Specific INI File in cPanel (PHP.ini or .user.ini)
Access the User’s cPanel:
Log in to the user’s cPanel account (you can access this via WHM).
Open File Manager:
Go to File Manager and navigate to the root directory of the user’s website (often public_html).
Create or Edit .user.ini:
If there isn’t a .user.ini file, create one in the public_html directory.
Add the following line to the file:
allow_url_fopen = On
Save the File.
This will enable allow_url_fopen specifically for that user’s website.