1
zeekoe
PHPSESSID sometimes in cookie, sometimes in get, for no apparent reason
  • 2007/8/4 13:40

  • zeekoe

  • Just popping in

  • Posts: 2

  • Since: 2007/8/2 2


I'm trying out XOOPS 2.0.16 and writing some homemade custom modules for it. Now I have a really strange problem: sometimes the PHPSESSID is stored into a cookie, and sometimes in the get variable (which means I can't do anything, at least not admin things). When I say sometimes, I really mean sometimes. I tried tracking down where the problem is, but sometimes even with the same code and the same database, it drives me crazy. I did quite a bit of searching, but because I don't know how to define my search exactly, I couldn't find it, and most topics are about other problems.
It can't be that headers are already sent, because then the same code would fail always, wouldn't it? (and it does not give any errors at all)
Now I have this:
online webhost, all browsers: $_GET session
localhost, firefox: $_GET session
localhost, opera: $_COOKIE session (and I'm not going to try to log out yet, because I think it will switch to $_GET too)
And this is just the current situation, it can easily be the other way around.

I tried adding session_start() and some more of the code on top of index.php, but it didn't work.
Local: Apache/1.3.34, php 4.x-something, on the webhost there's Apache/2.0.51, I think also php 4.

It can't be that I'm the only one with this problem? Is there a way to start my session on top of everything and make use of it later?

2
zeekoe
Re: PHPSESSID sometimes in cookie, sometimes in get, for no apparent reason
  • 2007/8/4 13:52

  • zeekoe

  • Just popping in

  • Posts: 2

  • Since: 2007/8/2 2


Hm, found the problem after enabling debug mode. It seems that XOOPS catches all debug information, so that was why I wasn't seeing anything of it before. The problem was some extra carriage returns after two included files.

Login

Who's Online

757 user(s) are online (72 user(s) are browsing Support Forums)


Members: 0


Guests: 757


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits