Hello,
Can any one tell me steps to connect php with java.
Thanks,
PHP AND JAVA
Moderator: General Moderators
I am getting following error.
Fatal error: Unable to create Java Virtual Machine in D:\_amolk_workspace\AmolTest\java.php on line 29
PHP: Error parsing C:\WINNT\php.ini on line 604
My php-ini file has follwoing setting
[Java]
java.class.path=C:\PHP\extensions\php_java.jar;
java.home = c:\Progra~1\JavaSoft\JRE\1.3.0_01
java.library = c:\Progra~1\JavaSoft\JRE\1.3.0_01\bin\hotspot
java.library.path = c:\PHP\extensions\
Fatal error: Unable to create Java Virtual Machine in D:\_amolk_workspace\AmolTest\java.php on line 29
PHP: Error parsing C:\WINNT\php.ini on line 604
My php-ini file has follwoing setting
[Java]
java.class.path=C:\PHP\extensions\php_java.jar;
java.home = c:\Progra~1\JavaSoft\JRE\1.3.0_01
java.library = c:\Progra~1\JavaSoft\JRE\1.3.0_01\bin\hotspot
java.library.path = c:\PHP\extensions\
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
saw this in the manual, dunno if it's applicable...
For those who have problems(1) with the broken(2) php/java module that is shipped with php, there's an alternative which is technically superior:
-> http://www.phpbuilder.com/lists/php-gen ... 2/0718.php
The author says that the module does not yet work on Windows, though. But I guess it should not be difficult to change the Unix fork/exec calls into the windows equivalent.
(2) http://tjw.org/php_java/build_notes.php
(1) These problems have technical reasons (extension dlopened):
* Fatal error: Unable to load Java Library
* [must] symlink "java.so" in your php extensions directory to
* ldconfig is needed
* LDFLAGS=-lpthread needed
* did not get to work PHP with Suns JDK 1.4.0_01 (Apache crashes), but JDK 1.4.2 works.
* the running httpd process, keeps the class file somewhere in cache
* [exec call is] considerably faster than accessing the same functionality with the JAVA extension