Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Php session start not working on Apache+win2k

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
hi,
I have successfully installed php,mysql,perl on apache server(local server) which is running on win2k os.Everthing works allright.However,for the first time i started learning about sesssion.I tried the following code.

<?
session_start();
session_register('count');
$count++;
echo &quot;<P>You've been here $count times.</p>&quot;;
?>

but i am getting problem saying ,
----------
Warning: open(/tmp\sess_453e4e1046e0ad6fb2a57d416f759774, O_RDWR) failed: m (2) in c:\ on line 2

You've been here 1 times.


Warning: open(/tmp\sess_453e4e1046e0ad6fb2a57d416f759774, O_RDWR) failed: m (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

-----------------

I have noticed i get this error when i use session code. I have tested the same code on other oline server.It's works finem but it does not work on my local serever.

I guess php is not able make folder call tmp. is there anyway that i can make it work, or mentioning the session path,where and how ?


Any help will be great...

Thanks for ur time ..

netmastan
 
I think that you need to change the path to a Windows temp directory. Change it in your php.ini file. //Daniel
 
hi Daniel,
Thanks for u reply,
It didn't work
I have changed the session path like this in php.ini file(which is under C:\WINNT\system32)
session.save_path = C:/WINNT/Temp

I also restarted the apache..after that i checked the php environment using phpinfo() function.Still i see session path is session.save_path = /tmp

any other file to edit
 
THanks for ur help. It's working now..

I guess during installation of php i did some mistake.
php.ini file should be under c:/winnt not u C:\WINNT\system32

Strange ! then how come php was working ok when php.ini file was under C:\WINNT\system32..


anyway,thanks for ur help...

netmastan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top