1834276 Members
2504 Online
110066 Solutions
New Discussion

PHP Broken

 
SOLVED
Go to solution
Ameer Dixit
Advisor

PHP Broken

Hello Folks,
I've my life miserable by installing the Ghostscript depot on my server. I was unaware that it would also update jpeg-6.0, bison, and flex. After the install, my Apache server gives an error trying to open any type of .php document. In the Apache log, I get the following errors:

/usr/lib/dld.sl: Can't find path for shared library: libjvm.sl
/usr/lib/dld.sl: No such file or directory
[Wed Nov 10 17:49:04 2004] [error] [client 156.137.10.28] Premature end of scrip
t headers: /opt/apache/lib/cgi-bin/php
/usr/lib/dld.sl: Can't find path for shared library: libjvm.sl
/usr/lib/dld.sl: No such file or directory
[Wed Nov 10 17:49:53 2004] [error] [client 156.137.10.28] Premature end of scrip
t headers: /opt/apache/lib/cgi-bin/php
/usr/lib/dld.sl: Can't find path for shared library: libjvm.sl
/usr/lib/dld.sl: No such file or directory
[Wed Nov 10 18:29:11 2004] [error] [client 156.137.10.28] Premature end of scrip
t headers: /opt/apache/lib/cgi-bin/php

I swremoved the software, but to no avail. I tried running php from the command line, and it crashes the same way (same error) and dies with a core dump.

Anyone run into this?!

Particulars:
Server is an RP5430 running 11i
Apache 1.3.2.0
PHP 4.1
7 REPLIES 7
Brian Markus
Valued Contributor

Re: PHP Broken

I had a problem that was a lot like this. I ended up compiling them all manually to get them to work. I followed this site as an example:

http://hulan.info/blog/item/install-compile-apache-2-php-4-3-5-and-mysql-under-linux


I hope this helps.

-Brian.
When a sys-admin say's maybe, they don't mean 'yes'!
Ermin Borovac
Honored Contributor

Re: PHP Broken

My guess is that Java SDK/RTE got removed from your system, since libjvm.sl is Java library.

Check php binary with chatr to see where it is looking for libjvm.sl.

$ chatr /path/to/php/binary

Ameer Dixit
Advisor

Re: PHP Broken

Thanks Ermin! I see in the output that there is no specific path to libjvm, so I assume it's using SHLIB_PATH. My /etc/SHLIB_PATH looks like this:

/usr/lib $ cat /etc/SHLIB_PATH
/usr/lib:/etc/opt/resmon/lib

Looking in /usr/lib, I find my libjvm's... and the .1 link file is from the time I, ahem, "upgraded" my system!

/usr/lib $ ll libjvm*
-r-xr-xr-x 1 bin bin 1613824 Dec 6 2001 libjvm.sl
lrwxr-xr-x 1 root sys 9 Nov 1 15:05 libjvm.sl.1 -> libjvm.sl

However, I renamed my link, and it still doesn't work. Any ideas on what else could have been broken by the installs?
Thank you.

Here's the chatr for the php executable:
/opt/php4/bin $ chatr ./php | more
chatr(warning): dl_header_ext.size != sizeof(dl_header_ext). Please update your
version of the linker.
./php:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path enabled first /opt/zlib/lib:/opt/jpeg-6/lib:/opt/
libpng/lib:/opt/freetype/lib:/opt/gd/lib:/opt/oracle/v7.3.4/lib
shared library list:
dynamic /usr/lib/libpam.1
dynamic /opt/oracle/v7.3.4/lib/libclntsh.1
dynamic /usr/lib/libm.2
dynamic /usr/lib/libcl.2
dynamic /usr/lib/libcma.2
dynamic /opt/gd/lib/libgd.sl
dynamic /opt/freetype/lib/libttf.sl
dynamic /opt/libpng/lib/libpng.sl
dynamic /opt/zlib/lib/libz.sl
dynamic /opt/jpeg-6/lib/libjpeg.sl
dynamic /usr/lib/libnsl.1
dynamic /usr/lib/libc.2
shared library binding:
deferred
global hash table disabled
plabel caching disabled
global hash array size:1103
Ermin Borovac
Honored Contributor

Re: PHP Broken

It looks like /opt/php4/bin/php is not linked with libjvm.sl. Maybe one of the libraries it's linked with it is linked with libjvm.sl. Does /opt/php4/bin/php fail when you run it?

Also check output of 'ldd -v /opt/php4/bin/php' to see if libjvm.sl is there.

But really you should check your apache php module with chatr and ldd. It should be in /opt/apache/libexec.
Ameer Dixit
Advisor

Re: PHP Broken

Yes, /opt/php4/bin/php fails with the same error I get from my Apache php module (actually not a module, run out of cgi-bin) about libjvm.sl and it dies with a coredump.

OK, so the ldd command gets me really close:

/opt/php4/bin $ ldd -v php

find library=/usr/lib/libc.2; required by php
/usr/lib/libc.2 => /usr/lib/libc.2

find library=/usr/lib/libdld.2; required by /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2

find library=/usr/lib/libc.2; required by implicit load
/usr/lib/libc.2 => /usr/lib/libc.2

find library=/usr/lib/libnsl.1; required by php
/usr/lib/libnsl.1 => /usr/lib/libnsl.1

find library=/usr/lib/libxti.2; required by /usr/lib/libnsl.1
/usr/lib/libxti.2 => /usr/lib/libxti.2

find library=/opt/jpeg-6/lib/libjpeg.sl; required by php
/opt/jpeg-6/lib/libjpeg.sl => /opt/zlib/lib/libjpeg.sl

find library=/usr/lib/libc.2; required by /opt/zlib/lib/libjpeg.sl
/usr/lib/libc.2 => /usr/lib/libc.2

find library=../../../build/HP_UX/lib/PA_RISC/server/libjvm.sl; required by /opt/zlib/lib/libjpeg.sl
/usr/lib/dld.sl: Can't find path for shared library: libjvm.sl
/usr/lib/dld.sl: No such file or directory

See the "../../../build directory" it is looking for libjvm.sl? That's bogus and not on the system. Do I have to recompile to remove that or is there a was to fix it with ldd?
Ermin Borovac
Honored Contributor
Solution

Re: PHP Broken

One strange thing is that you have library libjpeg.sl in /opt/zlib/lib directory. JPEG library should be in /opt/jpeg-6/lib. Standard zlib install (/opt/zlib) doesn't include JPEG library.

PHP is linked with /opt/jpeg-6/bin/libjpeg.sl but it finds it in /opt/zlib/lib/libjpeg.sl.

I think that /opt/zlib/lib/libjpeg.sl is culprit.

Check with 'swlist -l file | grep libjpeg.sl' to see which package installed this library in /opt/zlib/lib.

You can try moving /opt/zlib/lib/libjpeg.sl out of the way to see if it's going to fix your problem.
Ameer Dixit
Advisor

Re: PHP Broken

Removing the link fixed it!!! Thank you very much.

Strange because the libjpeg.sl in zlib is just a link to a real java install... But it broke things?

/opt/zlib/lib $ ll libjpeg*
lrwxr-xr-x 1 root sys 39 Oct 28 15:24 libjpeg.sl -> /opt/jav
a1.3/jre/lib/PA_RISC/libjpeg.sl