I'm having session variable problems. On my computer It was working well. Since I uploaded it to the web host, session variables aren't persisting across pages. Web host PHP Version 4.0.6 & register globals are on. Below is the host's session phpinfo. Can anyone tell me what I can do to get this working!!!!!!! thank you
session
Session Support enabled
Directive Local Value Master Value
session.auto_start
Off Off
session.cache_expire
180 180
session.cache_limiter
nocache nocache
session.cookie_domain
no value no value
session.cookie_lifetime
0 0
session.cookie_path
/ /
session.cookie_secure
Off Off
session.entropy_file
no value no value
session.entropy_length
0 0
session.gc_maxlifetime
1440 1440
session.gc_probability
1 1
session.name
PHPSESSID PHPSESSID
session.referer_check
no value no value
session.save_handler
files files
session.save_path
/tmp /tmp
session.serialize_handler
php php
session.use_cookies
On On
session.use_trans_sid
1 1
Configure Command
'./configure' '--with-apxs=apxs' '--prefix=/home/kan/work/PSA_PLUS_1_3_1/apache/../release/usr/local/psa/apache' '--with-system-regex' '--with-config-file-path=/usr/local/psa/apache/conf' '--disable-debug' '--disable-pear' '--enable-sockets' '--enable-track-vars' '--without-gd' '--with-mysql=/home/kan/work/PSA_PLUS_1_3_1/apache/../release/dist/usr/local/psa/mysql' '--with-iodbc=/home/kan/work/PSA_PLUS_1_3_1/apache/../release/lib/libiodbc' '--with-imap=/home/kan/work/PSA_PLUS_1_3_1/apache/../release/lib/imap-cclient'
my code is as follows:
verifyuser.php
session_start();
include "./common_db.inc";
$query = "SELECT username FROM users WHERE username = '$uname' AND password= '$pass'";
$result = mysql_query($query);
if (mysql_num_rows($result))
{
$username = mysql_result($result,$i, 0);
$User = $uname;
$Time = time();
$query2 = "UPDATE users SET online2 = $Time WHERE username = '$username'";
$result2 = mysql_query($query2);
$query3 = "UPDATE users SET online = 'y' WHERE username = '$username'";
$result3 = mysql_query($query3);
session_name('Dining');
session_register('User');
session_register("Time");
sess_mgmt.php
session_start();
include "./html.php";
include "./common_db.inc";
$user = $_SESSION['User'];