Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fatal error: Unknown: Failed opening required

Tags:

php

wordpress

I get this error when trying to access any part of my domain http://localhost/home/avis-communes/ site wordpress, front or back-end. I tried removing the wordfence plugin through ftp and I still get the following error.

Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 Fatal error: Unknown: Failed opening required '/home/avis-communes/wordfence-waf.php' (include_path='.;C:\php\pear') in Unknown on line 0

Any assistance would be appreciated in file .htaccess :

    # BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

# Wordfence WAF
<IfModule mod_php5.c>
    php_value auto_prepend_file '/home/avis-communes/wordfence-waf.php'
</IfModule>
<Files ".user.ini">
<IfModule mod_authz_core.c>
    Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
</IfModule>
</Files>

# END Wordfence WAF
like image 761
Katty Avatar asked Sep 19 '25 20:09

Katty


2 Answers

There are different scenarios. If you are using the WordFence Security plugin, you need to verify the paths in .user.ini, .htaccess, and wordfence-waf.php. In your case, the path needs to be verified is "/home/avis-communes/".

like image 82
Tayyab Chaudhary Avatar answered Sep 22 '25 08:09

Tayyab Chaudhary


It looks like you might somehow have moved or deleted the file specified in the PHP "auto_prepend_file" directive (/home/avis-communes/wordfence-waf.php).

This file is related to the Wordfence Firewall "optimization". At this stage, I suggest you remove the optimization and start over.

like image 31
yaningo Avatar answered Sep 22 '25 10:09

yaningo