PHP Fatal Error in Theme File

I got the same PHP fatal error as this post, which I believe resulted in a 502 error on my site. I’ve since updated the theme from 4.3.1 to 4.3.3, so I don’t know if that resolved anything, but wanted to see if there was a resolution to the last posting?

Currently running WP 5.7.1 / PHP 7.3.28.

PHP Fatal error: Uncaught Error: Call to undefined function x_get_view() in /var/www/vhosts/____________.com/httpdocs/wp-content/themes/pro/index.php:16/nStack trace:\n#0 {main}/nthrown in /var/www/vhosts/____________.com/httpdocs/wp-content/themes/pro/index.php on line 16'

Hello @samuraicow,

Thanks for writing in! Since you already have updated the theme, there is no fatal error so far as I have checked the frontend and the backend. If the error goes back again, please do make sure that every thing is up to date.

Best Regards.

Hi @samuraicow,

By withdrawing the post, I believe you already have resolved the issue. If the issue still existed, you can let us know.

Thanks.

Sorry, yeah I was going to wait a few days to see if the error persisted, and it unfortunately has continued. I’ll include a sampling of the error log as a secure note.

Hello @samuraicow,

That kind of fatal error should interrupt your site and will not display your homepage. So far, I can view both the WP Admin and your homepage. I have checked your error.log and I am seeing this:

[14-May-2014 00:46:09 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/yogi/public_html/onlineclasses/wp-content/themes/greenyogi/header.php:13) in /home/yogi/public_html/onlineclasses/wp-includes/pluggable.php on line 896
[15-May-2014 09:27:29 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/yogi/public_html/onlineclasses/wp-content/themes/greenyogi/header.php:13) in /home/yogi/public_html/onlineclasses/wp-includes/pluggable.php on line 896

No more fatal error. Only a warning which you can get rid of this by disabling the debug mode.

Kindly let us know how it goes.

Yes, we’ve been getting 502 errors and the site’s been going down intermittently. Where did you see those log entries? Those are dated 2014 and are not current.

Hey @samuraicow,

It is found in your error.log in the root directory. I could not find debug.log in your wp-contents folder by the way. I was able to access the logs with a plugin installed on your site which I already removed.

Cheers.

That error log was from an old install on another server and does not apply. I can tell because it’s referencing a directory that no longer exists on this new server. The current logs that I’m seeing the fatal errors on are the apache logs and are not available in the public folder. I never enable debug.log which is probably why you can’t find one.

Hello @samuraicow,

The PHP version can be a reason behind your issue, I would suggest you upgrade the PHP version to 7.4 and check if that issue resolves or not. if it doesn’t work for you please let us know.

It would be best if you could copying your live website to your staging area. and send your details in a secure note so that we can investigate your setting without breaking your live site. Please provide the login credentials of the staging server and FTP details of the staging server.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.