Please Help Me ,Thanks
| From: | Seamus | Date: | Fri, 23 May 2003 08:31:39 +0000 |
| Subject: | Please Help Me ,Thanks | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-148737@lists.php.net to get a copy of this message | ||
My system is Redhat Linux 7.2 and PHP version is 4.3.1 .
When I use 'php' to run the php script directly,such as '[root@Servers-4
testsuit]#php ./control.php'.The source code of 'control.php' is following:
<?php
session_start();
if (session_is_registered("statu") && isset($statu))
{
if ($action=="stop")
{
$statu = "PowerOff";
}
elseif($action=="pause")
{
$statu = "Pause";
echo "The service has paused successfully.\r\n";
}elseif($action=="resume")
{
$statu = "PowerOn";
echo "The service is resumed successfully.\r\n";
}else
{
echo "Please input the command line with parameter.\r\n";
}
}
else
{
echo "Session handle not exist!\r\n";
}
?>
And some error messages output.
"Warning: session_start() [http://www.php.net/function.session-start]:
Cannot send session cookie - headers already sent in
/www/servers/testsuit/control.php on line 3
Warning: session_start() [http://www.php.net/function.session-start]: Cannot
send session cache limiter - headers already sent (output started at
/www/servers/testsuit/control.php:3) in /www/servers/testsuit/control.php on
line 3
Session handle not exist!"
Please help me, thanks!