Hi everyone,
I got something very odd while trying to integrate php with java. First, my
system specifications:
Windows 2000 SP3
Apache 1.3.20
PHP 4.3.1
Sun Microsystems JDK 1.4.0
Java settings from php.ini:
extension_dir="C:\php\extensions"
[Java]
java.class.path="C:\php\extensions\php_java.jar;"
java.home=C:\j2sdk1.4.0
java.library=C:\j2sdk1.4.0\jre\bin\server\jvm.dll
java.library.path=C:\php\extensions
Program I am running:
<?php
$system = new Java("java.lang.System");
print "Java version=".$system->getProperty("java.version")." <br>";
?>
When I start the apache server service, the program runs ok (several
reloads on the browser). But, if I close the browser and open it again,
the program no longer runs and give me a "Fatal error: Unable to create
Java Virtual Machine in C:\php\java.php ...". After several
reloads, sometimes I get it to run again (just one time).
If I restart the apache server service, the program works again, but
with the same behavior: if I close the browser window and open it again,
it does not work.
I ran out of options and, if anyone could help, I'll appreciate.
Tks,
CHIEN, PHAM