• Resolved Daniel

    (@premierdan)


    Hi,
    When I try installing this plugin I get this error in the header:

    Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/DOMAIN.co.uk/httpdocs/wp-content/uploads/sucuri/) is not within the allowed path(s): (/home/USERNAME:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/USERNAME/public_html/wp-content/plugins/sucuri-scanner/sucuri.php on line 6031

    I get an even bigger error when I try deactivating the plugin.

    How can this be fixed?

    Cheers

    https://www.ads-software.com/plugins/sucuri-scanner/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The PHP function “file_exists” can not be silenced so the only solution is to ask your hosting provider why do they configured that server to not allow access to that directory mentioned in the warning.

    The only thing that I could do from the plugin is to hide the warning, I can not fix anything because that error is not caused by a bug in the code, it is caused by a configuration of your server, that is why it shows a warning instead of an error.

    You can also disable the error reporting, which you can do simply setting the “WP_DEBUG” constant to “false”, this is located in the main configuration file “wp-config.php”.

    I silenced the warning messages reported by the plugin for unreadable directories, the new code will be available in the new version of the plugin, but it is worth to mention that this will only hide these warnings because they are not errors. To definitely fix these warnings you will have to contact your hosting provider and ask them to whitelist that directory path to allow PHP to read files stored there.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error Installing Plugin: Warning: file_exists():’ is closed to new replies.