\[Tue Jan 31 21:43:29.474404 2023\] \[php7:warn\] \[pid 5147\] \[client –snip– PHP Warning: require\_once(zip://#template): failed to open stream: operation failed in /srv/www/snip.com/public\_html/wp-includes/template.php on line 783
\[Tue Jan 31 21:43:29.474578 2023\] \[php7:error\] \[pid 5147\] \[client snip\] PHP Fatal error: require\_once(): Failed opening required ‘zip://#template’ (include\_path=’.:/usr/share/php’) in /srv/www/snip.com/public\_html/wp-includes/template.php on line 783
I’ve got a few sites I run on a vps. This one has caused me great grief today and I’m not sure where to go.. All other sites are normal.
Running php7.4, validated apache/php.ini does include /usr/share/php, php7.4-zip installed
I’m not really sure what I’m looking for. Each server is running fine. Everyone has an assigneduserid, no real special functions in virtualhosts, just some basic rewrites.
Could use a clue. Thanks for the considerations!
[ad_2]
My first guess would be a malware infection of some kind. Have you run a virus scan using a plugin like Wordfence?
Check file permissions in your theme folder. WP is saying it can’t access/read a template file.
What’s the code on line 783? I’d definitely check that, but it does seem to indicate an issue with the zip function. Also, your domain doesn’t have SSL as far as I can tell, so I wonder if there may be a reference in your code somewhere to https that is failing? Nothing like that comes up in the console, though. (But there is a problem with some javascript that isn’t executing in Chrome)
Slap a debug_print_backtrace(true) on 782
Try with another theme.
The php code of the template.php error line has to do with some new WP hooks introduced in version 6.1.0 And your active theme seems to be unable to decode them.