Compiling Java support into PHP

From: Date: Tue, 07 May 2002 18:58:01 +0000
Subject: Compiling Java support into PHP
Groups: php.general 
Request: Send a blank email to php-general+get-96476@lists.php.net to get a copy of this message
I have Java working with PHP. My problem is, when I start Apache from init.d (rc5.d) httpd script, I cannot execute my java code from a php script. I can only achieve this if I start Apache manually after logging in. From advice on this and other newsgroups, I sort-of solved this problem by adding my java library paths to rc.local, like LD_LIBRARY_PATH="/usr/java/j2sdk1.4.0/jre/lib/i386:/usr/java/j2sdk1.4.0/jre/ lib/i386/server" export LD_LIBRARY_PATH /usr/local/apache/bin/apachectl startssl But, this is kind of bogus, because I should be able to load these directories into /etc/ld.so.conf, rerun ldconfig, and achieve the same effect. I did that, and commented out the LD_LIBRARY_PATH lines above, and.... again, my java would not run from php until I restarted Apache. This in spite of the fact that I can go to cd /usr/java/j2sdk1.4.0/jre/lib/i386 and run ldd libjava.so and see that all the links are found. The same with libjvm.so in ......i386/server. Ok this is not a critical problem because I have it working without restarting the server but I do not understand why I have to have the LD_LIBRARY_PATH lines in rc.local if ldd is finding the everything ok. Ideas? Rich

« previous php.general (#96476) next »