Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58350 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87360 invoked from network); 29 Feb 2012 21:06:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Feb 2012 21:06:57 -0000 Authentication-Results: pb1.pair.com header.from=camauz@yahoo.com; sender-id=unknown; domainkeys=good Authentication-Results: pb1.pair.com smtp.mail=camauz@yahoo.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain yahoo.com from 212.82.109.192 cause and error) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: camauz@yahoo.com X-Host-Fingerprint: 212.82.109.192 nm24-vm1.bullet.mail.ird.yahoo.com Received: from [212.82.109.192] ([212.82.109.192:37658] helo=nm24-vm1.bullet.mail.ird.yahoo.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/88-46815-F639E4F4 for ; Wed, 29 Feb 2012 16:06:56 -0500 Received: from [77.238.189.53] by nm24.bullet.mail.ird.yahoo.com with NNFMP; 29 Feb 2012 21:06:52 -0000 Received: from [212.82.108.246] by tm6.bullet.mail.ird.yahoo.com with NNFMP; 29 Feb 2012 21:06:52 -0000 Received: from [127.0.0.1] by omp1011.mail.ird.yahoo.com with NNFMP; 29 Feb 2012 21:06:52 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 339404.61973.bm@omp1011.mail.ird.yahoo.com Received: (qmail 50816 invoked by uid 60001); 29 Feb 2012 21:06:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1330549612; bh=fE/J8xaic/sXtIj/zwexUvIlMGWuMFRROXbK84GAT7U=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Dpla7tCPV/z8zIuNuL3GiNRux605HSIoO+lw9jLwQyDmb7dDJ3RjkmBo3ED7ENfHF9xNQQanjevjhqcEvGLEuXyeX5zCMD5Jez+d/Ehct7o11DBpL/qurBIYpiY2Z8WwW67fHCw1s5ilZ56VtVkFHxgZNlZ4iaTVaAj2Njh5soI= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=oSrZsi/CeTQZMjesuoWBWa3707V+BQHls0g9Fly/VWd0SSz0d0tf/7JZfhPcGQHYu4gjJMbHFTM1w/j2TrleLg0mlFh+0rWV2MrfZTRlfrVggMLxwYW9N6+cu2ejWns5w+Rf6I35QHFWD5RIygO6xcCMTUXTaHDBu1u9nChLt54=; X-YMail-OSG: aceGVCEVM1kgKoEDKeI36VEVgkfd8c781pQVc_7Q3KPqvNS EvCmpiKQW.tCkbK3tfURNS18qnKRZGqKJxmpowYKP5igAEC4arou4l6ymS5v 0i_NJYVq.JnFMfsmLEXJv2kYekEG4Of7hZ3EYYhAys8wOTJOSXOAQu_9MB0j EJX1kYak8jTu_Hzj68v5kjBeUpE25HgXePfSpbKjG1ZJ0WvX95F6Vbxv6xgm XCwCvmefy0ZIx1DG6pxWN6aqM_adxUDtSfbZZKsDbSXcuz_tthyoPLvy1Xtj jjb6d5qO6z6MhUoyx6VNfny0Ww0ZX0bhElRnZE2miknbD5m2sGcwfJER7tUb CRCbps69F6u93o_CMBw0c9qXgdSoJ5N8s2uOvFFt.vtjDZDvzMTRzctL0zpg ScrJvlubk2Dbq12.z1gfDKEa7dl1Qa39.pQA9Z_ME_t4KqhMyBFrF3crUcV7 eSHBjgBkyoc4VHqGtfj2pzlXY6qaF4RtCJHc5h8t59X4_hUi.6CzTx8DspMU WQQKimQn4frfAFqw.4EA1i1qipWxfI6ZxpmMWEi_7uR9B9JW5n6yQ3qh9IgX QeFFxli3dEs0lSh.PBsFPwLHomM3Kt2bVHatAeEL5TICrz8epQCtwFKqX.0Y 202uPQxxEgEhM63Dxk6glP4Ux7BeM0QgK3Xd1_eWDLxNxOqq1O66v3KayBI0 8cqEcttJ86TnuNRWV48nuc8Qxwfwz3oETsZ48qQ-- Received: from [151.95.31.79] by web29501.mail.ird.yahoo.com via HTTP; Wed, 29 Feb 2012 21:06:52 GMT X-Mailer: YahooMailWebService/0.8.116.338427 References: <1330464316.3034.YahooMailNeo@web29505.mail.ird.yahoo.com> <4F4D4E79.1080602@lerdorf.com> <1330501833.99416.YahooMailNeo@web29504.mail.ird.yahoo.com> <1330502673.12982.YahooMailNeo@web29506.mail.ird.yahoo.com> <1330508863.61296.YahooMailNeo@web29501.mail.ird.yahoo.com> Message-ID: <1330549612.48948.YahooMailNeo@web29501.mail.ird.yahoo.com> Date: Wed, 29 Feb 2012 21:06:52 +0000 (GMT) Reply-To: Christian Ferrari To: "internals@lists.php.net" Cc: "jpauli@php.net" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Newbie: issues developing a new extension From: camauz@yahoo.com (Christian Ferrari) >> >>>>>=A0 =A0 > Dear all,=0A=0A>> =0A>> >=0A>> >>>=0A>> >>>>>=A0 =A0 = > I'm asking your help because I'm not =0A> able to=0A>> > solve an=0A>> = >>=A0 issue=0A>> >>>>=A0 probably=0A>> >>>>>=A0 =A0 related to some fool= ish mistake I have not yet =0A> discovered.=0A>> >>>>>=A0 =A0 > I'm trying= to develop an experimental =0A> extension to=0A>> >>=A0 interface LIXA=0A= >> >>>>>=A0 =A0 library (http:/lixa.sourceforge.net/).=0A>> >>>>>=A0 =A0 = >=0A>> >>>>>=A0 =A0 > I have created the basic stuff (config.m4, =0A> lixa= .c,=0A>> > php_lixa.h=0A>> >>=A0 and so=0A>> >>>>=A0 on).=0A>> >>>>>= =A0 =A0 >=0A>> >>>>>=A0 =A0 > If I use this sequence from the ext/lixa =0A= > directory:=0A>> >>>>>=A0 =A0 >=0A>> >>>>>=A0 =A0 > /opt/php/bin/phpize= =0A>> >>>>>=A0 =A0 > ./configure --help=0A>> >>>>>=A0 =A0 >=0A>> >>>>>= =A0 =A0 > I can see the lixa extension is available:=0A>> >>>>>=A0 =A0 >= =0A>> >>>>>=A0 =A0 > [...]=0A>> >>>>>=A0 =A0 > Optional Packages:=0A>> >= >>>>=A0 =A0 >=A0 --with-PACKAGE[=3DARG]=A0 =A0 use PACKAGE =0A> [ARG=3Dyes= ]=0A>> >>>>>=A0 =A0 >=A0 --without-PACKAGE=A0 =A0 =A0 do not use PACKAGE= =0A> (same as=0A>> >>>>=A0 --with-PACKAGE=3Dno)=0A>> >>>>>=A0 =A0 >=A0 = --with-libdir=3DNAME=A0 =A0 =A0 Look for libraries =0A> in .../NAME=0A>> = >=0A>> >>=A0 rather than=0A>> >>>>>=A0 =A0 .../lib=0A>> >>>>>=A0 =A0 >= =A0 --with-php-config=3DPATH=A0 Path to php-config =0A> php-config=0A>> >= >>>>=A0 =A0 >=A0 --with-lixa=3DFILE=A0 =A0 =A0 =A0 Include LIXA =0A> suppo= rt. File is=0A>> > the=0A>> >>=A0 path to=0A>> >>>>>=A0 =A0 lixa-config= =0A>> >>>>>=A0 =A0 >=0A>> >>>>>=A0 =A0 > [...]=0A>> >>>>>=A0 =A0 >=0A>> = >>>>>=A0 =A0 > and I can compile with:=0A>> >>>>>=A0 =A0 >=0A>> >>>>>=A0= =A0 > ./configure =0A> --with-lixa=3D/opt/lixa/bin/lixa-config=0A>> >>>>>= =A0 =A0 --with-php-config=3D/opt/php/bin/php-config=0A>> >>>>>=A0 =A0 >=0A= >> >>>>>=A0 =A0 > the build process runs as expected and the =0A> extensio= n is=0A>> >>=A0 available=0A>> >>>>=A0 after=0A>> >>>>>=A0 =A0 an addit= ion to php.ini=0A>> > (extension=3D[...]/ext/lixa/modules/lixa.so).=0A>> = >>>>>=0A>> >>>>>=A0 =A0 Great, you are done. Why do you want to go any =0A= > further than=0A>> > this?=0A>> >>=A0 You=0A>> >>>>>=A0 =A0 built your = extension and it is available from PHP =0A> exactly=0A>> > like any=0A>> = >>=A0 pecl=0A>> >>>>>=A0 =A0 extension.=0A>> >>>>>=0A>> >>>>=0A>> >>>>= =A0 and if you're using apache, reboot it and check your =0A> phpinfo()=0A= >> > page=0A>> >>=A0 for=0A>> >>>>=A0 your extension.=0A>> >>>>=A0 if= you're connected up via the command line you can =0A> run=0A>> > "php=0A>= > >>=A0 -m"=0A>> >>>>=A0 to see if=0A>> >>>>=A0 your modules exists.= =0A>> >>>>=0A>> >>>>=0A>> >>>>>=0A>> >>>>>=A0 =A0 -Rasmus=0A>> >>>>>= =0A>> >>>=0A>> >>>=A0 Dear all,=0A>> >>>=A0 I would like to see my ext= ension as any other extension, =0A> like MySQL,=0A>> >>=A0 PostgreSQL, Ora= cle and so on because:=0A>> >>>=A0 1. LIXA itself is useless without thos= e resource managers=0A>> >>>=A0 2. I need to patch other extensions to im= plement the =0A> interfaces=0A>> > between=0A>> >>=A0 LIXA and MySQL/Post= greSQL/Oracle.=0A>> >>>=A0 What's the difference between an "internal" = =0A> extension=0A>> > (like=0A>> >>>=A0 MySQL/PostgreSQL/Oracle) and an = "external" =0A> extension as the=0A>> > one I=0A>> >>>=A0 produced?=0A>>= >>>=A0 Thanks in advance, your help is precious.=0A>> >>=0A>> >>=0A>> = >>=A0 The PHP source archive bundles several extensions under the ext/=0A>= > >>=A0 directory, these are the extensions are listed when you run=0A>> = >>=A0 ./configure --help=0A>> >>=0A>> >>=A0 I don't understand why you wa= nt your extension to show up =0A> there, but=0A>> >>=A0 to do so you have = to place your extension in that folder and run=0A>> >>=A0 ./buildconf --fo= rce=0A>> >>=A0 PHP will not automatically scan your filesystem for possibl= e =0A> extension=0A>> >>=A0 directories to list them under ./configure=0A>= > >>=A0 I'm sure you have seen, and used, http://pecl.php.net - these=0A>>= >>=A0 extensions don't show up when you build PHP.=0A>> >>=0A>> >>=A0 T= he standard way to build "external" extensions however =0A> is to use=0A>> = >>=A0 pecl, or manually build them as shared modules (as you did =0A> firs= t).=0A>> >>=0A>> >>=0A>> >>=A0 -Hannes=0A>> >>=0A>> >=0A>> > That's t= he point: I tryed=0A>> > ./buildconf --force=0A>> > but it didn't include= my extension.=0A>> >=0A>> > This is an excerpt from my initial post:=0A>= > >=0A>> >>=A0 If I use this sequence from the PHP root directory:=0A>> = >=0A>> >>=A0 ./buildconf --force=0A>> >>=A0 as described here:=0A>> > ta= lks.somabo.de/200510_zend_conf_php_extension_development.pdf=0A>> >=0A>> = >>=A0 I cannot see "lixa" as an available option of my =0A> configure:=0A>>= >=0A>> >>=A0 ./configure --help|grep lixa=0A>> >>=A0 is empty.=0A>> >= =0A>> >>=A0 If I try to build PHP anyway, I obtain:=0A>> >=0A>> >>=A0 ti= ian@mojan:~/src/swig/php5.4-201202241630$ ./configure=0A>> > --with-lixa= =3D/opt/lixa/bin/lixa-config=0A>> >>=A0 configure: WARNING: unrecognized o= ptions: --with-lixa=0A>> >=0A>> > Do you have any idea how to debug why "= buildconf --force" =0A> does not=0A>> > pick-up my extension?=0A>> =0A> = =0A> You should rm -f configure manually before invoking buildconf --force.= It=0A> wont overwrite configure by itself.=0A> =0A> Julien.P=0A> =0A=0ADea= r Julien,=0Ayour suggestion is precious but unfortunately some more files m= ust be deleted.=0AAfter a bit of hacking I've found out this working sequen= ce:=0A=0Atiian@mojan:~/php5.4-201202241630$ rm configure autom4te.cache/*= =0Atiian@mojan:~/php5.4-201202241630$ ./buildconf --force=0AForcing buildco= nf=0Arebuilding configure=0Arebuilding main/php_config.h.in=0Atiian@mojan:~= /php5.4-201202241630$ ./configure --help|grep lixa=0A=A0 --with-lixa=3DFILE= =A0=A0=A0=A0=A0=A0=A0 Include LIXA support. File is the path to lixa-config= program=0A=0AThanks again for your needful help!=0ARegards=0ACh.F.=0A