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

Reply via email to