Posted by dpinion@gmail.com on 07/18/07 19:11
Greetings,
I am trying to do some simple session stuff. However it does not seem
as though the session variable is being created for my site. I am
running the latest version of PHP and apache that I installed as part
of WAMP. Machine is XP SP2.
Basically I am trying to do something simple such as:
<?php
// initialize a session
session_start();
// increment a session counter
$_SESSION['counter']++;
// print value
echo "You have viewed this page " . $_SESSION['counter'] . " times";
?>
However my counter does not increment. I can also not see where any
sort of cookie has been created within IE, although firefox shows the
following:
Name: PHPSESSID
Content: 4s0n98f1s7jea6kg11psi4ckd3
Host: 10.0.0.15
Path: /
Send for: Any type of connection
Expires: at end of session
I am not sure about the Path: variable though. The address for my site
is 10.0.0.15/recipe
physical is C:\wamp\www\recipe
Here are some of the contents of my php.ini file:
[Session]
session.save_handler = files
session.save_path = "C:\Windows\temp "
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
Any suggestions would be greatly appreciated!
[Back to original message]
|