2

Yesterday I noticed a strange issue with my WordPress website. An uptime monitor reported a 500 error. The logs contained the following error:

PHP Fatal error: require_once(): Failed opening required '/var/www/vhosts/domain.tld/httpdocs/wp-admin/includes/plugin-php' (include_path='.:/opt/plesk/php/7.1/share/pear') in /var/www/vhosts/domain.tld/httpdocs/wp-content/plugins/wp-security-audit-log/sdk/freemius/start.php on line 169

Indeed, the file wp-admin/includes/plugin-php does not exist. But the strange thing is that line 169 from that file does not contain plugin-php at all. Line 169 from wp-content/plugins/wp-security-audit-log/sdk/freemius/start.php:

            require_once ABSPATH . 'wp-admin/includes/plugin.php';

The uptime monitor noticed the 500 status at 14:52 and reported the website to be back online at 14:58. The error log confirms this is the only time window where this error was reported. start.php file has not been edited since installation fo the plugin at June 15th, which is also the last modified datetime in the FTP.

I've never seen this happening before. What can possibly cause this to happen?

redelschaap
  • 2,774
  • 2
  • 19
  • 32
  • Something (e.g. another plugin) may have redefined the ABSPATH constant. – IVO GELOV Jul 10 '18 at 07:07
  • Since it is a security plugin, could it have overridden `require_once` (maybe using override_function) and that the error occurs in that code? Just a wild guess, it's a very strange error... But it may be worth looking I to. – becquerel Jul 10 '18 at 07:08
  • Thanks for your replies! The `ABSPATH` constant is not the problem here, since the `/var/www/vhosts/domain.tld/httpdocs/` part looks fine. The `require_once` function cannot be overriden since it's not really a function. – redelschaap Jul 10 '18 at 07:11
  • True that. What if you add another require_once for a different file just above the one that fails. Is the behaviour the same? Even testing illogical things like wrapping it in parenthesis, using " instead of ', including a file in the same directory (skipping ABSPATH and the full path of the file)... – becquerel Jul 10 '18 at 08:18
  • Or, far fetched again.... if the webserver have a custom handler that for some reason would replace the filename before being passed to the real PHP file handler. – becquerel Jul 10 '18 at 08:26

0 Answers0