First, specs:
OS: Ubuntu Linux Server Edition (Jaunty Jackalope) 9.04 32bit i386
GUI: Terminal, Kubuntu-desktop, and Ubuntu-desktop available
HDD: 60 GB
Internet: eth0 connected, working
SSH: OpenSSH through PuTTY
Software: Apache 2, PHP 5
So, it seems when I try to write to a file with PHP, the file writes for only a few seconds, or until the script finishes. I have error reporting set to E_ALL & ~E_NOTICE in PHP and I ran
sudo chmod 775 /var/www for permissions.
Here's the code:
HTML Code:
$myFile = "total.txt";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
$theData=(int)$theData;
$myFile = "total.txt";
$fh = fopen($myFile, 'w') or die("Error... please reload or contact admin.");
$stringData = $theData+$temp;
fwrite($fh, $stringData);
fclose($fh);
Thanks!