NYCPHP Meetup

NYPHP.org

[nycphp-talk] php-java on linux, weird behaviour...

Kerem Tuzemen keremtuzemen at hotmail.com
Thu Nov 6 12:12:26 EST 2003


Hi everybody,

I'm experiencing an interesting problem with Apache 1.3 , php 4.3.3 (as so)
on Redhat linux 9 and I need your thoughts about this since I've spent
almost three days without any success and started to feel like kicking this
linux box. Here's the situation: I'm using php to connect to a java
interface to a proprietary so library. When I run the java interface class
code from the command line (java), as long as I set the LD_LIBRARY_PATH
variable and java -cp option to include necessary jar files the code works
perfectly. But when it comes to using php interface, although
LD_LIBRARY_PATH env variable and all related java paths, etc in php.ini are
set correctly, the java class code acts as these variables are not set and
returns an UnsatisfiedLinkError to the proprietary so library or a
NoClassDefFoundError. These two errors alternates without any specific
pattern during the php calls to the interface java library. One thing I've
noted is that, when I restart httpd service and open the php page calling
the java class, I first get the UnsatisfiedLinkError and then it starts
alternating. BTW, PHP calls to Java looks working perfectly since I don't
have any problems when accessing java.lang.System properties.
Any suggestions? Do you see anything that I'm missing or I should test?

Zillions of thanks in advance,

Kerem



More information about the talk mailing list