php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19357 sessions not working
Submitted: 2002-09-11 09:50 UTC Modified: 2002-10-14 19:26 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:1 (33.3%)
From: jon at snoopy dot net Assigned:
Status: No Feedback Package: Session related
PHP Version: 4.2.3 OS: FreeBSD 4.5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jon at snoopy dot net
New email:
PHP Version: OS:

 

 [2002-09-11 09:50 UTC] jon at snoopy dot net
calling session_start() produces no error, but no sess_* files are written to /tmp and no cookie is sent to the browser.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-11 09:53 UTC] kalowsky@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2002-09-11 09:59 UTC] jon at snoopy dot net
Explain to me what else I can tell you?

You can view the php.ini settings at http://snoopy.net/phpinfo.php.

If I call session_start(), there's no cookie, no session tmp files written, nothing, but php also produces no error.

No matter how I change the settings in php.ini, it doesn't change this behavior.
 [2002-09-11 10:00 UTC] jon at snoopy dot net
You can view the code I'm trying at:

http://anhold.com/ps/ses/index.phps
http://anhold.com/ps/ses/foo.phps
 [2002-09-11 10:09 UTC] kalowsky@php.net
How are you checking that the cookie is or is not being set?
 [2002-09-11 10:23 UTC] jon at snoopy dot net
I set my browser (galeon/moz1.0) to warn me of cookies, and it's not warning me. (It is on other sites, or if I manually set a cookie with php)
 [2002-09-11 10:33 UTC] sniper@php.net
reclassified.

 [2002-09-11 10:34 UTC] kalowsky@php.net
Your samples work just fine for me on FreeBSD 4.6 and PHP 4.2.3... 

Are your permissions setup properly for the session to write to?
 [2002-09-11 10:36 UTC] jon at snoopy dot net
sorry, i could've sworn there was no "Session" category...
 [2002-09-11 10:37 UTC] sniper@php.net
Do you have any errors in the logs?

 [2002-09-11 10:38 UTC] jon at snoopy dot net
drwxrwxrwt  5 root  wheel  5632 Sep 11 10:45 /tmp/

Everything else can write to /tmp..
 [2002-09-11 10:39 UTC] jon at snoopy dot net
No, nothing in the logs.
 [2002-09-11 10:40 UTC] sniper@php.net
please make sure the category STAYS correct..

 [2002-09-11 10:59 UTC] jon at snoopy dot net
I tried changing session.save_path to something other than /tmp owned by the user which apache runs under (www), with no change in behavior. 

If I can find some decent mysql session handler code, i may try that to see if it works.

i've verified that cookies work..
http://anhold.com/cookie.php

-j
 [2002-09-11 12:48 UTC] jon at snoopy dot net
there's nothing being logged... how do I get debugging information out of php4?
 [2002-09-19 13:08 UTC] kalowsky@php.net
configure php with the --enable-debug flag
 [2002-09-19 13:21 UTC] kalowsky@php.net
Still convinced this a local install issue, and not a PHP issue as I cannot reproduce this bug on a FreeBSD 4.6 and 4.2.3 installation.  Have you had any luck getting it to work on your end?
 [2002-09-19 13:23 UTC] jon at snoopy dot net
Built with --enable-debug doesn't produce any more information that without it.. nothing in the log.

Installing php 4.1.2, everything works fine. Reinstall 4.2.3, no sessions.
 [2002-09-22 23:03 UTC] gharding at oktobor dot com
yes, I'm just going to say 'me too' - (and I voted etc.) but thought that I'd say that I'm using win32/php4.2.3/apache2.0.40 and no matter what happens there are no cookies sent to the browser at any time whether there is an auto or manually started session, and that sessions (obviously) do not work using cookies.

I've tried changing all sorts of settings, including the safe modes, temp directories etc. - the old versions I had experienced trouble as well (sometimes working then stopping for no reason, then never going again) but I got around it using autostarted sessions etc. 

4.2.3 does not go for me at all
4.2.2 took some doctoring to go, eventually stopped
4.1.1 took some doctoring to go, eventually stopped
4.0.6 worked ok from what I remember

cheers for any fixes etc. and for your hard work on php :)
 [2002-09-22 23:27 UTC] gharding at oktobor dot com
...and as if by magic, php4.2.3 starts sending cookies to the browser...

but sessions are still not working. If the cookie exists on the browser I assume its getting sent correctly to php (old code works, cookie tests I did worked fine), so its somewhere in the apache/php side that things are getting messed up from my uneducated observations.
 [2002-09-22 23:35 UTC] gharding at oktobor dot com
...and you guessed it, sessions now come to life after a few restarts and head slaps.

This behaviour is consistent with previous versions and some bug reports I've read trying to find out why sessions weren't working - there are reports on win32 that sessions just stop one day and never go again (I've had this) - altho it appears with this version they suddenly start.

It still appears (after a few restarts) that they are a bit temperamental, sometimes going and sometimes not...

cheeers for reading my ramblings - good luck!
 [2002-09-25 07:35 UTC] sas@php.net
If session files are not even created, I suggest using truss(1) like this:

$ killall httpd
$ truss httpd -X 2> logfile
<..access a page which starts a session..>
<..hit ctrl-c..>

And then look for failed open() calls in the logfile..
 [2002-10-14 19:26 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 03:01:28 2024 UTC