#30469 [NEW]: Cannot use Session In Shell mode
| From: | xianglei at xinruinet dot com | Date: | Mon, 18 Oct 2004 08:31:19 +0000 |
| Subject: | #30469 [NEW]: Cannot use Session In Shell mode | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-67717@lists.php.net to get a copy of this message | ||
From: xianglei at xinruinet dot com
Operating system: Linux
PHP version: 4.3.8
PHP Bug Type: Session related
Bug description: Cannot use Session In Shell mode
Description:
------------
I found that session_start() function can not use when i wrote php as a
shell script.
Reproduce code:
---------------
#!/usr/local/php/bin/php
<?
session_start();
?>
Expected result:
----------------
Warning: session_start() [http://www.php.net/function.session-start]:
Cannot send session cookie - headers already sent in
/home/sms/php/test.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 /home/sms/php/test.php:3) in /home/sms/php/test.php on line 3
Actual result:
--------------
Warning: session_start() [http://www.php.net/function.session-start]:
Cannot send session cookie - headers already sent in
/home/sms/php/test.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 /home/sms/php/test.php:3) in /home/sms/php/test.php on line 3
--
Edit bug report at http://bugs.php.net/?id=30469&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30469&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30469&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30469&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30469&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30469&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30469&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30469&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30469&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30469&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30469&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30469&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30469&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30469&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30469&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30469&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30469&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30469&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30469&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30469&r=mysqlcfg