Home › Forums › BulletProof Security Pro › Quarantined Theme Error Logs
- This topic has 10 replies, 3 voices, and was last updated 6 years ago by Deb.
-
AuthorPosts
-
Living MiraclesParticipant
Hi,
Since I updated BPS Pro on my WordPress sites on March 16, I’ve started to notice some theme-related error logs getting quarantined. This is happening only on my SiteGround-hosted WordPress sites and on a GoDaddy-hosted Multisite.
Here’s an example of an entry from the Quarantine log on one of the SiteGround-hosted site:
[BPS Pro 12.8: wp-content File Quarantine Logged: March 16, 2017 6:36 pm] Quarantined Filename: php_errorlog Quarantine Path: /home/xxxxxx/mysite.biz/httpdocs/wp-content/bps-backup/quarantine/wp-content/themes/Divi/php_errorlog Restore Path: /home/xxxxxx/mysite.biz/httpdocs/wp-content/themes/Divi/php_errorlog And here's one from the GoDaddy-hosted Multisite: [BPS Pro 12.8: wp-content File Quarantine Logged: March 19, 2017 10:23 pm] Quarantined Filename: error_log Quarantine Path: /home/xxxxxx/public_html/wp-content/bps-backup/quarantine/wp-content/themes/twentyeleven/error_log Restore Path: /home/xxxxxx/public_html/wp-content/themes/twentyeleven/error_log This is an example of the error that's getting noted in the error log on one of the SiteGround-hosted sites: [23-Mar-2017 10:34:33 CST6CDT] PHP Fatal error: Call to undefined function get_header() in /home/xxxxxx/mysite.biz/httpdocs/wp-content/themes/Divi/404.php on line 1 And here's one from the GoDaddy-hosted Multisite: [23-Mar-2017 14:08:21 UTC] PHP Fatal error: Call to undefined function get_template_part() in /home/xxxxxx/public_html/wp-content/themes/itheme2/404.php on line 1
Can you tell what’s going on here? It’s odd that it started on the same day that I updated BPS Pro to the latest version. That’s why I’m posting into your forum, since it seems like the events may be related.
Thank you!
JuttaAITpro AdminKeymasterHmm lots of totally unrelated, but kind of related problems. 😉 To exclude single files or folders see these links below:
AutoRestore|Quarantine steps for creating wp-content folder and single file exclude rules
http://forum.ait-pro.com/forums/topic/autorestore-quarantine-guide-read-me-first/#autorestore-exclude-rulesBulletProof Security Pro AutoRestore|Quarantine Exclude Folders or Files Video Tutorial
https://forum.ait-pro.com/video-tutorials/#autorestore-quarantineNext problem seems to be isolated to this Divi Theme file/code: /home/xxxxxx/mysite.biz/httpdocs/wp-content/themes/Divi/404.php. So what you want to do is either look at the code in that file or just contact the Divi Theme folks for a solution. The final php error is actually a great clue. My guess would be that you messed up some child theme coding stuff. 😉
Living MiraclesParticipantHi, thanks. I’m not sure it’s just Divi theme-related. I have those errors showing up for multiple themes (iTheme2, Twenty Eleven, Divi, Zefir). See:
[23-Mar-2017 14:08:21 UTC] PHP Fatal error: Call to undefined function get_template_part() in /home/iamonenet/public_html/wp-content/themes/itheme2/404.php on line 1 [23-Mar-2017 10:34:33 CST6CDT] PHP Fatal error: Call to undefined function get_header() in /home/miracle6/acim.biz/httpdocs/wp-content/themes/Divi/404.php on line 1 [20-Mar-2017 04:23:35 UTC] PHP Fatal error: Call to undefined function get_header() in /home/iamonenet/public_html/wp-content/themes/twentyeleven/404.php on line 10 [23-Mar-2017 10:34:33 CST6CDT] PHP Fatal error: Call to undefined function get_header() in /home/miracle6/acim.me/public_html/wp-content/themes/wp-zefir/404.php on line 10
We haven’t made any changes to those child themes since the recent BPS Pro update. So, I’m not sure how there could be errors all of a sudden? Also, pretty much all of our WordPress sites (besides the ones I mentioned we have 23 GoDaddy Managed WordPress sites) using the same themes are set up in the same way (in the child theme)—we’re using Divi and iTheme2 on many of our sites—so, I’m not sure why there would be something odd happening with the sites I mentioned, but not with our GoDaddy Managed WordPress sites…. which are usually the ones with problems.
If you have any other thoughts about this, please let me know 🙂
AITpro AdminKeymasterOk well try something simple like uploading modified theme files again and see if the code is ok or not. Sounds like the code itself is the problem in the modified theme files.
Living MiraclesParticipantThanks. Would you mind telling me why you think this has to do with child theme files? None of the errors point to the child themes.
AITpro AdminKeymasterOk send me a login to this site so I can see what is going on.
Living MiraclesParticipantThanks. I appreciate it. What’s the best way of giving you the login information?
AITpro AdminKeymasterEmail the login info to: info at ait-pro dot com.
DebParticipantI’m getting this same thing now on sites running themes 2016 and 2012. The Genesis or Divi or one other supported theme are not doing this. We have no problem plugins, and there’s an article on wordpress about this type of thing.
Call to undefined function get_header() in /qwerty/mysite.com/public_html/wp-content/themes/twentysixteen/index.php on line 17
https://wordpress.org/support/topic/call-to-undefined-function-get_header-12/page/2/
A Moderator ends up after several volley:
4 months, 2 weeks ago
You could do to your theme template files like several core admin files do at the very beginning of the file, placing code like this:// don't load directly if ( !defined('ABSPATH') ) die('Cheatin’ uh?');// don't load directly if ( !defined('ABSPATH') ) die('Cheatin’ uh?');
This will prevent subsequent PHP errors when the file is requested directly. The constant ABSPATH is defined in wp-config.php, which is called for every valid WP request. Not being defined is a sure sign that there was an attempt to bypass loading WP, be it on purpose or by accident. It’ll take a lot less than 3 day, even if you’re not a developer. To be sure, it’s only a stop gap measure, and copying template files to a child theme just for this purpose is questionable.
AITpro AdminKeymaster@ Deb – get_header() is a standard WordPress Core function that should be defined/loaded on page load. Things to check for problems would be your wp-config.php file code: make sure the code is correct and you have not added code below the editable area in the wp-config.php file. You can compare the wp-config-sample.php file code to your wp-config.php file code to check for differences. Another thing to check: caching plugin or CDN’s/Cloudflare/etc. or anything that is making things “static” like a page caching plugin.
DebParticipantThank you once more.
Checked the config.php already – all good.
Will check Cloudflare yet again. -
AuthorPosts
- You must be logged in to reply to this topic.