Apache/PHP/Java problem

From: Date: Fri, 03 May 2002 19:25:31 +0000
Subject: Apache/PHP/Java problem
Groups: php.general 
Request: Send a blank email to php-general+get-95959@lists.php.net to get a copy of this message
I have Apache 1.3.24, PHP 4.2.0, and Java2SDK installed and working. My problem is, when I boot up and dispatch my phpTest.php script from my browser <?php // java.util.Date example $formatter = new Java('java.text.SimpleDateFormat', "EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz"); print "<br>".$formatter->format(new Java('java.util.Date')); phpinfo(); ?> I get an error message that the java .so is not found. I start apache from rc.local. If I then run 'apachectl restart' then the script works fine and the java .so is found. The specific error message is (the java libs are pointed to from php.ini): Fatal error: Unable to load Java Library /usr/java/j2sdk1.4.0/jre/lib/i386/libjava.so, error: libjvm.so: cannot load shared object file: No such file or directory in /home/web/staging/rfox/www/phpTest.php3 on line 3 Since rc.local is executed at the end of system init, I can't understand why php can't find the java .so. As I said, upon Apache restart it works fine. Any insight would be greatly appreciated. Rich

« previous php.general (#95959) next »