Shane
June 21st, 2008, 10:23 AM
Ok. I know this is not a development forum, but I am hoping to get some help from all you technical minded people here to help solve this problem. I been trying to figure it out for two days on why it fails randomly and other times it works perfectly fine. Nothing shows up in the httpd error logs.
Right now we are using Apache 2.2.9 and PHP 5.2.6. However when ever the php command fwrite it executed via Apache/HTTPD it fails to write any content to the file.
No output, nothing. The stats program is here: http://www.battlestarwiki.org/root/statcount_bsgwiki.php (Sourcecode: http://www.battlestarwiki.org/root/statcount_bsgwiki.phps). The directory to where the file is writing to does have 777 permissions. When running the php script though the command line:php statcount_bsgwiki.php...it works perfectly fine and outputs the write data to the file. But when running it through Apache, it doesn't write a thing even though the data is retrievable. It returns "0" not "-1" indicating there wasn't a problem writing to the file.
So I am open to any ideas or fixes on this problem.
This is the current output of the php file through apache:
string(3) "782" 0
string(4) "3242" 0
string(2) "46" 0
string(2) "93" 0
string(4) "3703" 0
string(2) "22" 0
string(1) "5" 0
string(2) "24" 0
string(2) "77" 0
It should read:
string(3) "782" 3
string(4) "3242" 4
string(2) "46" 2
string(2) "93" 2
string(4) "3703" 4
string(2) "22" 2
string(1) "5" 1
string(2) "24" 2
string(2) "77" 2
Right now we are using Apache 2.2.9 and PHP 5.2.6. However when ever the php command fwrite it executed via Apache/HTTPD it fails to write any content to the file.
No output, nothing. The stats program is here: http://www.battlestarwiki.org/root/statcount_bsgwiki.php (Sourcecode: http://www.battlestarwiki.org/root/statcount_bsgwiki.phps). The directory to where the file is writing to does have 777 permissions. When running the php script though the command line:php statcount_bsgwiki.php...it works perfectly fine and outputs the write data to the file. But when running it through Apache, it doesn't write a thing even though the data is retrievable. It returns "0" not "-1" indicating there wasn't a problem writing to the file.
So I am open to any ideas or fixes on this problem.
This is the current output of the php file through apache:
string(3) "782" 0
string(4) "3242" 0
string(2) "46" 0
string(2) "93" 0
string(4) "3703" 0
string(2) "22" 0
string(1) "5" 0
string(2) "24" 0
string(2) "77" 0
It should read:
string(3) "782" 3
string(4) "3242" 4
string(2) "46" 2
string(2) "93" 2
string(4) "3703" 4
string(2) "22" 2
string(1) "5" 1
string(2) "24" 2
string(2) "77" 2