NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Wrong session request passed


Joined: 03 Jan 2004
Posts: 4
Reply with quote
Hi,

When using dbg-2.11.23-src and dbg-cli-2.11.0
I get this error:

Wrong session request passed

This is the complete log of the session

dbg>set mapremoteroot /infocentral/
dbg>set mapremoteroot /opt/church/htdocs/
dbg>set maplocalroot /opt/church/htdocs/
dbg>file /opt/church/htdocs/infocentral/test.php
Reading symbols from /opt/church/htdocs/infocentral/test.php...done.
dbg>run

Program exited.
Wrong session request passed
Program is not being run.
dbg>

I know that dbg is accessible via php because when I call phpinfo()
I get this:

<h2><a name="module_dbg">dbg</a></h2>

<table BORDER=1 CELLPADDING=3 CELLSPACING=0 WIDTH=600 BGCOLOR=#33CCFF ALIGN="CENTER"><tr VALIGN='MIDDLE' ALIGN='CENTER'><td><b><a HREF='http://www.nusphere.com/dbg' STYLE='color: #660880;'>DBG php debugger, version 2.11.23, Copyright 2001, 2002, Dmitri Dmitrienko, www.nusphere.com/dbg</a></b></td></tr></table><br>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">Version </td><td class="v">2.11.23 </td></tr>
<tr><td class="e">Linked </td><td class="v">as a shared library. </td></tr>
<tr><td class="e">Profiler </td><td class="v">compiled, enabled </td></tr>
</table><br />

<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
<tr><td class="e">debugger.enable_session_cookie</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">debugger.enabled</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">debugger.fail_silently</td><td class="v">On</td><td class="v">On</td></tr>

<tr><td class="e">debugger.ignore_nops</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">debugger.JIT_enabled</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">debugger.JIT_host</td><td class="v">clienthost</td><td class="v">clienthost</td></tr>
<tr><td class="e">debugger.JIT_level</td><td class="v">3</td><td class="v">3</td></tr>
<tr><td class="e">debugger.JIT_port</td><td class="v">7869</td><td class="v">7869</td></tr>

<tr><td class="e">debugger.profiler_enabled</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">debugger.session_nocache</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">debugger.timeout_seconds</td><td class="v">300</td><td class="v">300</td></tr>
</table><br />

What must be done to get this to work ?

Thanks in advance
View user's profileFind all posts by tomwermanSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
recompile dbg-2.11.23 with dbg_net.c/dbg_net.h from dbg-cli
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Jan 2004
Posts: 4
Reply with quote
Unfortunately it still fails with the same error.
When opening up the page
( http://hal/infocentral/test.php?DBGSESSID=1 )
with mozillla, nothing stops.
How should DBGSESSID be passed bringing up the php page ?
View user's profileFind all posts by tomwermanSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
DBGSESSID has a different syntax. Please have a look at FAQ topic in the PHPED forum.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Jan 2004
Posts: 4
Reply with quote
My mistake. I thought that the apache process would be the listener
but it appears that the client starts a listener then the apache process
connects to it. In that case, the problem appears to be
entirely with the client. What must be done in order for the cliient
to successfully start the listener ?
View user's profileFind all posts by tomwermanSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Listener can be started manually (DbgListener.exe under Windows) or by IDE (e.g. PHPEd).
Should be noted that under Linux, PHPEd runs the listener when you start your debugging code in the IDE.
In all cases, if you run your code from inside the IDE it adds DBGSESSID automatically, so you don't need to add it yourself. There are very few cases when you need to add DBGSESSID, for example if you want to start debug session with a page that is resulted from a POST with data entered in browser.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Jan 2004
Posts: 4
Reply with quote
How is it possible to start the listener on linux using dbg-cli ?
View user's profileFind all posts by tomwermanSend private message


Joined: 11 Jan 2004
Posts: 3
Reply with quote
I'm also having the same problem (Wrong session request passed ) with dbg-cli.

everything seems to compile and install fine, php_info checks out.

Red Hat 9.0, php 4.3.4

DBG php debugger, version 2.11.0, Copyright 2000, 2003, Dmitri Dm....
ddbg>set mode on
dbg>set mapurlroot http://myserver
dbg>set mapremoteroot /home/httpd/di/
dbg>set maplocalroot /home/httpd/di
dbg>file /home/httpd/di/dbgchk.php
Reading symbols from /home/httpd/di/dbgchk.php...done.
dbg>run


Program exited.
Wrong session request passed
Program is not being run.

The only line in dbgchk.php is
<? phpinfo() ?>
View user's profileFind all posts by eway_billwSend private message


Joined: 15 Jan 2004
Posts: 1
Reply with quote
I'm also having the same problem. I tossed dbg-cli under gdb, however, and found that the cause is in the routine UrlParse(), specifically that the call to regexec() (a library routine that uses a regular-expression template to split the URL string into its component parts) is returning 1, which means the routine thinks the URL string is not formatted correctly.

However, I got this error return even with the standard-example set of startup commands (with 2 trival modifications):

Code:
set mode on
set mapurlroot http://localhost/
set mapremoteroot /usr/local/apache/htdocs/
set maplocalroot /usr/local/apache/htdocs/
file /usr/local/apache/htdocs/phptest.php
run


At this point I'm stuck. Google doesn't point out any obvious gotchas for regexec(), and since it's a glibc routine, I strongly suspect -- and certainly hope -- that the problem is not in the routine itself. I tried updating the machine's glibc package to the very latest build (I already had the latest version), but that didn't change anything.

System setup:

    RH 9
    dbg-2.11.23 and dbg-cli-2.11.0, both built from source against php-4.3.4
    glibc-2.3.2-98, used to be 2.3.2-27.9.7, which is current RH9 version


Anyone have any ideas?...
View user's profileFind all posts by harryuSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I know about this problem with regexp and do not know how to solve it.
While everything works _fine_ when compiled using gcc 2.9x, it seg faults when compiled using gcc 3.x

As far as I see the problem is in regexp that modifies stack for caller procedure and when it returns it simply crashes.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 15 Feb 2004
Posts: 3
Reply with quote
ddmitrie wrote:
I know about this problem with regexp and do not know how to solve it.
While everything works _fine_ when compiled using gcc 2.9x, it seg faults when compiled using gcc 3.x

As far as I see the problem is in regexp that modifies stack for caller procedure and when it returns it simply crashes.


Do you think you could post a precompiled version somewhere, then?
View user's profileFind all posts by volkrisSend private messageAIM Address
Solution for the problem


Joined: 30 Mar 2004
Posts: 1
Reply with quote
I also have RedHat 9 with gcc 3.2.2 and got this problem.

I decided to try building dbg-cli using a portable posix regexp package to see if it would work around it, and chose pcre. Guess what! It turns out that dbg-cli already uses an old version of pcre, 4.3, while the current version is 4.5. Substituting the source files from pcre 4.5 did not help.

I replaced the #includes of pcre.h and pcreposix.h in UrlParse.cpp with #includes of <sys/types.h> and <regex.h>, then commented out the references to pcre in Makefile and dbg/Makefile. That was enough to get dbg-cli to compile and link with the installed regex package in glibc, and it all worked.

Do remember that the default port in dbg-cli is 10001 so if php.ini sets it to 7869 as in a lot of the examples, you have to also do a set port 7869 in dbg-cli.
View user's profileFind all posts by sidneySend private message
Wrong session request passed
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 2  

  
  
 Reply to topic