Re: Please Help Me ,Thanks

From: Date: Fri, 23 May 2003 11:18:55 +0000
Subject: Re: Please Help Me ,Thanks
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-148760@lists.php.net to get a copy of this message
But I can execute the script under the MS windows environment by using a command line. "Marek Kilimajer" <kilimajer@webglobe.sk> ??????:3ECE020A.8060804@webglobe.sk... You got it, sessions work only through a web server, not from command line. How would you pass the session variable? Seamus wrote: >I think that it works through a web browser ,but it can not work on local >execute .So the php.ini valid. ><daniel@rhesusb.dk> дÈëÏûÏ¢ÐÂÎÅ:005c01c3210e$22e704d0$de01a8c0@Asus... >Ok, so it works on a remote server? But not locally? > >If it doesn't work locally, it could be that you haven't defined a valid >session data directory in php.ini. Try looking under the [Session] section, >there's a veriable called session.save_path, this should point to an >existing directory, like in my case: > >session.save_path = "C:/Personal Folders/Documents/WWW/_sessiondata" > >Remember, the directory must exist, it won't be created by php. > ----- Original Message ----- > From:   > To: daniel@rhesusb.dk > Sent: Friday, May 23, 2003 11:25 AM > Subject: Re: [PHP] Please Help Me ,Thanks > > > Thank you for replying my massage. > > I try again and the problem remains.I visit this page in web browser,error >massage disappeared,and the session files created; > > > > > > > > > > Seamus > >From: > >Reply-To: > >To: "Seamus" > >Subject: Re: [PHP] Please Help Me ,Thanks > >Date: Fri, 23 May 2003 10:51:30 +0200 > > > >This is typically what happens if any kind of HTML has been inserted >before your PHP script. That could be an tag, or even just a space before "> > > >^ > >(that's a space) > > > >or > > > > > >> > >Cookies are sent with the header, and therefore any script that uses >headers must exist before ANY other content. > > > >Cheers =) > > > > > > > > > > > > > >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: > > > >>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! > > > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > >--------------------------------------------------------------------------- - >-- > ʹÓà MSN Messenger ÓëÁª»úµÄÅóÓѽøÐн»Á÷ > > > > >

« previous php.general (#148760) next »