Re: session_start() || shell access problem......
| From: | Robert Cummings | Date: | Sat, 20 Sep 2003 21:02:43 +0000 |
| Subject: | Re: session_start() || shell access problem...... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163304@lists.php.net to get a copy of this message | ||
On Sat, 2003-09-20 at 15:46, CF High wrote:
> Hey all.
>
> I'm running a script from the command-line php interpreter as follows:
> (thanks to D. Souza for lead)
>
> $text =
usr/local/bin/php /path/to/my/php/page.php;
>
> within the read file I want to enable sessions, so I session_start() at the
> top of the page:
>
> <?
> session_start();
> ?>
> <?
> code to execute here.......
> ?>
>
> Regardless of how I mess around with placement of session_start(), I get a
> "Headers already sent".
>
> Why? Nothing has been output to the browser within the read file!
> Furthermore, if I create a test page with just:
>
> <?$text = usr/local/bin/php /path/to/my/php/page.php;?>
>
> Still receive "Headers already sent".
>
> My eyes are completely fried -- anyone feel like saving my vision?
This often is difficult to detect when there's is implicit output
outside of the <? tag. Check the top of the included file or start php
script and see if there is any whitespace or newlines preceding the tag.
HTH,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com
|
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'