Session call not creating file in session_save_path - perms? (newbie)
| From: | Robert Erbaron | Date: | Thu, 13 Dec 2007 05:27:24 +0000 |
| Subject: | Session call not creating file in session_save_path - perms? (newbie) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-265825@lists.php.net to get a copy of this message | ||
OK, I've read every message on the list for the last year that contains
'sessions'. I've read through (bleary eyed, admittedly)
http://us2.php.net/session. And I swear, honest, that I had
this working on
another box (which is no longer available to me.) I've checked phpinfo -
session support is on, session.use_cookie is On. PHP 5.1.6 or thereabouts.
<?php session_start();
session_save_path('/home/rob//Sites/zphpsessions');
echo 'sessionid:'.session_id().':<br>';
echo 'save path:'.session_save_path().':<br>';
$ip = ' '.$_SERVER['REMOTE_ADDR'];
echo '$ip is:'.$ip.':<br>';
$_SESSION['ipx']=$ip;
echo 'ipx (session) is:'.$_SESSION['ipx'].':<br>';
if (!isset($_SESSION['ipx'])) echo 'whoa nelly';
echo 'This is the main page';
?>
Output looks like this:
sessionid:8klvud4o186lme7n6v84lhfjl2:
save path:/home/rob/Sites/zphpsessions:
$ip is: 127.0.0.1:
ipx (session) is: 127.0.0.1:
This is the main page
No data is being dumped into /home/rob/Sites/zphpsessions. The best I can
guess is permissions. If I change save_path to /tmp, no difference - still
nothing being written there. I bet I'm doing something ignorant about apache
users or something, huh?
--
RE, Chicago