i can't figure it out how is that when i write sessionstart();my computer makes strange things and my server shuts down with errors
Windows 2000 Prof.
serv: Apache 1.3.22
php: 4.2.3
I was lookin threw php.ini and don't know why is that, can anybody help me - I'm not keen on servers , especially Apache

Can anybody help me and try to explain me this in simply and intelligible way????????????

    try session_start(); you forgot an underscore. Probably the reason PHP etc shut down.

      session_start(); - i know it was my mistake when writing this post,
      but i in fact use correct session_start(); and it doesn't work

        does it output any error at all. IF so please show us the error and some code associated with the error

          let's say I evaluate this code:
          <?php
          session_start();
          // Use $HTTP_SESSION_VARS with PHP 4.0.6 or less
          unset($SESSION['count']);
          ?>
          and logs in Apache are:
          [Thu Dec 19 11:43:26 2002] [info] Parent: Created child process 1856
          [Thu Dec 19 11:43:26 2002] [info] Parent: Duplicating socket 176 and sending it to child process 1856
          [Thu Dec 19 11:43:26 2002] [info] BytesRead = 372 WSAProtocolInfo = 2006620
          [Thu Dec 19 11:43:26 2002] [error] PHP Warning: open(/tmp\sess_0a786498165e3ed3999c6cfa0f3d9289, O_RDWR) failed: No such file or directory (2) in d:\www\copyofheader\s.php on line 2
          [Thu Dec 19 11:43:26 2002] [error] PHP Warning: Undefined variable:
          SESSION in d:\www\copyofheader\s.php on line 4
          [Thu Dec 19 11:43:28 2002] [info] master_main: Child processed exited (due to MaxRequestsPerChild?). Restarting the child process.

          anybody knows?

            Well it just cant create it cos the webfolder cannot be found

              well thanks for tip
              now what should I do to fix it (that it were found)

                To tell you the truth i aint much good with Apache.

                PHP Warning: open(/tmp\sess_0a786498165e3ed3999c6cfa0f3d9289, O_RDWR) failed: No such file or directory (2) in d:\www\copyofheader\s.php on line 2

                All i can think is that a file hasnt actually been created.
                So thats that error associated with
                session_start();

                Your next error is somewhat associated with your first. Its undefined cos the Session was never created

                  You need to create the /tmp directory.

                  Then see what happens :o

                    Im assuming the directory is created cos its a windows issue. It must be there unless for some reason it has been deleted.

                      Originally posted by jabba_29
                      You need to create the /tmp directory.

                      Then see what happens :o

                      Might be tricky on a Windows system.

                      php.ini

                      ; Argument passed to save_handler.  In the case of files, this is the path
                      ; where data files are stored. Note: Windows users have to change this 
                      ; variable in order to use PHP's session functions.
                      session.save_path = /tmp
                      

                        Originally posted by planetsim
                        Im assuming the directory is created cos its a windows issue. It must be there unless for some reason it has been deleted.

                        I'm guessing it isn't. I'm guessing someone's turned off PHP's error reporting.

                        Note this line:

                        [Thu Dec 19 11:43:26 2002] [error] PHP Warning: open(/tmp\sess_0a786498165e3ed3999c6cfa0f3d9289, O_RDWR) failed: No such file or directory (2) in d:\www\copyofheader\s.php on line 2

                          thx Weedpacket, as always you are right,
                          hm
                          I think that with tsis creating /tmp folder might be tricky too

                          i created "tmp" folder and in php.ini session.save_path = tmp and it works fine now
                          thx

                            2 months later

                            where dod you create the tmp directory?
                            in c:\php\tmp ?

                            and does php.ini stay as session.save_path=/tmp

                            thanks

                              no it is to be craated in the folder in which you have your web files. Lets say your folder is www/httpd/your_web/ ,so you crate this folder in your_web it is: (www/httpd/your_web/temp) if only in php.ini: session.save_path=/tmp

                                Write a Reply...