• Resolved slavaman

    (@slavaman)


    [Apr 27 20:51:34:1493315494.476122:1:error] <br /> <b>Warning</b>: tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/XXXXX/data:.) in <b>/var/www/XXXXX/data/www/XXXXX/wp-content/plugins/wordfence/lib/wfConfig.php</b> on
    [Apr 27 20:51:34:1493315494.469250:2:error] Scan can’t continue – stored data not found after a fork. Got type: boolean
    [Apr 27 20:51:34:1493315494.465294:1:error] unlink(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/XXXXX/data:.) (2) File: /var/www/XXXXX/data/www/XXXXX/wp-content/plugins/wordfence/lib/wfConfig.php Line: 432
    [Apr 27 20:51:34:1493315494.455345:1:error] fclose() expects parameter 1 to be resource, boolean given (2) File: /var/www/XXXXX/data/www/XXXXX/wp-content/plugins/wordfence/lib/wfConfig.php Line: 431
    [Apr 27 20:51:34:1493315494.448130:1:error] fread() expects parameter 1 to be resource, boolean given (2) File: /var/www/XXXXX/data/www/XXXXX/wp-content/plugins/wordfence/lib/wfConfig.php Line: 430
    [Apr 27 20:51:34:1493315494.438480:1:error] fseek() expects parameter 1 to be resource, boolean given (2) File: /var/www/XXXXX/data/www/XXXXX/wp-content/plugins/wordfence/lib/wfConfig.php Line: 429
    [Apr 27 20:51:34:1493315494.414174:1:error] fwrite() expects parameter 1 to be resource, boolean given (2) File: /var/www/XXXXX/data/www/XXXXX/wp-content/plugins/wordfence/lib/wfConfig.php Line: 424

    I’ve 3 websites. Plugin correctly work just on 2… Shared hosting, PHP 5.4.16

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter slavaman

    (@slavaman)

    My basedir is – https://prntscr.com/f1kefz

    Hi @slavaman,

    In order to make sure which directory PHP will actually see as /tmp, could you please check with your hosting provider which directory PHP’s open_basedir is set to.

    Wordfence uses sys_get_temp_dir() to get the location of a temporary directory that PHP should be able to write to, which here is giving us /tmp, but the site’s open_basedir in your case prevents us from using that directory.

    Also, could you check with your hosting provider if they can set the site to use a newer version of PHP (version 5.6 or newer); php.ini has a sys_temp_dir option that would let them set a different temp directory, if needed.

    • This reply was modified 7 years, 10 months ago by wfyann. Reason: Spelling
    Thread Starter slavaman

    (@slavaman)

    ISP’s answear was such: The open_basedir restriction does not allow access to files that do not reside outside your home directory. CloudLinux rules also apply this limitation.

    PHP version changed – https://prntscr.com/f25eud

    Scan stopped after lines:
    [Apr 29 10:56:41:1493452601.305342:2:info] Analyzed 800 files containing 31.39 MB of data so far
    Apr 29 10:56:47:1493452607.420245:1:error] tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/XXXXX/data:.) (2) File: /var/www/XXXXX/data/www/XXXXX/wp-content/plugins/wordfence/lib/wfConfig.php Line: 414

    Hi @slavaman,

    Sorry about the delayed response.

    I suggest you ask your hosting provider to either modify the PHP sys_temp_dir parameter so it is compatible with the open_basedir restriction or to add /tmp to PHP’s open_basedir directive.

    Thread Starter slavaman

    (@slavaman)

    Thanks) But I can’t understand why other two websites may scan correctly without any limitation of PHP…

    Hi @slavaman,

    Could it be that the 2 other Wordfence instances are running on environments which have different PHP configurations?

    Maybe there aren’t any open_basedir restrictions there? Or maybe the open_basedir directive has a different value?

    If you check the Wordfence System Info page for each of the 3 Wordfence installations:

    • Go to the Wordfence Tools page
    • Click the Diagnostics tab
    • In the Other Tests section, click the link that reads “Click to view your system’s configuration in a new window”

    …and compare the values associated with the following parameters:

    • Loaded Configuration File
    • PHP Version
    • open_basedir

    Do you see any differences?

    Thread Starter slavaman

    (@slavaman)

    there aren’t any differences

    Hi @slavaman,

    For each of your 3 Wordfence instances (the 2 working fine and the problematic one), could you please:

    • Go to the Wordfence Tools page
    • Click the Diagnostics tab
    • Scroll down to the Send Report by Email section
    • Send the report to yann[at]wordfence[dot]com
    Thread Starter slavaman

    (@slavaman)

    Dear wfyann,

    thanks for help. Wordfence is working properly now. And I don’t know why because nothing was changed))

    Hi @slavaman,

    Thanks for letting us know. I’m glad the issue is now fixed!

    Maybe your hosting provider made some configuration changes. It would be interesting (and enlightening) to check with them.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Scan can’t continue’ is closed to new replies.