What needs to be done here: You need to have the libphp_java.so in the libexec directory of apache so that it can load the module. Your error 2 is because the module is not loaded. Fix the 1 problem and the second will go away.
Plus, I would run Tomcat and have that handle of all your java and access php through java...This is faster and reliable. Java in php is not as faster or reliable. Check the php documentation on this... Ray Hunter Firmware Engineer ENTERASYS NETWORKS -----Original Message----- From: Proyecto de Grado [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 11:54 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: PHP and Java I used LD_LIBRARYPATH=/usr/local/lib:/usr/java1.2/jre/lib/sparc:/usr/local/lib/php/ modules but the problems 1) PHP Warning: Unable to load dynamic library './libphp_java.so' - ld.so.1: /usr/ local/apache/bin/httpd: fatal: ./libphp_java.so: open failed: No such file or directory in Unknown on line 0 [Fri Mar 1 12:06:01 2002] [notice] Apache/1.3.22 (Unix) PHP/4.1.1 configured --> resuming normal operations [Fri Mar 1 12:06:01 2002] [notice] Accept mutex continued. 2) Fatal error: Cannot instantiate non-existent class: java in /usr/local/apache/htdocs/remotemanager/users/java.php on line 4 follow. > -----Original Message----- > From: Proyecto de Grado [mailto:[EMAIL PROTECTED]] > <mailto:[EMAIL PROTECTED]%5D> <mailto:[EMAIL PROTECTED]%5D> > Sent: Friday, March 01, 2002 10:49 AM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP and Java > >From my experience getting Java to run w/ PHP and Apache on RedHat 7.0, >you can try setting the LD_LIBRARY_PATH environment variable ( without >which my Java would not run) set to the location of libjava.so, >libjvm.so, and php_java.jar, in my case (without line feeds) > LD_LIBRARY_PATH="/usr/java/j2sdk1.4.0/jre/lib/i386: >/usr/java/j2sdk1.4.0/jre/lib/i386/server:/usr/local/lib/php" >Rich >> -----Original Message----- >> From: Proyecto de Grado [mailto:[EMAIL PROTECTED]] >> <mailto:[EMAIL PROTECTED]%5D> <mailto:[EMAIL PROTECTED]%5D> >> Sent: Friday, March 01, 2002 10:49 AM >> To: [EMAIL PROTECTED] >> Subject: [PHP] PHP and Java > >>no, it isn't. it is in usr/local/lib/php/modules >> Is the libphp_java.so located in your apache libexec directory? >> >> >> >> Ray Hunter > Firmware Engineer > > ENTERASYS NETWORKS > > > -----Original Message----- > From: Proyecto de Grado [mailto:[EMAIL PROTECTED]] > <mailto:[EMAIL PROTECTED]%5D> <mailto:[EMAIL PROTECTED]%5D> > Sent: Friday, March 01, 2002 10:49 AM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP and Java > > > I have Java1.2 , php4.1.1 and apache 1.3.22, sun solaris7 > > I did compile php with-java > > 1) Java section in php.ini > [Java] > java.home = /usr/java1.2 > java.class.path = /usr/local/lib/php/php_java.jar > java.library=/usr/java1.2/jre/lib/sparc/libjvm.so > java.library.path = /usr/local/lib/php > > 2) prueba.php > <html> > <body> > <? > $system = new Java(); > print "Java version=".$system->getProperty("java.version")." <br>\n"; > print "Java vendor=".$system->getProperty("java.vendor")." <p>\n\n"; > print "OS=".$system->getProperty("os.name")." ". > $system->getProperty("os.version")." on ". > $system->getProperty("os.arch")." <br>\n"; > > $formatter = new Java("java.text.SimpleDateFormat", > "EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz"); > > print $formatter->format(new Java("java.util.Date"))."\n"; > > ?> > <html> > > > the error in browser is: > Fatal error: Cannot instantiate non-existent class: java in > /usr/local/apache/htdocs/remotemanager/users/java.php on line 4 > > 3) when I run apache in error.log > > PHP Warning: Unable to load dynamic library './libphp_java.so' - > ld.so.1: > /usr/ local/apache/bin/httpd: fatal: ./libphp_java.so: open failed: > No such file or directory in Unknown on line 0 > [Fri Mar 1 12:06:01 2002] [notice] Apache/1.3.22 (Unix) PHP/4.1.1 > configured -- > resuming normal operations > [Fri Mar 1 12:06:01 2002] [notice] Accept mutex: fcntl (Default: > fcntl) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php