Session Problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
CrazyJimmy
Forum Commoner
Posts: 34
Joined: Tue Nov 19, 2002 1:40 pm

Session Problem

Post by CrazyJimmy »

I am trying to use sessions and keep getting this error everytime i try to start one:-

Warning: session_start(): open(/tmp\sess_26195bed3979db88bf9bbf8c545e2546, O_RDWR) failed: No such file or directory (2) in C:\Program Files\Apache Group\Apache2\htdocs\dev\admin.php on line 1

I'm lost as to whats causing it.

Thanks
User avatar
Fredix
Forum Contributor
Posts: 101
Joined: Fri Jul 18, 2003 2:16 pm
Location: Wehr (Eifel) Germany
Contact:

Post by Fredix »

posting here the source might help to solve your problem
CrazyJimmy
Forum Commoner
Posts: 34
Joined: Tue Nov 19, 2002 1:40 pm

Post by CrazyJimmy »

It is just when i start a session even with no other code. I'm sure it has something to do with the /tmp directory, but I have created it everywhere I can think and still get error.

I'm using Apache 2/PHP 4.3.2/Windows XP
mrchris
Forum Newbie
Posts: 2
Joined: Sat Jul 19, 2003 6:31 pm

Post by mrchris »

I use apache on windows too and I changed my session.save_path to point to a valid windows path name like C:\php\mytmp vs. /tmp and a lot of my session problems went away.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

As mrchris indicated you need to edit your php.ini - the /tmp bit is for *nix systems and has to be changed for Windows systems.

Mac
Post Reply