You don't have to put it right at the beginning of the file, it just
has to be before any output. Please see:

https://www.reversefold.com/tikiwiki/tiki-index.php?page=PHPFAQs#id681470

If that could use better wording and more info, let me know.


On Sun, 18 Jul 2004 09:08:26 +0100, Harlequin
<[EMAIL PROTECTED]> wrote:
> Bob.
> 
> New myself but have started reading around sessions and found that you need
> two things enabled at the server end:
> 
> track_vars
> trans-sid
> 
> and bruce is right - you need to make sure the session_start command is
> immediately after the opening PHP tag.
> 
> --
> -----------------------------
>  Michael Mason
>  Arras People
>  www.arraspeople.co.uk
> -----------------------------
> "Bob Imperial" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > While I realize this is elementary to most of you, I am just getting
> started
> > with php, moving from coldfusion :)
> > I am currently reading through the chapter on sessions and running into a
> > little issue that after making many changes to my php.ini file, I continue
> > to get the following errors while running this:
> >
> >  <?php
> >
> >   session_start();
> >
> >  echo "<p>Your session ID is ".session_id()."</p>";
> >
> >  ?>
> >
> > Errors:
> >
> > Warning: session_start(): open(/tmp\sess_ff8651f382492ae56f436690d81ff124,
> > O_RDWR) failed: No such file or directory (2) in
> > c:\inetpub\wwwroot\phptest\listing10.1.php on line 15
> >
> > Warning: session_start(): Cannot send session cookie - headers already
> sent
> > by (output started at c:\inetpub\wwwroot\phptest\listing10.1.php:13) in
> > c:\inetpub\wwwroot\phptest\listing10.1.php on line 15
> >
> > Warning: session_start(): Cannot send session cache limiter - headers
> > already sent (output started at
> > c:\inetpub\wwwroot\phptest\listing10.1.php:13) in
> > c:\inetpub\wwwroot\phptest\listing10.1.php on line 15
> >
> > Your session ID is ff8651f382492ae56f436690d81ff124
> >
> >
> > Warning: Unknown(): open(/tmp\sess_ff8651f382492ae56f436690d81ff124,
> O_RDWR)
> > failed: No such file or directory (2) in Unknown on line 0
> >
> > Warning: Unknown(): Failed to write session data (files). Please verify
> that
> > the current setting of session.save_path is correct (/tmp) in Unknown on
> > line 0
> >
> > sorry this is so elementary but have to start somewhere, I am running php
> 4
> > on a win2k box w/IIS5.
> > Though this does return a session id it's obviously not persistent on
> > reload, an example of a session.save_path on a windows box would be great
> >
> > TIA  just another old guy trying to learn new stuff.
> >
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> !DSPAM:40fa2ddf325505209020524!
> 
> 


-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to