Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40231 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90742 invoked from network); 3 Sep 2008 06:00:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Sep 2008 06:00:33 -0000 Received: from [127.0.0.1] ([127.0.0.1:18233]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 65/F8-33714-FF72EB84 for ; Wed, 03 Sep 2008 02:00:31 -0400 Authentication-Results: pb1.pair.com smtp.mail=hartmut.holzgraefe@sun.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=hartmut.holzgraefe@sun.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sun.com from 213.136.52.51 cause and error) X-PHP-List-Original-Sender: hartmut.holzgraefe@sun.com X-Host-Fingerprint: 213.136.52.51 mailgate-a.mysql.com Linux 2.6 Received: from [213.136.52.51] ([213.136.52.51:46119] helo=mailgate-a.mysql.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 42/38-33714-7622EB84 for ; Wed, 03 Sep 2008 01:36:40 -0400 Received: from mail.mysql.com (mailsend.mysql.com [10.100.1.123]) by mailgate-a.mysql.com (8.14.1/8.14.1) with ESMTP id m835IfYv011559 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Sep 2008 07:18:41 +0200 Received: from [192.168.23.3] (212.100.42.202.fixip.bitel.net [212.100.42.202]) (authenticated bits=0) by mail.mysql.com (8.13.3/8.13.3) with ESMTP id m835aT3t018578 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Sep 2008 07:36:29 +0200 Message-ID: <48BE225F.2000804@sun.com> Date: Wed, 03 Sep 2008 07:36:31 +0200 User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: Mangol Smith CC: PHP Internals References: <2e78f9300809022130j7ec84e90xf0ed778371c756d4@mail.gmail.com> In-Reply-To: <2e78f9300809022130j7ec84e90xf0ed778371c756d4@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] How to enable debug for my extension? From: hartmut.holzgraefe@sun.com (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