Ok, I have been using PhpEd since version 3 and have never touched the Debugger until now. I know, I know... what was i thinking?!?!?? So first, the debugger is simply AMAZING! dmitri, you have done an EXCELLENT job.
I'm using PhpEd (registered) v5.0.1 (build 5028) with all the defaults. The project is set up with Run Mode as System Default. I'm running the debugger locally. Everything seems to be working ok... as long as I'm on my index.php page.
When the user posts his/her username and password, if the credentials are correct, a session is started, several session keys are set and they are sent (via header->location) to a second page. If they fail, they stay on the index page. On this second page, the session is started, and then the session keys are checked. based on the values of those keys, different information is presented. When I run everything through the debugger, the session is being "lost" when I get to the second page. I've tried it using the embedded Mozilla browser, the external mozilla browser and the external IE browser. If I look in my Sessions path folder, I can see that the session was created, and that the session file contains the correct information, but I also see that it is creating a whole new session id for the second page. For some reason, it's as if, when using the debugger, the session id being sent by the browser isnt being received by the php interpreter. I have the exact same code running on my development (remote) server, and it works exactly as I expect it to (ie the session data that i set at the end of index.php is available on the 2nd page after i start the session).
I've set debugger.enable_session_cookie to ON, have "Debug Session" enabled in the debugger options, and have added
?DBGSESSID=1;d%3D1 to the header redirect, but so far, nothing seems to have worked.
Here is what phpinfo shows for the debugger's settings
Quote: |
Version 3.2.2
Linked as a shared library.
Dbg SSL not available
Dbg ip security enabled.
Profiler enabled
Target PHP version 4.4.x
Server API CGI/FastCGI
Extensions API 20050606
Modules API 20020429
PHP API 20020918 |
Quote: |
debugger.enable_session_cookie On On
debugger.enabled On On
debugger.fail_silently Off Off
debugger.hosts_allow protected value protected value
debugger.hosts_deny protected value protected value
debugger.ignore_nops Off Off
debugger.JIT_enabled Off Off
debugger.JIT_host clienthost clienthost
debugger.JIT_level 3 3
debugger.JIT_port 7869 7869
debugger.net.chunksize 48000 48000
debugger.net.maxpacketsize 4096000 4096000
debugger.ports protected value protected value
debugger.profiler_enabled On On
debugger.session_nocache On On
debugger.timeout_seconds 300 300 |
Any ideas on why I cant access my session data on subsequent pages?
My next question is more of a logistical question... I have a development server and a production server that I have access to. However, the sys admins will not install DBG on the development server for me (I work for a Uni of which there are 1000's of people on these servers). So I am having to run the debugger locally (as I mentioned above). My biggest hurdle right now is include locations for the local debugging (XP) versus remote servers (RHE4). Currently, I have my apps set so that it checks the server's ip address and if it is 127.0.0.1, points my includes to local directories, otherwise points them to the directory locations on the remote server. This way, my code is the same both locally and remotely, and I'm only having to work on one set of files.
Is there a better way to handle this? I'm sure I'm not the only one who has had found themselves in this situation, so I'm more than open to other suggestions...