PDA

View Full Version : Just installed php. Now sessions won't work.


Pompiuses
08-16-2003, 10:33 PM
I've just installed php 4.3.2 on my apache 2.0.47. It seems to work fine, except for sessions. When I try to start a session i get the errormessage:
Warning: session_register(): open(/tmp\sess_ac1757b50590d2c7ca3f3fe97aeddac1, O_RDWR) failed: No such file or directory (2) in C:\Program Files\Apache Group\Apache2\htdocs\php\gjestebok\login\login.php on line 36

I've read the documentation, and I think I need to change the path in the 'session.save_path' variable in php.ini. But I'm not sure what to change it to. Any help is appreciated :)

Spookster
08-16-2003, 11:49 PM
For starters you need to make sure the session directory actually exists. You can name it whatever you like and you can put it wherever you like as long as you indicate the name and location of it in the session_save_path.

Examples of a proper session_save_path would be:

C:\www\tmp
C:\apache\sessions

Also session_register() is deprecated and should no longer be used.

Pompiuses
08-17-2003, 09:27 AM
Originally posted by Spookster
Also session_register() is deprecated and should no longer be used.

What should be used instead?

Nightfire
08-17-2003, 11:26 AM
It's just $_SESSION['name'] = $variable;