php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56454 Problems with Java & PHP integration
Submitted: 2005-07-17 21:55 UTC Modified: 2005-08-05 04:29 UTC
From: tuta at digi dot com dot br Assigned:
Status: Not a bug Package: PECL bug system (PECL)
PHP Version: 5.0.3 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tuta at digi dot com dot br
New email:
PHP Version: OS:

 

 [2005-07-17 21: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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-03 10:35 UTC] mike@php.net
Sorry, but your problem does not imply a bug in PEAR itself.  For a
list of more appropriate places to ask for help using PEAR, please
visit http://pear.php.net/support/ as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PEAR.

Sorry, this has nothing to do with PEAR.
 [2005-08-03 13: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 13:51 UTC] klaus at capitalfocus dot org
This doesn't belong to the bug system, but rather to the rpc extension, which (though in the pecl cvs directory) is not a pecl extension, since it is bundled with PHP. I suggest you open this over at http://bugs.php.net/

At any rate, even if this did belong to pecl, it didn't belong in the "bug system" category. You should have chosen rpc from the dropdown box.
 [2005-08-03 22: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 18:30 UTC] klaus at capitalfocus dot org
I don't know what you mean. The bug you cited is from 2000 and was closed with a message that php3 isn't supported anymore. I don't think that's the bug you were referring to...
 [2005-08-04 21: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 04: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.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Dec 04 03:03:37 2021 UTC