Sessions problem with FreeBSD 4.3
| From: | Jeff Sheltren | Date: | Tue, 22 Jan 2002 23:58:13 +0000 |
| Subject: | Sessions problem with FreeBSD 4.3 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-81608@lists.php.net to get a copy of this message | ||
I am having a big problem with sessions on FreeBSD with the latest apache &
php. Basically, what is happening (as far as I can tell) is this:
I go to a page with a session variable. At this point, the session
information is written to a sess_... file in /tmp. When I click on a link,
or reload the page, a new session is started, and a new file written to /tmp
instead of using the same session information as before. The session files
are not empty, I can see they hold the variables which I set, but every time
the page is reloaded, a new session is created...
I have done a fresh install of apache 1.3.22 with php 4.1.1 as follows
(though I had the same problem with php 4.0.6):
php:
./configure --with-mysql=/usr/local/mysql --with-apache=../apache_1.3.22 --e
nable-track-vars
apache:
./configure --prefix=/usr/local/apache --enable-module=so --activate-module=
src/modules/php4/libphp4.a
... make, make install...
I have copied the php.ini-dist file to /usr/local/lib/php.ini
I saw that some people had this type of problem when they were using vhosts
with custom logging. I did have this in my httpd.conf file, but I have
since removed all the vhosts, and in fact I am using the default httpd.conf
file save a few changes (the ip, server name, uncommenting the lines for php
to work...). I have no custom logging or vhosts enabled.
Here's a sample script which doesn't work, I have also tested it with many
other scripts which work fine for me on my linux box with the same apache &
php versions...
<?php
session_start();
session_register('count');
$count++;
echo("You have visited this page $count times.");
?>
Any help or ideas would be greatly appreciated.
Thanks,
Jeff