AH01797: client denied by server configuration /wp-includes/theme-compat/embed.php

Hi,

I have this error message in my Apache Error log:
[client 46.105.255.165:34275] AH01797: client denied by server configuration /wp-includes/theme-compat/embed.php

46.105.255.165 is my VPS IP and I added this IP to Defender White List so I don't understand why it keeps happening.

EDIT: I tried disabling "Prevent PHP execution" in Defender but problem is still here

Any idea?
Thanks :slight_smile:

PS: Support Access granted :wink:

  • Hoang Ngo

    Arom77,

    This is from the tweak "Prevent PHP execution", Defender want to check the status of php files protection for alerting admin. This process will auto check each 60 minutes.

    Those error logs is normal and it mean Defender is working, If you want to complete turn off the tweak "Prevent PHP execution", then we have to update the code, please remember that the updated code will be replace with new one each time Defender is update.

    Please update the code in file /wp-content/plugins/wp-defender/app/module/hardener/model/settings.php line 255, you will see a code block like this

    public function getDefinedRules( $init = false ) {
    		return array(
    			Disable_Trackback::$slug   => $init == true ? new Disable_Trackback() : Disable_Trackback::getClassName(),
    			WP_Version::$slug          => $init == true ? new WP_Version() : WP_Version::getClassName(),
    			PHP_Version::$slug         => $init == true ? new PHP_Version() : PHP_Version::getClassName(),
    			Change_Admin::$slug        => $init == true ? new Change_Admin() : Change_Admin::getClassName(),
    			DB_Prefix::$slug           => $init == true ? new DB_Prefix() : DB_Prefix::getClassName(),
    			Disable_File_Editor::$slug => $init == true ? new Disable_File_Editor() : Disable_File_Editor::getClassName(),
    			Hide_Error::$slug          => $init == true ? new Hide_Error() : Hide_Error::getClassName(),
    			Security_Key::$slug        => $init == true ? new Security_Key() : Security_Key::getClassName(),
    			Protect_Information::$slug => $init == true ? new Protect_Information() : Protect_Information::getClassName(),
    			Prevent_Php::$slug         => $init == true ? new Prevent_Php() : Prevent_Php::getClassName(),
    			Login_Duration::$slug      => $init == true ? new Login_Duration() : Login_Duration::getClassName()
    		);
    	}

    Please update to

    public function getDefinedRules( $init = false ) {
    		return array(
    			Disable_Trackback::$slug   => $init == true ? new Disable_Trackback() : Disable_Trackback::getClassName(),
    			WP_Version::$slug          => $init == true ? new WP_Version() : WP_Version::getClassName(),
    			PHP_Version::$slug         => $init == true ? new PHP_Version() : PHP_Version::getClassName(),
    			Change_Admin::$slug        => $init == true ? new Change_Admin() : Change_Admin::getClassName(),
    			DB_Prefix::$slug           => $init == true ? new DB_Prefix() : DB_Prefix::getClassName(),
    			Disable_File_Editor::$slug => $init == true ? new Disable_File_Editor() : Disable_File_Editor::getClassName(),
    			Hide_Error::$slug          => $init == true ? new Hide_Error() : Hide_Error::getClassName(),
    			Security_Key::$slug        => $init == true ? new Security_Key() : Security_Key::getClassName(),
    			Protect_Information::$slug => $init == true ? new Protect_Information() : Protect_Information::getClassName(),
    			//Prevent_Php::$slug         => $init == true ? new Prevent_Php() : Prevent_Php::getClassName(),
    			Login_Duration::$slug      => $init == true ? new Login_Duration() : Login_Duration::getClassName()
    		);
    	}

    Best regards,
    Hoang