Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58322 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61670 invoked from network); 29 Feb 2012 07:59:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Feb 2012 07:59:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.42 as permitted sender) X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 209.85.213.42 mail-yw0-f42.google.com Received: from [209.85.213.42] ([209.85.213.42:59572] helo=mail-yw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/79-36673-9CADD4F4 for ; Wed, 29 Feb 2012 02:59:06 -0500 Received: by yhfq11 with SMTP id q11so1675339yhf.29 for ; Tue, 28 Feb 2012 23:59:03 -0800 (PST) Received-SPF: pass (google.com: domain of hannes.magnusson@gmail.com designates 10.101.176.6 as permitted sender) client-ip=10.101.176.6; Authentication-Results: mr.google.com; spf=pass (google.com: domain of hannes.magnusson@gmail.com designates 10.101.176.6 as permitted sender) smtp.mail=hannes.magnusson@gmail.com; dkim=pass header.i=hannes.magnusson@gmail.com Received: from mr.google.com ([10.101.176.6]) by 10.101.176.6 with SMTP id d6mr2901127anp.27.1330502343042 (num_hops = 1); Tue, 28 Feb 2012 23:59:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=lf+GoH+ro97AyC6VKFwdVq93ftbBdJFqBLiPnfEEUOo=; b=XW9Tnu0SqozhjDthSlpy/oWHhP1ujaxLz3SIw6Lv436gJmwBVmlMuKNSMOBiXuFbZI ZwZk2jMcJmu5EOZU3GshaUDJu0e/17P7zRZqiecN7xVTO1y57YpxYY+Mtzu7GQ20a4oj d2ZGDZiNtNROgdmhm2vj8MMJjzgEqom7jb1uY= MIME-Version: 1.0 Received: by 10.101.176.6 with SMTP id d6mr2242448anp.27.1330502342972; Tue, 28 Feb 2012 23:59:02 -0800 (PST) Received: by 10.147.168.4 with HTTP; Tue, 28 Feb 2012 23:59:02 -0800 (PST) In-Reply-To: <1330501833.99416.YahooMailNeo@web29504.mail.ird.yahoo.com> References: <1330464316.3034.YahooMailNeo@web29505.mail.ird.yahoo.com> <4F4D4E79.1080602@lerdorf.com> <1330501833.99416.YahooMailNeo@web29504.mail.ird.yahoo.com> Date: Wed, 29 Feb 2012 08:59:02 +0100 Message-ID: To: Christian Ferrari Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Newbie: issues developing a new extension From: hannes.magnusson@gmail.com (Hannes Magnusson) On Wed, Feb 29, 2012 at 08:50, Christian Ferrari wrote: >>> =C2=A0> Dear all, > >>> =C2=A0> I'm asking your help because I'm not able to solve an issue >> probably >>> =C2=A0related to some foolish mistake I have not yet discovered. >>> =C2=A0> I'm trying to develop an experimental extension to interface LI= XA >>> =C2=A0library (http:/lixa.sourceforge.net/). >>> =C2=A0> >>> =C2=A0> I have created the basic stuff (config.m4, lixa.c, php_lixa.h a= nd so >> on). >>> =C2=A0> >>> =C2=A0> If I use this sequence from the ext/lixa directory: >>> =C2=A0> >>> =C2=A0> /opt/php/bin/phpize >>> =C2=A0> ./configure --help >>> =C2=A0> >>> =C2=A0> I can see the lixa extension is available: >>> =C2=A0> >>> =C2=A0> [...] >>> =C2=A0> Optional Packages: >>> =C2=A0>=C2=A0 =C2=A0--with-PACKAGE[=3DARG]=C2=A0 =C2=A0 use PACKAGE [AR= G=3Dyes] >>> =C2=A0>=C2=A0 =C2=A0--without-PACKAGE=C2=A0 =C2=A0 =C2=A0 =C2=A0do not = use PACKAGE (same as >> --with-PACKAGE=3Dno) >>> =C2=A0>=C2=A0 =C2=A0--with-libdir=3DNAME=C2=A0 =C2=A0 =C2=A0 Look for l= ibraries in .../NAME rather than >>> =C2=A0.../lib >>> =C2=A0>=C2=A0 =C2=A0--with-php-config=3DPATH=C2=A0 Path to php-config p= hp-config >>> =C2=A0>=C2=A0 =C2=A0--with-lixa=3DFILE=C2=A0 =C2=A0 =C2=A0 =C2=A0 Inclu= de LIXA support. File is the path to >>> =C2=A0lixa-config >>> =C2=A0> >>> =C2=A0> [...] >>> =C2=A0> >>> =C2=A0> and I can compile with: >>> =C2=A0> >>> =C2=A0> ./configure --with-lixa=3D/opt/lixa/bin/lixa-config >>> =C2=A0--with-php-config=3D/opt/php/bin/php-config >>> =C2=A0> >>> =C2=A0> the build process runs as expected and the extension is availab= le >> after >>> =C2=A0an addition to php.ini (extension=3D[...]/ext/lixa/modules/lixa.s= o). >>> >>> =C2=A0Great, you are done. Why do you want to go any further than this?= You >>> =C2=A0built your extension and it is available from PHP exactly like an= y pecl >>> =C2=A0extension. >>> >> >> and if you're using apache, reboot it and check your phpinfo() page for >> your extension. >> if you're connected up via the command line you can run "php -m" >> to see if >> your modules exists. >> >> >>> >>> =C2=A0-Rasmus >>> > > Dear all, > I would like to see my extension as any other extension, like MySQL, Post= greSQL, Oracle and so on because: > 1. LIXA itself is useless without those resource managers > 2. I need to patch other extensions to implement the interfaces between L= IXA and MySQL/PostgreSQL/Oracle. > What's the difference between an "internal" extension (like > MySQL/PostgreSQL/Oracle) and an "external" extension as the one I > produced? > Thanks in advance, your help is precious. The PHP source archive bundles several extensions under the ext/ directory, these are the extensions are listed when you run ./configure --help I don't understand why you want your extension to show up there, but to do so you have to place your extension in that folder and run ./buildconf --force PHP will not automatically scan your filesystem for possible extension directories to list them under ./configure I'm sure you have seen, and used, http://pecl.php.net - these extensions don't show up when you build PHP. The standard way to build "external" extensions however is to use pecl, or manually build them as shared modules (as you did first). -Hannes