php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30469 Cannot use Session In Shell mode
Submitted: 2004-10-18 10:31 UTC Modified: 2004-10-18 10:32 UTC
From: xianglei at xinruinet dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.8 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: xianglei at xinruinet dot com
New email:
PHP Version: OS:

 

 [2004-10-18 10:31 UTC] xianglei at xinruinet dot com
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-18 10:32 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 10:01:32 2024 UTC