NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
losing session data while debugging (dbg-2.11)


Joined: 17 Sep 2005
Posts: 3
Reply with quote
While debugging a fairly large today I ran into a strange problem: it seems that PHP forgets about the data I stored in a session when I try to debug the scripts with DBG v2.11.32 in combination with VS.php.

The project is login-protected. A click on submit redirects me to the secured area of the project (due to a function called "append_dbg()" which I wrote). However, even though the DBGSESSID parameter is appended to all links inside the secured area I get redirected to the login page when I try to access one of the subpages. Debugging the page shows that $_SESSION is set after login, but not set after clicking on one of the links to a subpage. I would like to point out that the whole page works fine when running it in normal mode, the session-data only gets lost in debug mode.

Since I don't know on which side the problem might appear (VS.php's or DBG's) I decided to post the bug report on both forums.

I have uploaded a script to reproduce this behaviour, including the phpinfo output to:

http://mywebsite/dbgtest.rar
View user's profileFind all posts by daehlithSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7857
Reply with quote
Php session handling depends on HTTPs cookies. If you get lost sessions, it means that php session cookies are lost.
To identify the problem, just add phpinfo() function call to the script that loads first after the login (it's where you submit your login data to).
If you're using an IDE with embedded browser, it may be a source of the problem then.

You may want to give PhpED v4 with dbg 2.18.5 a try. They are known keep such cookies well enough Smile
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 17 Sep 2005
Posts: 3
Reply with quote
Thanks for all the help, you were correct that it must be a probem with the http-headers. I handed this bug report on to vs.php developers, hopefully it gets fixed.

PS: VS.php was chosen over PHPed for two reasons - first of all, at our company we do only a few PHP projects, usually C++ using Visual Studio. This meant we preferred an IDE which can be easily integrated into VS. Secondly, the price where vs.php is a lot cheaper.
View user's profileFind all posts by daehlithSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7857
Reply with quote
I thought that people prefer to use software that works.
Sorry if I was wrong.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
losing session data while debugging (dbg-2.11)
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic