Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21838 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49390 invoked by uid 1010); 10 Feb 2006 18:01:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 49375 invoked from network); 10 Feb 2006 18:01:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Feb 2006 18:01:39 -0000 X-Host-Fingerprint: 213.136.52.68 mailgate-out2.mysql.com Linux 2.5 (sometimes 2.4) (4) Received: from ([213.136.52.68:42070] helo=mailgate.mysql.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 46/AA-35443-105DCE34 for ; Fri, 10 Feb 2006 13:01:37 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate.mysql.com (8.13.4/8.13.4) with ESMTP id k1AI1UTV013967; Fri, 10 Feb 2006 19:01:30 +0100 Received: from mail.mysql.com ([10.222.1.99]) by localhost (mailgate.mysql.com [10.222.1.98]) (amavisd-new, port 10026) with LMTP id 12842-03; Fri, 10 Feb 2006 19:01:30 +0100 (CET) Received: from [10.100.88.6] (10-100-88-6.mysql.internal [10.100.88.6]) by mail.mysql.com (8.13.3/8.13.3) with ESMTP id k1AI1OOp014450; Fri, 10 Feb 2006 19:01:27 +0100 Message-ID: <43ECD4EE.2020903@php.net> Date: Fri, 10 Feb 2006 19:01:18 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060130 SeaMonkey/1.0 MIME-Version: 1.0 To: Andrew Mather CC: internals@lists.php.net References: <00d601c62e50$2b3f7c00$ca5f8a51@VaioCen> In-Reply-To: <00d601c62e50$2b3f7c00$ca5f8a51@VaioCen> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mailgate.mysql.com Subject: Re: [PHP-DEV] Dead C Scrolls - Missing Code for Writing New Extensions without recompiling PHP From: hartmut@php.net (Hartmut Holzgraefe) Andrew Mather wrote: > i) a walkthrough of the exact steps + sample code to write an extension without > requiring re-compilation of Php and without access to Php source code maybe its time for a shameless plug one more time: http://pear.php.net/package/CodeGen_PECL/docs this approach will shield you from autoconf/make details as much as possible, it will also generate windows VS 6.0 .dsp project files, too > ii) as above but with access to Php source code its not mentioned in the above docs, but compiling the generated extension code staticly into PHP just requires these simple steps: - place the generated code directory into PHPs ext/ directory - run buildconf (in the top level src directory) - if you've already built php from this source tree before do config.nice ...any-options-specific-to-your-extension else extract the configure string for the current php installation from "php -i" output, re-use this configure line and add your extensions options to it - make - optional: make test - make install (may require sudo) > iii) as above (either i or ii) but with instructions to allow the project to be initiated > and compiled within the KDE development environment i don't know / use Kdevelop, but i'm pretty sure that it allows to integrate standard unix projects based on configure/make ... > Resulting object (presumably .so) to be accessible in a distribution release of Apache/Php > with only minor modification of a client's Apache/Php config settings. using CodeGen_PECL you'll get a full self contained extension project, including a package.xml file suitable for automatic installation using the pear installer -- Hartmut Holzgraefe, Senior Support Engineer . MySQL AB, www.mysql.com