heya guys. i'm running a WAMP server (sorry...) and i am learning php 🙂. so far its gone well, but i've recently been trying ti use sessions. i use session_start, session_id returns a valid session. however i can't work out why i can't register any variables - they will simply not output, either on the same page or another.

at first i thought it was my code. but i tried uploading it to my ISP's webserver and the code ran fine. my entire phpinfo page is at:

www.tippell.curvedspaces.com/phpinfo.htm

appologies to those with firewalls - the hosts aren't too liked by most firewalls and will be blocked.

any help? i'm running php 4.2.3 if it helps. i know 4.3 is out, but i'm damned if i'm going to spend godknowshowlong trying to upgrade it....

thanks for the help (in advance)!!!!!

dgr

    I would say that you should switch to Apache server..
    Apache.org I use it, and its very reliable.. (download the 1.3 versions) If your not sure how to install it.. I have the tutorial for you.. Tutorial (For binary versions) Includes how to install PHP as well..

      Well, unless I just came in late, it appears you are using Apache. Afraid I don't have much to offer here except that this happened inexplicably to me as well. Except it was a LAMP installation. The problem seemed to be that our Web server was running out of harddrive. Wish there had been more time to investigate. Since you're losing Windows, I suppose you might check your php.ini to see where your temp directory is pointing at and if it exists. I'm sure you're looked through your Apache logs, but if you haven't....

      Also, if your Apache is running as a service, make sure that the user it runs as has permissions to the directory where php.ini indicates sessions are to be stored.

      Good Luck!

        Since you're losing Windows,

        Should be...

        Since you're using Windows,

        I promise that was an accident 😃

          cheers for the information. I am running Apache (hence the WAMP), but php is installed as cgi rather than a process. Will this make a difference? The curious thing is that i can set up a session, but not write variables to it. i'll try out having a look at my php.ini. just hoping someone else had had the same problem

          dgr

            worked it out:

            i had global variables set to OFF - i am using one of the later versions of php4.

            THIS IS NOW STANDARD if anyone else has the same problem. you can either change it to "ON" or you have to use the http_session_var keyword

            dgr

              Have you set up your session.save_path ????

              If not then php willl not know where to put the session cookies

              it in your php.ini under the section [session]

              HTH

              GM

                Write a Reply...