Re: [PHP-DEV] How to enable debug for my extension?

2008-09-03 Thread Hartmut Holzgraefe

Mangol Smith wrote:

I'm trying to debug my extension.It says that PHP is built with debug flag,
but my not my extenison. I used --enable-debug for PHP build. But, in the
extension I wrote I can't find any configure option associated with debug in
./configure --help. I tried using the options --enable-debug and
--with-debug options, but no result. PHP is giving a startup error while
loading my extension.


the information whether to build a debug extension or not
is fetched from the PHP installation you're building
against, specifically from the ZEND_DEBUG definition in

  $prefix/include/php/main/php_config.h

Looks like you are compiling against a PHP installation
that was compiled without debug enabled and then deploying
on a system or installation that has debug features built
in.

If you have several PHP installation with different
install prefixes installed on your system you need to
specify which to use to build your extension against with

  ./configure --with-php-config=$PATH_TO/php-config

You can check whether you have the right php-config by
calling

  $PATH_TO/php-config --extension-dir

This will give you

  $prefix/lib/php/extensions/no-debug-non-zts-20071006

fror a non-debug build and

  $prefix/lib/php/extensions/debug-non-zts-20071006

for a debug one.

--
Hartmut Holzgraefe, MySQL Regional Support Manager EMEA

Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] How to enable debug for my extension?

2008-09-03 Thread Mikko Koppanen
On Wed, Sep 3, 2008 at 6:36 AM, Hartmut Holzgraefe
[EMAIL PROTECTED] wrote:
 Mangol Smith wrote:

 I'm trying to debug my extension.It says that PHP is built with debug
 flag,
 but my not my extenison. I used --enable-debug for PHP build. But, in the
 extension I wrote I can't find any configure option associated with debug
 in
 ./configure --help. I tried using the options --enable-debug and
 --with-debug options, but no result. PHP is giving a startup error while
 loading my extension.

 the information whether to build a debug extension or not
 is fetched from the PHP installation you're building
 against, specifically from the ZEND_DEBUG definition in


Hello,

You should also note that before this change
http://cvs.php.net/viewvc.cgi/php-src/scripts/phpize.m4?r1=1.17.2.3.2.5.2.3r2=1.17.2.3.2.5.2.4
the shared extension is built with optimizations even if PHP is
configured with --enable-debug.

-- 
Mikko Koppanen

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] How to enable debug for my extension?

2008-09-02 Thread Mangol Smith
Hi all,

I'm trying to debug my extension.It says that PHP is built with debug flag,
but my not my extenison. I used --enable-debug for PHP build. But, in the
extension I wrote I can't find any configure option associated with debug in
./configure --help. I tried using the options --enable-debug and
--with-debug options, but no result. PHP is giving a startup error while
loading my extension.

Any suggestions please.



--
Mangol Smith