Current location: Hot Scripts Forums » Programming Languages » PHP » Problem with session in php5


Problem with session in php5

Reply
  #1 (permalink)  
Old 12-08-06, 11:00 PM
cty cty is offline
Newbie Coder
 
Join Date: Dec 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Problem with session in php5

Problem with session in php5


Good day,
can anyone tell me how to solve my problem?

i use the php4 to test this simple code ,is work!
After i uninstall and install php5,the error occur.

---------------------------------------------
my code:
(*for testing session only)
PHP Code:

<?php        

    session_start
();
    print 
session_id();

?>
------------------------------------------------
Error message:
Quote:
vn5690j2f0beqe5qd0b36m10t3PHP
Warning: Module 'mysql' already loaded in Unknown
on line 0 PHP Warning: session_start()
[function.session-start]:
open(C:\DOCUME~1\CTY\LOCALS~1\Temp\php\upload\sess _vn5690j2f0beqe5qd0b36m10t3, O_RDWR)
failed: No such file or directory (2) in
C:\cty\test.php on line 2 PHP
Warning: Unknown: open(C:\DOCUME~1\CTY\LOCALS~1\Temp\php\upload\sess _vn5690j2f0beqe5qd0b36m10t3, O_RDWR)
failed: No such file or directory (2) in Unknown on line 0 PHP Warning: Unknown: Failed to write session data (files).
Please verify that the current setting of session.save_path is correct (C:\DOCUME~1\CTY\LOCALS~1\Temp\php\upload)
in Unknown on line 0
----------------------------------------------------------

I did check my php(using phpinfo()
And i found that
session.save_path C:\DOCUME~1\CTY\LOCALS~1\Temp\php\upload

I think is something wrong here?
this path should be C:\PHP\sessiondata(**when i using php4 ,it is in C:\PHP\sessiondata)

If really is cause by this ,how i edit the php.ini?
If no,what is the problem?

I currently using php5+mysql4+IIS

Beside,can guide me to install php5?(May be is installation not correct?)

Last edited by Nico; 12-09-06 at 02:42 AM. Reason: Please use [php] wrappers when posting PHP code.
Reply With Quote
  #2 (permalink)  
Old 12-09-06, 05:42 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
try changing the ini file. you said you updated to php5, this means you have access to your ini file? if so, search for session.save_path and replace it. if not, you will have to place the following line on every script:
PHP Code:

ini_set("session.save_path""C:\PHP\sessiondata"); 

To update to php5, uninstall php4 (use the default uninstall, not the custom), and then install php5. If you just dowloaded the php5 (not the installer), you could simply extract the files to your C:\PHP folder, and then restart your server. It should work now (that's how i did it: PHP 5.1.6, MySQL 5.0.26, Apache 2)

UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Expire Problem Anisking PHP 2 11-16-06 06:58 AM
Session Security (Continued from post below) nova912 PHP 1 09-05-06 09:29 AM
3 small pages with a session problem. session data lost between the 2nd and 3rd page phpfingers PHP 1 10-26-05 08:08 AM
problem with session altan9 Perl 3 06-24-05 02:36 PM
PHP5 Hosting account for FREE w/ any purchase! mxhub General Advertisements 0 10-07-04 11:52 AM


All times are GMT -5. The time now is 05:50 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.