Posted by Jean Pierre Daviau on 10/15/12 11:33
Hi all and every one
Eassy php 1.7 does not seem to keep session information between pages.
======== page 1 ===================
<?
session_start();
session_register("sess_var");
$sess_var = "Hello world!";
echo "The content of \$sess_var is $sess_var <br>";
?>
It prints
The content of \$sess_var is Hello world!"
<a href = "page2.php">page 2</a>
======== page 2 ===================
<?
session_start();
$sess = $_SESSION ["sess_var"];
if($_SESSION ["sess_var"])
echo "The content of \$sess_var is $sess_var <br>";
if (!session_is_registered('compteur'))
echo "!session_is_registered <br>";
?>
prints on page 2 !session_is_registered
============= php.ini ============
session.save_handler = files
session.use_cookies = 0
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 180
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = 0
session.bug_compat_warn = 1
--
X trκme newbe
.......
masm32
windows Xp
asus p4 s533/333/133
Intel(R) Celeron (R) CPU 2.00 GHz
[Back to original message]
|