PHP 4.0 Bug #6122: JVM starts only on 3 requests per httpd
| From: | torben@php.net | Date: | Sat, 12 Aug 2000 11:41:17 +0000 |
| Subject: | PHP 4.0 Bug #6122: JVM starts only on 3 requests per httpd | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-28662@lists.php.net to get a copy of this message | ||
From: torben@php.net
Operating system: Mandrake Linux 7.0
PHP version: 4.0 Latest CVS (12/08/2000)
PHP Bug Type: Other
Bug description: JVM starts only on 3 requests per httpd
./configure --with-java --with-mysql --with-gd --with-apache=../apache_1.3.11 --enable-track-vars
--enable-sysvshm --enable-bcmath --disable-debug --with-xml
Using Blackdown JDK 1.2.2
From php.ini:
[java]
java.class.path=/usr/local/lib/php_java.jar
extension_dir=/usr/local/lib/php/extensions/no-debug-non-zts-20000809
extension=libphp_java.so
java.library.path=/usr/local/jdk1.2.2/jre/lib/i386:/usr/local/jdk1.2.2/jre/lib/i386/native_threads:/usr/local/jdk1.2.2/jre/lib/i386/classic:/usr/local/lib/php/extensions/no-debug-non-zts-20000809
Test script:
<?php
$system = new Java("java.lang.System");
print "Java version=".$system->getProperty("java.version")." \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")." \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";
?>
The first 3 runs of the above work as expected. The fourth run gives the
error: Fatal error: Unable to create Java Virtual Machine in
/home/torben/public_html/php3test/tj.html on line 2.
Setting MaxRequestsPerChild to < 3 in httpd.conf makes the problem go away, but this is obviously
a suboptimal solution. :)