Problem with the temp dir in php.ini

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
Razorblades
Forum Newbie
Posts: 1
Joined: Fri Aug 13, 2004 4:03 am

Problem with the temp dir in php.ini

Post by Razorblades »

OS: WindowsXP
Webserver: Apache 2.0.47
PHP Ver: 4.3.4
MySQL Ver: 3.23.58
PHPMyAdmin: 2.5.6

I installed a project downloaded from a site. Everything went wel,
till the installation was complete. I got the following messages at
top of the page:

Warning: session_start():
open(/tmp\sess_733c37d2ce7161364cfbffa5514a9c1e, O_RDWR) failed: No
such file or directory (2) in
C:\httpserver\www\webfilesystem\index.php on line 7

Warning: session_start(): Cannot send session cookie - headers already
sent by (output started at
C:\httpserver\www\webfilesystem\index.php:7) in
C:\httpserver\www\webfilesystem\index.php on line 7

Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at
C:\httpserver\www\webfilesystem\index.php:7) in
C:\httpserver\www\webfilesystem\index.php on line 7

Editing the session.safe_path didn't work. I tried it like this:
c:/httpserver/www/tmp
"c:\httpserver\www\tmp"
"c:/httpserver/www/tmp"
and some other things. I found out none was working. Probably did
something wrong there? (Could someone mail me if he/she knows what
that is).

I got rid of the error by simply making a folder named "tmp" in the
root of c:\. Without even changing the session.safe_path in the
php.ini it worked right away. The errors are gone this way, but maybe
you will be stuck with the problem that you have a "tmp" folder in
your c root that you don't want.


Can someone tell me what I do have to change in the php.ini and how to
change it? The value of the session.safe_path it c:/httpserver/www/tmp
now, but still everything will only work when I have the c:\tmp dir
made. As soon as I delete that folder i'll get that message. I want to
use a different tmp dir though, so I would like to sort this out, but
I allready tried so many things, that I don't anymore know what to do.

Guess I have to fill in something else???
Hope someone can help me with this.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Just edit your c:\windows\php.ini file and change session.save_path to any directory that exists.
Eg:
session.save_path = c:\sessions
Or
session.save_path = c:\httpserver\sessions
Then restart apache and you can safely remove the c:\tmp directory if you're no longer using it.
Post Reply