Fatal Nginix Error

Posted in: Newsmag
Post count: 60

Hello,

I notice this error in the log file:

2015/12/28 02:35:39 [error] 3496#3496: *1631689 FastCGI sent in stderr: “PHP message: PHP Fatal error: Call to undefined function get_header() in /var/www/site/public/wp-content/themes/Newsmag/index.php on line 6” while reading response header from upstream, client: 66.249.73.191, server: http://www.site.com, request: “GET /wp-content/themes/Newsmag/ HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php5-fpm.sock:”, host: “www.site.com”

Post count: 1291

Hi,

It’s not a critical error, it’s a common issue which appears when you try to access the index.php file directly. WordPress uses permalinks and internal functions, you don’t have to access the template files directly. A solution for this is described here – https://ardamis.com/2011/06/02/fix-for-php-fatal-error-get_header-in-wordpress/

Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.