dbg-cli and error 98 |
|
Hi to all,
I'm using the DBG Debugger on my local machine and it works wonderfully, except for a little snag. I'm just interested in the profiler information, so I adopted the solution reported a while ago here in this forum (howto-get-results-from-dbg-get-profiler-results-t1848.html). the shell-script which starts the dbg-cli program in a while loop and the ~/.dbgcli_init is as the article in the above posted link. But if I start this script, the first time it works, but after reloading the page, it gives me the following error:
Can anyone explain me what happens and how this error can be avoided? Thanks in advance, Daniel |
||||||||||||||
|
|
Hi,
I use the following shell script to run dbg-cli
Theoritically after every time dbg-cli listen, it quits, the loop starts again and the previous started process should be killed. I've noticed that it behaves always different. Sometimes it fails after the first cycle, sometimes after the nth cycle of the loop. bye, Daniel |
||||||||||||||
|
Site Admin
|
run
netstat -naop|grep 7869 (substitute 7869 to port number you're using for dbg communications) and check the output to see if port is in use and what process (pid) uses it. BTW, a) what's the purpose of your script? What do you need to achieve? b) check keep-alive setting for Apache to make sure keep-alive interval is short enough. |
||||||||||||
|
|
This is the output of the netstat program, while the dbg-cli was giving the error.
tcp 0 0 0.0.0.0:7869 0.0.0.0:* LISTEN 1 2266/dbg-cli aus (0.00/0/0) So, if I'm not wrong, a previous started dbg-cli is listening but it should not listen. I am interested in looking at the profiler information of the running script (in order to optimize it). I've found a topic in this forum (howto-get-results-from-dbg-get-profiler-results-t1848.html) about a way of doing it, and I've adopted it. Maybe it is not the best way do it, but if the error wouldn't encounter, it would work. Is there a way to do it in another way? I'm just interested in the profiler data. Thanks for your reply, Daniel |
||||||||||||
|
Site Admin
|
While dbg-cli listens no other dbg-cli instances can listen until the first one stops.
Effectively it means that there is no problem with dbg-cli and you got two dbg-cli instances running concurently. |
||||||||||||
|
|
This seems to be a bug between 2.13.1 and 2.15.5 of the debugger. The problem happens with 15 but not with 13.
I manged to get 2.13 to compile and it works fine. I had to modify line dbg_ser as follows for php 5.2.2: --- org/dbg_ser.c 2007-08-23 03:16:19.000000000 -0400 +++ dbg-2.13.1/dbg_ser.c 2007-08-23 03:08:15.000000000 -0400 @@ -45,11 +45,12 @@ ulong index; char *key; int cnt = 0; + uint len; zend_hash_internal_pointer_reset_ex(ht, &pos); while (zend_hash_get_current_data_ex(ht, (void **) &tmp, &pos) == SUCCESS) { cnt++; - switch (ZEND_HASH_GET_CURRENT_KEY_EX(ht, &key, NULL, &index, &pos)) { + switch (ZEND_HASH_GET_CURRENT_KEY_EX(ht, &key, &len, &index, &pos)) { case HASH_KEY_IS_LONG: MAKE_STD_ZVAL(d); d->type = IS_LONG; @@ -69,7 +70,7 @@ #else if (Flags & DSER_DEMANGLE) { char *propname, *classname; - zend_unmangle_property_name(key, &classname, &propname); + zend_unmangle_property_name(key, len-1, &classname, &propname); Z_STRVAL_P(d) = propname; Z_STRLEN_P(d) = strlen(propname); } else { |
||||||||||||
|
Site Admin
|
What you changed is serializer. It's responsible for sending values back to the client and is not used by the listener at all.
|
||||||||||||
_________________ The PHP IDE team |
dbg-cli and error 98 |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by