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?
Related
I'm running a wordpress/woocommerce website running PHP7 on Windows IIS.
After clicking update plugins, I now get the following error when trying to do anything in the WP dashboard (the actual website still works fine, just not when logged in to WordPress):
Fatal error: require_once(): Failed opening required 'C:\inetpub(dir removed)\wordpress\wp-content\plugins\code-snippets/php/admin-menus/class-manage-menu.php' (include_path='.;C:\php\pear') in C:\inetpub(dir removed)\wordpress\wp-content\plugins\code-snippets\code-snippets.php on line 75
Line 75 of the code snippets file is:
/* Load the class */
require_once $class_path . "class-{$class_file}.php";
I tried the recovery email, but just got the message:
Recovery Mode not initialized.
I can't see that may be wrong - any ideas of next steps to try?
Thanks, Mark
I don't know why - but now the site appears to be working. It's as if WP "fixed itself" after a period of time (approx 30 minutes).
So if you get this error - try leaving it for a little while and see if it resolves itself. If anyone knows why/how it can do this, please say. Thanks, Mark
someone could tell me if there is a reason why I get these PHP errors, which should not exist.
PHP Warning: include (xyz.php): failed to open stream: No such file or directory in /mypath/myfile.php on line 351
When the file clearly exists!
PHP Fatal error: Can not access MyClass::$myproperty in /mypath/MyClass.php on line 250
When the declaration exists:
class MyClass
{
...
public static $myproperty = array();
...
I would like to emphasize that these errors are not always reported! But only once in a while. When I make a mistake writing a part of the code, the PHP fatal error should always occur, not 5 times a day from 12:22 to 12:27 and nevermore. I'm talking about a site from thousands of visits a day, I'm also talking about a .php file that is included on a regular basis in every request of any page.
I can't get any error in my pc (php 5.6 also) when I run and test the web application.
Is it possible some server problem?
Thanks.
We recently started having this problem; really odd.
The error code is:
[15-Nov-2018 13:29:50 UTC] PHP Warning:
require(blasses/class-woocommerce-product-finder-widget.php): failed
to open stream: No such file or directory in
/home/naturesp/public_html/shop/wp-content/plugins/woocommerce-product-finder/woocommerce-product-finder.php
on line 73
The file hasn't been changed, so we assumed it was a caching error - but deactivating and deleting caching plugins led to no change. So we're at a loss.
It happens randomly on different plugins. They are usually the same line within each plugin however, and never more than 2 at once.
It just changes one letter to 'blasses' or 'dlasses' from 'classes' or similar.
If anyone has any idea, would be amazing...
Recently I met a weird error and hope someone can help.
We use LiteSpeed WebServer and Nginx on top, with PHP 7.5 and MySQL 5 (well, WordPress is the framework). It runs well for many days.
Suddenly it goes fatal at this line in different files
include ("class-xxx.php");
The error log says
[02-Oct-2018 13:04:36 UTC] PHP Fatal error: require(): Failed opening required 'dlass-xxx.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /xxx.php on line N
I double checked the code and see that the file name is declared "class-xxx.php", but somehow the server tries to include "dlass-xxx.php", thus it cannot find the file and trigger fatal error.
Solution? I re-upload the file, it works. But then it goes fatal in another file, at similar lines using include.
I notice that the first character in the file name, for example "c", is read incorrectly and shift 1 byte before (or after), so the file name is correct.
Such as
include "class-xxx.php" is parsed/read as "dclass-xxx.php"
include "page-xxx.php" is parsed"read as "opage-xxx.php"
...
this is very strange. Do anybody know the reason? Is it related to any caching/memory management of LiteSpeed or Nginx or PHP 7. ?
It happens on PHP 7. only because if I switch to PHP 5.6, the error does not happen.
Hope someone can help. Thanks a lot.
Today, I started receiving this error for, what I can tell, no reason. This isn't a consistent error. It randomly started today. It was working perfectly yesterday, and for weeks without any error.
All I have in the file is file_get_contents().
I've been using the same code for get_image.php for a while and I have never received this error until now.
Does anyone know why this would be happening randomly and not consistently?
[20/Feb/2015:10:53:53 -0800] "POST /get_image HTTP/1.1" 200 149 - - "website.com" ms=296 cpu_ms=86 cpm_usd=0.000017 pending_ms=160 instance=<string> app_engine_release=1.9.18
W 13:53:53.815 PHP Warning: Cloud Storage Error: UNAUTHORIZED in /base/data/home/runtimes/php/sdk/google/appengine/ext/cloud_storage_streams/CloudStorageReadClient.php on line 310
W 13:53:53.815 PHP Warning: file_get_contents(gs://bucket/image/page_1.png): failed to open stream: "\google\appengine\ext\cloud_storage_streams\CloudStorageStreamWrapper::stream_open" call failed in /base/data/home/apps/..../get_image.php on line 10
EDIT: For anyone looking for updates to this issue, go to this bug report.
Add this to your code as a temporary fix for the time being as per Stuart Langley's post.
apc_delete('_ah_app_identity_:https://www.googleapis.com/auth/devstorage.read_only');
apc_delete('_ah_app_identity_:https://www.googleapis.com/auth/devstorage.read_write');
According to Stuart, the bug has been fixed. You shouldn't randomly receive this error anymore for no reason.