Setting the date back on Linux machine causes page to hang?
Posted: Fri Feb 11, 2005 9:23 am
Hey all,
I can set the time forward no problem. However, when I use the same code to set the date back, the page hangs, seemingly IN the exit(); statement.
Here is the code snipet:
This code changes the date correctly on the system, because when I return to the date page after the setting page hangs, the date has been changed back correctly.
The code displays all the correct information, and the last thing that shows up is "exit".
Then, the exit(); doesnt seem to work because the page keeps loading indefinitely.
Nemesis.
I can set the time forward no problem. However, when I use the same code to set the date back, the page hangs, seemingly IN the exit(); statement.
Here is the code snipet:
Code: Select all
$date = $month.$day.$hour.$min.$year.".".$sec;
$date = trim($date);
echo "<pre>Date: "; // DEBUG
print_r($date); // DEBUG
echo "</pre>"; // DEBUG
mtsiExecuteCommand("date $date",$linearray);
sleep(2);
mtsiExecuteCommand("hwclock --systohc &",$linearray2);
sleep(2);
echo "<pre>linearray: ";// DEBUG
print_r($linearray); // DEBUG
echo "</pre>"; // DEBUG
echo "<pre>linearray2: ";// DEBUG
print_r($linearray2); // DEBUG
echo "</pre>"; // DEBUG
$msg = "Date and Time changed successfully";
$msg = str_replace(" ",":",$msg);
header("HTTP/1.0 302 Redirection");
header("Location:date.php3?mode=$mode&msg=$msg");
echo "exit<br>"; // DEBUG
exit();The code displays all the correct information, and the last thing that shows up is "exit".
Then, the exit(); doesnt seem to work because the page keeps loading indefinitely.
Nemesis.