I can't make
PHP::Interpreter work. I got it installed, but running it yields:
$ perl -wle 'use PHP::Interpreter'
Can't load '/usr/local/lib/perl/5.8.8/auto/PHP/Interpreter/Interpreter
+.so' for module PHP::Interpreter: /usr/local/lib/perl/5.8.8/auto/PHP/
+Interpreter/Interpreter.so: undefined symbol: zend_ce_traversable at
+/usr/lib/perl/5.8/DynaLoader.pm line 225.
at -e line 1
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
I have
$ php5 -v
PHP 5.2.4-2ubuntu5 with Suhosin-Patch 0.9.6.2 (cli) (built: Feb 27 200
+8 20:43:54)
$ uname -a
Linux foo 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686 G
+NU/Linux
$ perl -v
This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
I even tried the Makefile.PL from
Making PHP::Interpreter easier to install (which worked with the following patch):
26c26
< my @incdirs = map { s/^-I//g; chomp; $_ } split(/ /, $inc);
---
> my @incdirs = map { s/^-I//g; chomp; $_ } grep { /^-I/ } split(/ /
+, $inc);
perl Makefile.PL says:
$ perl Makefile.PL
using php version 5.2.4-2ubuntu5
using prefix /usr
using includes -I/usr/include -I/usr/include/php5 -I/usr/include/php5/
+main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include
+/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FIL
+E_OFFSET_BITS=64
using lddlflags -shared -L/usr/local/lib -L/usr/lib -L/usr/lib
using libs -L/usr/lib -lphp5
Checking header files...
using incdir '/usr/include'
using incdir '/usr/include/php5'
using incdir '/usr/include/php5/main'
using incdir '/usr/include/php5/TSRM'
using incdir '/usr/include/php5/Zend'
using incdir '/usr/include/php5/ext'
using incdir '/usr/include/php5/ext/date/lib'
Found /usr/include/php5/Zend/zend.h
Found /usr/include/php5/Zend/zend_ini.h
Found /usr/include/php5/Zend/zend_interfaces.h
Found /usr/include/php5/Zend/zend_compile.h
Found /usr/include/php5/Zend/zend_API.h
Found /usr/include/php5/TSRM/TSRM.h
Found /usr/include/php5/main/php.h
Found /usr/include/php5/main/php_config.h
Found /usr/include/php5/main/php_ini.h
Found /usr/include/php5/main/SAPI.h
Found /usr/include/php5/main/php_main.h
Note (probably harmless): No library found for -lphp5
Writing Makefile for PHP::Interpreter
make says:
$ make
cp lib/PHP/Interpreter/Resource.pm blib/lib/PHP/Interpreter/Resource.p
+m
cp lib/PHP/Interpreter/Class.pm blib/lib/PHP/Interpreter/Class.pm
cp a.pl blib/lib/PHP/a.pl
cp b.pl blib/lib/PHP/b.pl
cp lib/PHP/Interpreter.pm blib/lib/PHP/Interpreter.pm
/usr/bin/perl /usr/share/perl/5.8/ExtUtils/xsubpp -typemap /usr/share
+/perl/5.8/ExtUtils/typemap -typemap typemap PHP.xs > PHP.xsc && mv P
+HP.xsc PHP.c
cc -c -I/usr/include -I/usr/include/php5 -I/usr/include/php5/main -I/
+usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ex
+t -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET
+_BITS=64 -g -O2 -DVERSION=\"1.0.1\" -DXS_VERSION=\"1.0.1\" -fPIC "-
+I/usr/lib/perl/5.8/CORE" PHP.c
In file included from /usr/include/php5/main/php.h:34,
from phpinterp.h:11,
from PHP.xs:13:
/usr/include/php5/Zend/zend.h:34:1: warning: "END_EXTERN_C" redefined
In file included from PHP.xs:3:
/usr/lib/perl/5.8/CORE/perl.h:242:1: warning: this is the location of
+the previous definition
PHP.c: In function ‘XS_PHP__Interpreter__Resource_FETCH’:
PHP.c:1438: warning: useless type name in empty declaration
cc -c -I/usr/include -I/usr/include/php5 -I/usr/include/php5/main -I/
+usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ex
+t -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET
+_BITS=64 -g -O2 -DVERSION=\"1.0.1\" -DXS_VERSION=\"1.0.1\" -fPIC "-
+I/usr/lib/perl/5.8/CORE" phpinterp.c
In file included from /usr/include/php5/main/php.h:34,
from phpinterp.h:11,
from phpinterp.c:13:
/usr/include/php5/Zend/zend.h:34:1: warning: "END_EXTERN_C" redefined
In file included from phpinterp.c:3:
/usr/lib/perl/5.8/CORE/perl.h:242:1: warning: this is the location of
+the previous definition
cc -c -I/usr/include -I/usr/include/php5 -I/usr/include/php5/main -I/
+usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ex
+t -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET
+_BITS=64 -g -O2 -DVERSION=\"1.0.1\" -DXS_VERSION=\"1.0.1\" -fPIC "-
+I/usr/lib/perl/5.8/CORE" phpfuncs.c
In file included from /usr/include/php5/main/php.h:34,
from phpinterp.h:11,
from phpfuncs.c:5:
/usr/include/php5/Zend/zend.h:34:1: warning: "END_EXTERN_C" redefined
In file included from phpfuncs.c:2:
/usr/lib/perl/5.8/CORE/perl.h:242:1: warning: this is the location of
+the previous definition
phpfuncs.c: In function ‘zm_startup_sandwich’:
phpfuncs.c:1054: warning: assignment from incompatible pointer type
Running Mkbootstrap for PHP::Interpreter ()
chmod 644 Interpreter.bs
rm -f blib/arch/auto/PHP/Interpreter/Interpreter.so
cc -shared -L/usr/local/lib -L/usr/lib -L/usr/lib PHP.o phpinterp.o
+phpfuncs.o -o blib/arch/auto/PHP/Interpreter/Interpreter.so \
\
chmod 755 blib/arch/auto/PHP/Interpreter/Interpreter.so
cp Interpreter.bs blib/arch/auto/PHP/Interpreter/Interpreter.bs
chmod 644 blib/arch/auto/PHP/Interpreter/Interpreter.bs
Manifying blib/man3/PHP::Interpreter::Resource.3pm
Manifying blib/man3/PHP::Interpreter::Class.3pm
Manifying blib/man3/PHP::Interpreter.3pm
$
make install says:
$ sudo make install
Installing /usr/local/lib/perl/5.8.8/auto/PHP/Interpreter/Interpreter.
+so
Files found in blib/arch: installing files in blib/lib into architectu
+re dependent library tree
Writing /usr/local/lib/perl/5.8.8/auto/PHP/Interpreter/.packlist
Appending installation info to /usr/lib/perl/5.8/perllocal.pod
Anyone who can guide a confused Monk in the quest for enlightenment?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.