• Resolved Linksbreaker

    (@linksbreaker)


    Hello!

    I am an administrator of a couple of wordpress sites and I have the same problem in all of them related to version 7.1.20 of Worfence, which runs in PHP 7.2 and create an error_log file in each ftp root that contains the following error message :

    “PHP Warning: fopen(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in ../wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/http.php on line 410”

    However, it seems that everything is still working well.

    Any ideas?
    Thanks in advance

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @linksbreaker,

    Can you try editing php.ini and searching for allow_url_fopen.

    It should be set as allow_url_fopen = 1.

    If you don’t have access to php.ini, you will want to ask your host for assistance.

    Dave

    Thread Starter Linksbreaker

    (@linksbreaker)

    Hi @wfdave,

    I understand, but I have a question about setting as “allow_url_fopen = 1”

    Could this adjustment create a security problem related to vulverabilities?
    As I understand, WP does not need to be enabled.

    Could you help understand this topic better?

    Thanks for your time.

    Hi again,

    Wordpress doesn’t need allow_url_fopen, but Wordfence uses it as its main driver to fetch remote files. (/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/http.php)

    Is allow_url_fopen a security concern?

    It is a security risk if you have exploits in your scripts already:
    For example, suppose I have a script that displays information from a text file:

    https://example.com/?display=document.txt

    And the script might look like:

    <?php
    
    echo file_get_contents($_GET['display']);

    A possible exploit would be

    1) Changing document.txt to a remote URL
    2) Changing it to files outside of the directory using ?display=../../../someother_file.txt

    So yes, it does open up some risk, but that is if your script was already lacking in security to start with.

    Dave

    Thread Starter Linksbreaker

    (@linksbreaker)

    Got it! Thanks again, Dave.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Wordfence – fopen warning on PHP 7.2’ is closed to new replies.