Enabling or disabling PHP's allow_url_fopen
directive through CloudLinux Selector in Plesk is not directly managed by checking a box like other extensions. Instead, allow_url_fopen
is a PHP configuration option that you can modify through the PHP Settings page.
Here’s how you can manage this setting:
Step 1: Log in to Plesk
- Open your Plesk control panel at
https://your-domain.com:8443
(replaceyour-domain.com
with your actual domain or server IP address). - Enter your username and password to log in.
Step 2: Access PHP Settings
- From the Plesk dashboard, navigate to the "Domains" section.
- Find the domain for which you want to enable or disable
allow_url_fopen
and click on it. - In the "Web Hosting" section, click on "PHP Settings".
Step 3: Open CloudLinux PHP Selector
- On the PHP Settings page, you’ll see the "PHP Selector" or "Select PHP Version" section.
- Click on "Select PHP Version" (or similar option) to choose the PHP version for your domain.
Step 4: Modify allow_url_fopen
Setting
-
After selecting the desired PHP version, you will be taken to a list of available PHP extensions and settings for that version.
-
Scroll down to the "Additional Directives" or "Custom PHP Settings" section. This is where you can modify PHP configuration options such as
allow_url_fopen
. -
In the "Additional Directives" box, you can add custom PHP directives.
- To enable
allow_url_fopen
, add the following line:
- To enable
allow_url_fopen = On
- To disable
allow_url_fopen
, add the following line:
allow_url_fopen = Off
Step 5: Apply the Changes
- After modifying the
allow_url_fopen
directive, scroll down and click "OK" or "Apply" to save the changes.
Step 6: Verify the Changes
- To ensure that the change has been applied, you can create a
phpinfo.php
file in the root directory of your domain. - Create a file named
phpinfo.php
and add this code:
phpinfo();