Problem Statement

How to enable allow_url_fopen in cPanel?

Error Message

Severity: Warning
Message: file_load_file(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0
Filename: filename_path/filename.php


Below are the steps to activate "allow_url_fopen" function in php.ini for cPanel.
  1. Login to cPanel hosting account
  2. Search for "Select PHP Version", you can see it below "Software and Services" category.
  3. Select PHP version other than "native" and click "Set as current"
  4. Now, you can see link "Switch To PHP Settings"
  5. Click on "Switch To PHP Settings" and you can set/apply "allow_url_fopen" to 'On'