Page 1 of 1

[SOLVED] Associative arrays crash PHP 5.1.2 APD+Xdebug

Posted: Wed Apr 05, 2006 4:15 pm
by Ambush Commander
I have this code on my page:

Code: Select all

echo "<li><a href=\"$WEBPATH/$LANG/$value\"{$active}>{$STRINGS['Menu'][$value]}</a></li>";
For some reason, PHP 5.1.2 with APD pukes on it (like, process level termination). Remove APD, and we're fine. Switch to PHP4 and we're fine too. Why???

Posted: Wed Apr 05, 2006 4:22 pm
by Ambush Commander
Hmm... XDebug and APD are clobbering each other. var_dump($STRINGS['Menu']) also sets off the error.

Posted: Wed Apr 05, 2006 4:23 pm
by Ambush Commander
XDebug seems to have ceased working in PHP5 too. Well, scratch that, SOLVED.

Posted: Wed Apr 05, 2006 4:29 pm
by feyd
I've got XDebug working in 5.1.2 just fine. :?

Posted: Thu Apr 13, 2006 8:39 am
by Ambush Commander
(back from vacation, sorry if this is an old thread) Well, I'm running Windows, so I have to use the precompiled version. Running from CVS?

Posted: Thu Apr 13, 2006 9:19 am
by feyd
After some screwing around, APD did start crashing Apache (consistently) although var_dump() always worked for me.

Posted: Thu Apr 13, 2006 9:21 am
by Ambush Commander
Well, it was really more the var_dumping of arrays. var_dump('a string'); worked.

Posted: Thu Apr 13, 2006 9:24 am
by feyd
I was able to var_dump anything and everything.

Posted: Thu Apr 13, 2006 10:42 am
by Ambush Commander
Here are some test results:

Code: Select all

; PHP 5.1.2, no XDebug
extension = php_apd.dll ; pecl4win 5.1.2 compile, shows up as 1.0.2-dev
apd_set_pprof_trace() works like a charm.

Code: Select all

; PHP 5.1.2
extension = php_apd.dll
zend_extension_ts = C:\php\5.1.2\ext\php_xdebug.dll ; pecl4win 5.1.2 compile, shows up as 2.0.0rc1-dev
XDebug registers in phpinfo(); FastCGI crashes on code involving ASSOCIATIVE ARRAYS (i.e. Hashes):

Code: Select all

$array = array('asdf');
echo $array[0];
... doesn't crash, but:

Code: Select all

$array = array('asdf' => 'asdf');
echo $array['asdf'];
does crash. var_dump, however, works in all its colorized glory, as does error stack traces.

Code: Select all

; PHP 5.1.2, no APD
zend_extension_ts = C:\php\5.1.2\ext\php_xdebug.dll ; pecl4win 5.1.2 compile, shows up as 2.0.0rc1-dev
XDebug works, associative arrays work. No profiling.

It IS clobbering, after all! :?

Posted: Thu Apr 13, 2006 10:52 am
by Weirdan
http://xdebug.org/install.php wrote: COMPATIBILITY

Xdebug does not work together with the Zend Optimizer or any other Zend extension (DBG, APC, APD etc). This is due to compatibility problems with those modules. We will be working on figuring out what the problems are, and of course try to fix those.

Posted: Thu Apr 13, 2006 10:53 am
by Ambush Commander
Whee. Well, that was stupid of me. I guess having it work for PHP4 made me forget about that disclaimer.