Click to See Complete Forum and Search --> : tmp directory in local PC


alsaffar
03-02-2003, 10:11 AM
Hi everybody,

I installed PHP 4.2.2 on my PC with Apachi 2.0.4,

everything is working fine except when I try to use sessions from an example from the manual:

<?
if (!session_is_registered('count')) {
session_register('count');
$count = 1; } else $count++;
?>
Hello visitor, you have seen this page <?php echo $count; ?> times.<p>

It give the following error:

Warning: open(/tmp\sess_6ab1a6131f2b4d01dddcd4a13ce388ec, O_RDWR) failed: No such file or directory (2) in C:\Program Files\Apache Group\Apache2\htdocs\Test\SessionCounter.php on line 3

Warning: open(/tmp\sess_6ab1a6131f2b4d01dddcd4a13ce388ec, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

How can I correct things to make everything works smoothly?

PLEASE HELP.

sebconn
03-08-2003, 06:40 AM
you need to open the PHP.ini file and change the "session.save_path" variable to a directory that exists on your PC, such as c:/windows/temp. Just make sure the directory exists though.

alsaffar
03-08-2003, 06:49 AM
Thanx sebconn for helping,

I changed the path in the php.ini file under C:\Program Files\Apache Group\Apache2\conf to make session.save_path = C:\WINDOWS\Temp But still I got the same error.:confused:

sebconn
03-08-2003, 08:18 PM
this might be different because you're running an apache server but see if there's a PHP.ini file in the C:/WINDOWS directory

alsaffar
03-10-2003, 11:36 AM
Now its working, thanx sebconn for helping,

the problem was that I have to have a copy of php.ini file in PHP folder where all PHP files and folders are there.

Thanx again.