Re: [PHP] PHP with JAVA support
Robert, Please include the php code you're using to instantiate the class. That will give me a better idea of what to suggest. I'm using PHP 4.05 & Java 1.3.1 on Redhat 6.2 with good results. -Jim Kirkpatrick "Robert Vetter" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > I'm trying to run PHP with Java support and don't get it to work. First > I compiled PHP '--with-java=/usr/local/jdk1.2.2/'. Then I added this to > the PHP.ini file: > > [Java] > java.home=/usr/local/jdk1.2.2 > java.class.path=/usr/local/lib/php/extensions/php_java.jar:/usr/local/jdk1.2 .2/src.jar > java.library.path=/usr/local/lib:/usr/local/jdk1.2.2/jre/lib/i386:/usr/local /jdk1.2.2/jre/lib/i386/classic:/usr/local > /jdk1.2.2/jre/lib/i386/native_threads > java.library=/usr/local/jdk1.2.2/jre/lib/i386/libjava.so > java.extension=/usr/local/lib/php/extensions/libphp_java.so > > > Now, when I try to instantiate a JAVA class I get this error: Fatal > error: Cannot instantiate non-existent class: java in > /usr/local/apache/htdocs/index.php on line 3. > > Does anybody have expirience with running JAVA with PHP? I don't know > why it doesn't work. I use PHP 4.05 on a Debian Linux machine. Thanks. > > Robert > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP & Java: Apache processes
I have what appears to be a successful implementation of Java support compiled into PHP running on an Apache server. Specifics: PHP: 4.0.5 Java: 1.3.1 (Sun) Apache: 1.3.19 OS: Redhat 6.2 The problem I'm experiencing has to do with finding multiple Apache child processes spawned but never closed for each call to Java. They show up with ' rt_sigsuspend ' in a PS listing. My guess, based on looking for that term on the net, is that it may have to do with the Java RunTime not being able to exit and hanging. Over a day or two, three developers can crank the Apache processes up near 300. I'd appreciate any help with this. I'm currently "cleaning up" with a cron script, but I'd like to solve the problem if at all possible. -Jim Kirkpatrick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP with JAVA support
Robert, If I run your code on my installation, all I get is the phpInfo() output. If I comment out that line, it returns: Java version=1.4.0-beta Java vendor=Sun Microsystems Inc. OS=Linux 2.2.14-5.0 on i386 Thursday, June 21, 2001 at 9:59:05 AM GMT-08:00 ...as I would expect. It would appear that the error refers to PHP not being able to instantiate the PHP Java class. I'd check the following: Your php.ini line: java.extension=/usr/local/lib/php/extensions/libphp_java.so Be sure that the file actually exists there. On my system, it's installed in /usr/local/lib/php/extensions/no-debug-non-zts-20001222, and the lines in php.ini that load it are different from yours: extension_dir = /usr/local/lib/php/extensions/no-debug-non-zts-20001222 extension = libphp_java.so -Jim "Robert Vetter" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Jim Kirkpatrick wrote: > > > > Robert, > > > > Please include the php code you're using to instantiate the class. That will > > give me a better idea of what to suggest. > > > > Hi Jim, > > Thanks for the response. Here comes the code: > >phpinfo(); > $system = new Java("java.lang.System"); > print "Java version=".$system->getProperty("java.version")." \n"; > print "Java vendor=".$system->getProperty("java.vendor")." \n\n"; > print "OS=".$system->getProperty("os.name")." ". > $system->getProperty("os.version")." on ". > $system->getProperty("os.arch")." \n"; > > $formatter = new Java("java.text.SimpleDateFormat",", > dd, 'at' h:mm:ss a "); > print $formatter->format(new Java("java.util.Date"))."\n"; > > ?> > > > Robert > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]