Hi,

I got something very odd while trying to run php with java. First, my
system specs:

My System:
Windows NT4.0 SP6 (same happens on Windows XP)
Apache 1.3.20
PHP 4.0.6
Sun Microsystems JDK 1.3.1

Java settings from php.ini:
[Java]
java.class.path="D:\php406\java\php_java.jar;D:\jdk\lib"
java.home=D:\jdk
java.library=D:\jdk\bin\hotspot\jvm.dll
java.library.path=D:\php406\extensions\

Program I am running:
<?php
$system = new Java("java.lang.System");
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>";
$formatter = new Java("java.text.SimpleDateFormat",
       "EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");
print $formatter->format(new Java("java.util.Date"));
?>

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 d:\http\info.php3 on line 9". 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.

While all the above is happening, if a go to the command prompt and
type: "d:\php406\php d:\http\myprogram.php3", it works fine, every time.

I ran out of options and, if anyone could help, I'll appreciate.

Tks,
Marcos

-- 
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]

Reply via email to