Hello,
I’m having a lot of PHP erros in my log. Most of it seems to be coming from the theme. Just to name a few:
[Mon Nov 16 03:37:11.151423 2015] [:error] [pid 29173] [client 66.249.69.69:27923] PHP Fatal error: Call to undefined function get_header() in /nas/wp/www/cluster-41332/mysite/wp-content/themes/Newsmag/index.php on line 6
[Mon Nov 16 04:53:26.424720 2015] [:error] [pid 29176] [client 173.255.198.194:43387] PHP Warning: Invalid argument supplied for foreach() in /nas/wp/www/cluster-41332/mysite/wp-includes/functions.php on line 515
[Mon Nov 16 04:53:26.424800 2015] [:error] [pid 29176] [client 173.255.198.194:43387] PHP Warning: in_array() expects parameter 2 to be array, string given in /nas/wp/www/cluster-41332/mysite/wp-includes/functions.php on line 524
[Mon Nov 16 04:56:01.964486 2015] [:error] [pid 29179] [client 74.59.211.106:19727] PHP Warning: Invalid argument supplied for foreach() in /nas/wp/www/cluster-41332/mysite/wp-content/themes/Newsmag/includes/wp_booster/aurora/tdx_options.php on line 116, referer: http://mysite.com/wp-admin/admin.php?page=td_theme_panel
I’m currently hosted with WPEngine.
How badly does it affect my site? And how can it be solved?
Thanks.
Hi
Please make sure that you installed/updated the theme according with our documentation: https://forum.tagdiv.com/newsmag-install-via-ftp/ – https://forum.tagdiv.com/newsmag-how-to-update-the-theme/
Also check in browser’s console if there are some errors, deactivate all plugins except Visual Composer, clear all caches, deactivate the child theme if you’re using and test again.
Let me know how it goes.
Thanks!
Hi Andrei,
I updated the theme to its latest version. It’s better but I’m still getting errors. I know my host works differently from other hosts and sometimes there are php errors even though their minor.
[Tue Nov 17 06:54:13.832421 2015] [:error] [pid 7714] [client 173.255.198.194:37051] PHP Warning: Invalid argument supplied for foreach() in /nas/wp/www/cluster-41332/dailyhp/wp-includes/functions.php on line 515
[Tue Nov 17 06:54:13.832512 2015] [:error] [pid 7714] [client 173.255.198.194:37051] PHP Warning: in_array() expects parameter 2 to be array, string given in /nas/wp/www/cluster-41332/dailyhp/wp-includes/functions.php on line 524
[Tue Nov 17 06:54:14.161822 2015] [:error] [pid 7714] [client 173.255.198.194:37051] PHP Warning: Invalid argument supplied for foreach() in /nas/wp/www/cluster-41332/dailyhp/wp-includes/functions.php on line 515
[Tue Nov 17 06:54:14.161933 2015] [:error] [pid 7714] [client 173.255.198.194:37051] PHP Warning: in_array() expects parameter 2 to be array, string given in /nas/wp/www/cluster-41332/dailyhp/wp-includes/functions.php on line 524
[Tue Nov 17 06:55:29.028812 2015] [:error] [pid 7714] [client 173.255.198.194:37247] PHP Warning: Invalid argument supplied for foreach() in /nas/wp/www/cluster-41332/dailyhp/wp-includes/functions.php on line 515
[Tue Nov 17 06:55:29.028893 2015] [:error] [pid 7714] [client 173.255.198.194:37247] PHP Warning: in_array() expects parameter 2 to be array, string given in /nas/wp/www/cluster-41332/dailyhp/wp-includes/functions.php on line 524
[Tue Nov 17 06:57:37.933117 2015] [:error] [pid 7718] [client 173.255.198.194:37525] PHP Warning: Invalid argument supplied for foreach() in /nas/wp/www/cluster-41332/dailyhp/wp-includes/functions.php on line 515
[Tue Nov 17 06:57:37.933203 2015] [:error] [pid 7718] [client 173.255.198.194:37525] PHP Warning: in_array() expects parameter 2 to be array, string given in /nas/wp/www/cluster-41332/dailyhp/wp-includes/functions.php on line 524
[Tue Nov 17 08:25:39.461467 2015] [:error] [pid 21992] [client 66.249.69.69:46868] PHP Fatal error: Call to undefined function get_header() in /nas/wp/www/cluster-41332/dailyhp/wp-content/themes/Newsmag/index.php on line 6
[Tue Nov 17 23:12:29.474414 2015] [:error] [pid 27828] [client 66.249.69.69:39472] PHP Fatal error: Call to undefined function get_header() in /nas/wp/www/cluster-41332/dailyhp/wp-content/themes/Newsmag/index.php on line 6
Only the last two errors seem to be from the theme. Since the update the situation’s definitely got better. I’ll keep monitoring.
Thanks!
Hi,
Try to deactivate all plugins except Visual Composer, clear the caches then check if this errors still appear in error log.
The last two errors occur when you try to access the theme’s index.php file directly and this is caused by the theme’s inability to locate the WordPress get_header function as it dose not passed trough WordPress when the request is made and in that case the function doesn’t “exist”.
You can read more about this and also have a solution for this here: http://ardamis.com/2011/06/02/fix-for-php-fatal-error-get_header-in-wordpress/
Hope this help.
Thanks