in reply to Problems installing PHP::Interpreter

By default, PHP builds shared libraries; however, it seems that when you use  --enable-embed, you have to specify type, either static or shared. The documentation wasn't clear about whether static or shared was default in this situation. I would rebuild PHP with --enable-embed=shared and see what happens. Good luck!

Replies are listed 'Best First'.
Re^2: Problems installing PHP::Interpreter
by Anonymous Monk on Jun 15, 2009 at 13:53 UTC
    I have solved the problem by installing a seperate php-instance. This is usefull in the case, when you need a normal php-installation.

    Get the source for php version 5.1.6, because the actual version generates some troubles.

    Configure the sources with the following command:
    sudo ./configure --prefix=/usr/local/embedphp --with-config-file-path= +/usr/local/embedphp/etc --with-config-file-scan-dir=/usr/local/embedp +hp/etc/php.d --enable-embed --enable-maintainer-zts --enable-dbase
    Compile the sources an install it. The right embedded libphp5.so library is found in /usr/local/embedphp/lib.

    Get the PHP::Interpreter sources and apply a patch to the Makefile.PL:

    patch:
    87a88 > my $static_library_path = '-Wl,-rpath,'.catdir $prefix, "lib"; 88a90 > push @lddlflags, $static_library_path;
    This links the libphp5.so with a static path.

    The following commands create the Makefile and install the Module correctly:
    sudo patch --verbose --backup Makefile.PL < patch sudo PHP_CONFIG="/usr/local/embedphp/bin/php-config" perl Makefile.PL sudo PHP_CONFIG="/usr/local/embedphp/bin/php-config" make sudo make test sudo make install
    I hope this will fix all problems.

    MfG