[mapserver-users] MapScript with PHP --enable-debug?
Daniel Morissette
morissette at dmsolutions.ca
Mon Nov 25 17:16:23 PST 2002
Dylan Keon wrote:
>
> I recompiled PHP 4.2.3 with --enable-debug, then compiled MS 3.7 against
> it, but can't run the MapScript module:
>
> Warning: MapScript: Unable to initialize module Module compiled
> with module API=20020429, debug=0, thread-safety=0 PHP compiled
> with module API=20020429, debug=1, thread-safety=0 These options
> need to match in /www/gis/phpinfo_mapscript.php on line 12
>
> The MapScript module should indicate debug=1 since it was compiled
> against PHP where debug was enabled, right? Compiling MapServer itself
> with or without --enable-debug makes no difference. I need
> --enable-debug compiled into PHP so that I can use gdb to generate a
> backtrace, unless someone knows another way to do this. I'm following
> the instructions at http://bugs.php.net/bugs-generating-backtrace.php.
>
PHP MapScript doesn't try to detect whether PHP was compiled in debug or
non-debug mode. It just assumes non-debug all the time. If you would
like this to change eventually then please file a enhancement bug in
bugzilla.
In the meantime, you'll find in php_mapscript.c the following lines
(around line 250):
#ifdef PHP4
#define ZEND_DEBUG 0
#endif
Try setting ZEND_DEBUG to 1 and recompile. I haven't tried this
recently but it may do what you want.
Daniel
--
------------------------------------------------------------
Daniel Morissette morissette at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
More information about the MapServer-users
mailing list