
david at kineticode
Nov 17, 2009, 3:31 AM
Post #4 of 4
(1335 views)
Permalink
|
|
Re: Status of PHP interpreter (Subject was: Input required: bricolagecms.org front page mock-up)
[In reply to]
|
|
On Nov 17, 2009, at 6:48 AM, Alex Krohn wrote: > Not sure I'd be up to being a maintainer. Sounds awful as you have to > deal with php4/php5, apache1/apache2, and then all the different distro > setups. =) That's a lot to check and test for. IIRC, it's PHP5 only. And since the interpreter is embedded in Perl, you don't have to worry about Apache. But one might need to test different versions of Perl on different platforms. > If anyone else is interested, the problem we faced is that the module doesn't > detect the library paths and locations properly. On our servers, we > needed it to know where libphp5.so and libhttpd.so and also link against > libperl.so. Our patch looks like: > > --- PHP-Interpreter-1.0.2.orig/Makefile.PL 2008-11-12 04:27:18.000000000 -0800 > +++ PHP-Interpreter-1.0.2/Makefile.PL 2009-11-16 13:24:45.000000000 -0800 > @@ -89,8 +89,12 @@ > print "using lddlflags " . join(q{ }, @lddlflags) . "\n"; > > # Libs = lddlflags + php-version > -my @libs = ("$php_embedlib_path"); > -push @libs, "-lphp$conf{version}"; > +my @libs; > +if ($ENV{APACHE1_LIB_DIR}) { > + push @libs, "-L$ENV{APACHE1_LIB_DIR}", "-lhttpd"; > +} > +push @libs, $php_embedlib_path; > +push @libs, "-lphp$conf{version}", "-lperl"; > print "using libs " . join(q{ }, @libs) . "\n"; > > my @ofiles = ('PHP.o', 'phpinterp.o', 'phpfuncs.o'); > > and then we just do: > > APACHE1_LIB_DIR=/usr/lib/httpd perl Makefile.PL > > and it passes all tests. There's got to be a reasonable way to do this in general with Perl modules that have external C library dependencies, no? > Your system also needs to be setup so libphp5, libperl, and libhttpd are > in the system ld.so.conf paths (often they aren't), which can make it > even more fun. > > If anyone needs a hand getting it working or if anyone is interested in > maintaining and would like to bounce ideas, just let me know. Thanks for the offer, Alex. Now we just need someone to take it! Best, David
|