Today I met a problem above:
[03-Nov-2017 19:29:02 Asia/Shanghai] PHP Fatal error: Call to undefined function header() in /www/xxxx/api/login.php on line 5
[03-Nov-2017 19:27:37 Asia/Shanghai] PHP Fatal error: Call to undefined function dirname() in /www/xxxx/index.php on line 9
...
I cannot find the reason and solution. anyone helps me, thanks.
add my code.
<?php
header('Content-type:text/html; charset=utf8');
include_once dirname(__FILE__). '/global.inc.php';
echo 'HELLO WORLD';
this problem happens sometimes and have last for one day, in my online website. what i can do is to reload each 1 hour.
anyone knows how to solve it??? THXTHX
UPDATE: Server Info added: Nginx Server, CentOS release 6.3. PHP Version 5.4.41
What confuse me most is that this problem happened suddenly on my online website with no changes published.