php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13996 Java crashing HTTP session
Submitted: 2001-11-08 23:42 UTC Modified: 2002-04-12 00:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: kyle at only-linux dot com Assigned:
Status: No Feedback Package: Java related
PHP Version: 4.0.6 OS: RedHat 6.2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2001-11-08 23:42 UTC] kyle at only-linux dot com
Whenever I execute any Java code inside of PHP (even simple things), the HTTP session crashes and nothing is logged by Apache.


System Info:
RedHat 6.2
Apache 1.3.19
PHP 4.0.6
Sun JDK 1.3.1

PHP compile string:
'--with-apxs=/usr/local/psa/apache/bin/apxs' '--prefix=/usr/local/psa/apache' '--with-mysql=/usr/local/psa/mysql' '--with-system-regex' '--without-gd' '--without-pear' '--with-imap=/usr' '--with-kerberos=/usr/kerberos' '--with-java=/usr/local/j2sdk-1_3_1' '--without-imap-ssl' '--enable-sockets' '--with-config-file-path=/usr/local/psa/apache/conf'

[Java] section of php.inijava.class.path =/usr/local/psa/apache/lib/php/php_java.jar:/usr/local/jdk1.3/lib/tools.jar:/usr/local/jdk1.3/lib/dt.jar/usr/local/psa/apache/lib/php/php_java.jar:/usr/local/jdk1.3/lib/tools.jar:/usr/local/jdk1.3/lib/dt.jar java.home =/usr/local/jdk1.3/jre/usr/local/jdk1.3/jre java.library =/usr/local/jdk1.3/jre/lib/i386/libjava.so/usr/local/jdk1.3/jre/lib/i386/libjava.so java.library.path =/usr/local/psa/apache/lib/php/20001222:/usr/local/jdk1.3/jre/lib/i386:/usr/local/jdk1.3/jre/lib/i386/hotspot:/usr/local/jdk1.3/jre/lib/i386/native_threads

PHP code:

 
 <? 
  // get instance of Java class java.lang.System in PHP
  $system = new Java('java.lang.System');

  // demonstrate property access
  print 'Java version='.$system->getProperty('java.version').' <br>';
  print 'Java vendor=' .$system->getProperty('java.vendor').'  <br>';
  print 'OS='.$system->getProperty('os.name').' '.
              $system->getProperty('os.version').' on '.
              $system->getProperty('os.arch').' <br>';

  // java.util.Date example
  $formatter = new Java('java.text.SimpleDateFormat',
                        "EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");

  print $formatter->format(new Java('java.util.Date'));
?>

Now, this runs fine from the command line:

/usr/local/psa/apache/bin/php /usr/local/plesk/apache/vhosts/dominiopropio.net/httpdocs/test.php
X-Powered-By: PHP/4.0.6
Content-type: text/html
 
Java version=1.3.1_01 <br>Java vendor=Sun Microsystems Inc.  <br>OS=Linux 2.2.16-3 on i386 <br>Thursday, November 08, 2001 at 11:38:51 PM Eastern Standard Time

But when run through the browser it sits, and then stops loading with no error either in the browser or apache logs.  Via telnet, the following happens:

Escape character is '^]'.
GET /test.php
Connection closed by foreign host.

The HTTP connection is dropped instantly when the page is requested.  Normal PHP runs fine.  If you need any other info please let me know.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-24 06:14 UTC] yohgaki@php.net
Please test with  PHP 4.1.1+JDK 1.2 and report the result back 
Please do not forget  updating PHP version. Thanks.
 [2002-04-12 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Nov 24 21:01:23 2020 UTC