JAVA Integration |
Veteran
|
Hi Jose - PhpED has nothing to do with Java bridge - it works if it is invoked in PHP engine. Which PHP are you using? Thanks!
|
||||||||||||
|
|
I have tried using the both the PHP5.16 that comes with PhpEd and with a fresh d/l of v5.21 from the source files.
|
||||||||||||
|
Veteran
|
what is the error anyway?
|
||||||||||||
|
|
My configuration:
W2k Php v5.16 PHPEdit v4.6.3 in debug/server mode JRE 1.5.10 Using the following I have successfully? performed communication using the bridge: In a DOS box I run: java -jar JavaBridge.jar SERVLET_LOCAL:9676 In my php.ini I have no java extension or module information My Test.php is thus: (I tried using new Java(...) with no difference in results) <?php require_once("http://localhost:9676/JavaBridge/java/Java.inc"); $system = new JavaClass('java.lang.System'); $jversion = $system->getProperty('java.version'); // echo 'Java version=' . $jversion . '<br/>'; echo 'Java version='; echo $jversion; echo '<br/>'; ?> Result is: ****************************** Java version=[o(String):"1.5.0_10"] ****************************** If I uncomment the line below assignment of $jversion result is: ****************************** Java version=Object id #19 Java version=[o(String):"1.5.0_10"] ****************************** This can't be right!!! I have also tried to activate the Java Bridge by adding the following to my php.ini: extension=php_java.dll and in the module settings section as follows: [java] java.home = "C:\Program Files\Java\jre1.5.0_09\bin" java.java = "C:\Program Files\Java\jre1.5.0_09\bin\javaw.exe" java.class.path = "C:\Program Files\nusphere\phped\php5\extensions\JavaBridge.jar" java.library.path = "C:\Program Files\nusphere\phped\php5\extensions" java.library = "C:\Program Files\Java\jre1.5.0_09\bin\client\jvm.dll" java.log_level = 2 This causes a memory exception in the following code: <?php require_once("c:/java/Java.inc"); $system = new Java('java.lang.System'); $jversion = $system->getProperty('java.version'); echo 'Java version=' . $jversion . '<br/>'; ?> The error is a popup with the title - 'php-cgi.exe - Application Error' and body - 'The instruction at "ox00d59a1f" referenced memory at "0x0325ce72". The memory could not be "written"' and ok/cancel |
||||||||||||
|
Site Admin
|
Definitely, it's not a bug in NuSphere product(s).
Feel free to file a report at bugs.php.net |
||||||||||||
_________________ The PHP IDE team |
PHP Java Bridge *UPDATE / FIXED* |
|
I have a similar problem, however I have PHP JavaBridge working successfully. My mappings *appear* to be ok, however I get a Failed to map "java.inc" in debug mode. I'm not referencing java.inc anywhere in my project!! In fact, this happends on any PHP file I attempt to debug that just echos one line -not using any Java/PHP bridge stuff at all!
Is there something in my PHP.ini I need to provide to satisfy the debugger? This isn't a problem at runtime so it is definately a PhpED debugger issue. ****UPDATE / FIXED**** Looks like I was able to resolve the issue: I added the PHP JavaBridge zip and source file as a folder on my site both locally and on the remote server in hopes to resolve the missing map to java.inc, although it wasn't in use by my project. That got rid on the "Failed to map" message however, the debugger would just hang waiting for a debug session and then timeout. Second, I went back to my php.ini file and reordered the extensions to local java.so before dbg.so-5.2.x. By placing dbg.so-5.5.2.x last in the list, and restarting apache2, the problem resolved itself! Hope this helps other users... |
||||||||||||
|
JAVA Integration |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by