Report new bug | New search | Development Roadmap Status: Open | Feedback | All

Bug #4849 Problems with Java & PHP integration
Submitted: 2005-07-18 01:55 UTC
From: tuta at digi dot com dot br Assigned:
Status: Bogus Package: Bug System
PHP Version: 5.0.3 OS: Windows 2000
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 33 - 10 = ?

 
 [2005-07-18 01:55 UTC] tuta at digi dot com dot br
Description: ------------ Hi All, I just downloaded(few hours ago) PHP 5.04 for Windows (php-5.0.4-Win32.zip) + PECL(pecl-5.0.4-Win32.zip), and i was trying to make PHP and talk with some of my Java Classes. I created some simple files just to start, something like this: PHP Filename : "java.php" <? $j = new Java("Hello"); print $j->hello("All"); ?> Java: Filename: "Hello.java" class Hello { public String hello(String name) { return "Hello " + name + ", how are you?"; } } Here is my php.ini [java] java.class.path= "c:\php\ext\php_java.jar;c:\php\ext;c:\java_classes" java.home = C:\jdk1.5.0\jre\bin\ java.library.path= c:\php\ext java.library= C:\jdk1.5.0\jre\bin\server\jvm.dll When i tried to run my "java.php" on my Apache Server(2.0.53 Win32), my web browser(FireFox) showed me the message "The Document Contains no Data", and i found many messages "Parent: child process exited with status 3221225477 -- Restarting." on my Apache's log file. I also tried to run "java.php" from console(using "php.exe java.php") , but without any success and without any error message, the php.exe just jump to another line without complains. So, i tried to spy the process using some debug tools to figure it out what was the problem, and i found it inside "php_java.jar" file and here it is: - There is a little space after the name "php_java" in the file "reflect.properties"(line library=php_java), and when the "reflect.class" tries to find the lib.( System.loadLibrary(bundle.getString("library") <-- reflect.java ); it will always look for "php_java .dll"(with space!). I fixed manually my "reflect.properties" and everything is fine now. I hope this information could help someone with the same problem. Best Regards, Tuta Muniz

Comments

 [2005-08-03 14:35 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-08-03 17:47 UTC] tuta at digi dot com dot br
Sorry my little friend mike .. but if you read it again .. i'm not asking for help... i'm telling to you how FIX a little problem with you java extension. if you found any in my poor english i could found a translator! TIA, Tuta Muniz.
 [2005-08-03 17:51 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-08-04 02:33 UTC] tuta at digi dot com dot br
Ok, fine for me?! But look this first! http://bugs.php.net/bug.php?id=3371 , TIA, Tuta Muniz.
 [2005-08-04 22:30 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-08-05 01:38 UTC] tuta at digi dot com dot br
Sorry about that ... i forgot the '8' the correct url is http://bugs.php.net/bug.php?id=33718..
 [2005-08-05 08:29 UTC] pierre at dotgeek dot org
I suggest you to mail pecl-dev mailing list. But I doubt that this extension is still useable. That said, you have better alternatives to bridge java to php. But this is not the goal of our bug system to provide such support questions. Please do no comment anymore here, definitivally not a peclweb bug.