brax33

Registered
Jun 23, 2008
3
0
51
Hey guys - I'm trying to give some legacy support to an existing customer (who uses php 4.4.9) while at the same time running the current version of php5. It's causing some unexpected problems and while I've solved most of them so far I'm still stuck on one.

Code:
    -- End step 'make php for apache and cli' --

    -- Begin step 'make install php for apache and cli' --
Installing PHP SAPI module:       apache2handler
/usr/local/apache/build/instdso.sh SH_LIBTOOL='/usr/local/apache/build/libtool' libphp4.la /usr/local/apache/modules
/usr/local/apache/build/libtool --mode=install cp libphp4.la /usr/local/apache/modules/
libtool: install: error: cannot install `libphp4.la' to a directory not ending in /home/cpeasyapache/src/php-4.4.9/libs
apxs:Error: Command failed with rc=65536
.
make: *** [install-sapi] Error 1
!! Step 7: make install php for apache and cli !!
!! 'make install' failed with exit code '512' !!
!! Restoring original working apache !!

It's not making much sense that it can't install into a non-source dir...

Anyone have any ideas?


all_php4 Rawopts file is:
Code:
--with-pcre-dir=/usr/src/pcre-8.20
--with-pcre-regex=/usr/src/pcre-8.20
 

brax33

Registered
Jun 23, 2008
3
0
51
Well, managed to get it working.... Though to be honest it took a bit of timing. You have to start the install process, but catch the file when the installer creates/overwrites it, but before it runs it, and edit out

# Don't allow the user to place us outside of our expected
# location b/c this prevents finding dependent libraries that
# are installed to the same prefix.
# At present, this check doesn't affect windows .dll's that
# are installed into $libdir/../bin (currently, that works fine)
# but it's something to keep an eye on.
if test "$inst_prefix_dir" = "$destdir"; then
$echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
exit $EXIT_FAILURE
fi
The last four lines there, just comment them out.

Also I installed using PCRE 7.7, but it looks like 8.20 should work as well.
If you're having the PCRE error on php 4.4.9 check http://forums.cpanel.net/f442/pcre-error-undefined-reference-pcre_info-419892.html
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello :)

I am happy to see you were able to resolve the issue, but please keep in mind that PHP 4 was marked end-of-life over 6 years ago. It's likely a good idea to communicate this information to your customer and strongly suggest to them that upgrading their script is worth the effort.

Thank you.