Hi
Why does the following code allow me to keep the same session when in
the same sub domain (ie admin.localhost ), yet not when I goto another
related domain eg main.localhost?
I would like to have the same session on the related domain. I bet
the solution is really simple <grin>!...
Kind Regards
Dave.
Using IE6. Win NT, Apache 1.3.27, PHP 4.3.2.
php.ini file - shown at end of message (apologies for length).. is
actually a copy of a PHP4.3.0 ini file (problem here?)
hosts file in windows:
127.0.0.1 localhost
127.0.0.1 admin.localhost
127.0.0.1 main.localhost
httpd.conf
setup for VirtualHosts
eg
ServerName admin.localhost .com
// session_test.ph p -- located in admin.localhost
<?
session_start() ;
echo "id is " . session_id();
?>
a href="http://admin.localhost/session_test1.p hp" next
a href="http://main.localhost/session_test2.p hp" next
// session_test1.p hp -- located in admin.localhost
<?
session_start() ;
echo "id is " . session_id();
?>
// session_test2.p hp -- located in main.localhost
<?
session_start() ;
echo "id is " . session_id();
?>
php.ini relevant code:
session.save_ha ndler = files
session.save_pa th = \temp
session.use_coo kies = 1
session.name = PHPSESSID
session.auto_st art = 0
session.cookie_ lifetime = 0
session.cookie_ path = /
session.cookie_ domain =
session.seriali ze_handler = php
session.gc_prob ability = 1
session.gc_divi dend = 100
session.gc_maxl ifetime = 1440
session.bug_com pat_42 = 0
session.bug_com pat_warn = 0
session.referer _check =
session.entropy _length = 0
session.entropy _file =
session.cache_e xpire = 180
session.use_tra ns_sid = 0
Why does the following code allow me to keep the same session when in
the same sub domain (ie admin.localhost ), yet not when I goto another
related domain eg main.localhost?
I would like to have the same session on the related domain. I bet
the solution is really simple <grin>!...
Kind Regards
Dave.
Using IE6. Win NT, Apache 1.3.27, PHP 4.3.2.
php.ini file - shown at end of message (apologies for length).. is
actually a copy of a PHP4.3.0 ini file (problem here?)
hosts file in windows:
127.0.0.1 localhost
127.0.0.1 admin.localhost
127.0.0.1 main.localhost
httpd.conf
setup for VirtualHosts
eg
ServerName admin.localhost .com
// session_test.ph p -- located in admin.localhost
<?
session_start() ;
echo "id is " . session_id();
?>
a href="http://admin.localhost/session_test1.p hp" next
a href="http://main.localhost/session_test2.p hp" next
// session_test1.p hp -- located in admin.localhost
<?
session_start() ;
echo "id is " . session_id();
?>
// session_test2.p hp -- located in main.localhost
<?
session_start() ;
echo "id is " . session_id();
?>
php.ini relevant code:
session.save_ha ndler = files
session.save_pa th = \temp
session.use_coo kies = 1
session.name = PHPSESSID
session.auto_st art = 0
session.cookie_ lifetime = 0
session.cookie_ path = /
session.cookie_ domain =
session.seriali ze_handler = php
session.gc_prob ability = 1
session.gc_divi dend = 100
session.gc_maxl ifetime = 1440
session.bug_com pat_42 = 0
session.bug_com pat_warn = 0
session.referer _check =
session.entropy _length = 0
session.entropy _file =
session.cache_e xpire = 180
session.use_tra ns_sid = 0
Comment