Page 1 of 1

My problem about seesion

Posted: Thu Dec 26, 2002 9:03 pm
by Genux
I got a big trouble about using session
follow is my ERROR message:
Warning: open(/tmp\sess_9a6cec248fd2262e14e7a1bf52cb0d1d, 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 should I config my php.ini??
my php.ini is :
session.save_path = \tmp
session.cookie_path = \
session.save_handler = files

My OS is winXP

sorry....My English is very poor....
Thanks for your answer....

Posted: Thu Dec 26, 2002 9:21 pm
by BigRed
Make it x:\tmp, where x is the letter of your hard drive. Make sure there is a folder called tmp in your x:\ drive.
Hope that helps.

Posted: Fri Dec 27, 2002 8:28 am
by Genux
thanks a lot
but now...I got a new trouble
I can use session
but the value of session always 1
<page1.php>
<?php
session_register('uid');
?>
<page2.php>
<?php
print(session_register('uid'));
?>
uid is the text field and it's name is uid.
but when I input characters into uid
page2.php always print 1

what should I do???

Posted: Fri Dec 27, 2002 9:02 am
by qads
give this a try:

Code: Select all

<?php
//page1.php
session_start();
$_SESSION[uid] = $_POST[uid];

//page2.php 
session_start();
echo $_SESSION[uid];
?>