Ask a Question related to PHP Bugs, Design and Development.
-
poon dot fung at comcast dot net #1
#40677 [NEW]: PHP crash when calling Java
From: poon dot fung at comcast dot net
Operating system: windows xp
PHP version: 5.2.1
PHP Bug Type: Java related
Bug description: PHP crash when calling Java
Description:
------------
Running the sample code in Java integration page causes PHP crash.
Reproduce code:
---------------
<?php
// get instance of Java class java.lang.System in PHP
$system = new Java('java.lang.System');
// demonstrate property access
echo 'Java version=' . $system->getProperty('java.version') . '<br />';
echo 'Java vendor=' . $system->getProperty('java.vendor') . '<br />';
echo 'OS=' . $system->getProperty('os.name') . ' ' .
$system->getProperty('os.version') . ' on ' .
$system->getProperty('os.arch') . ' <br />';
// java.util.Date example
$formatter = new Java('java.text.SimpleDateFormat',
"EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");
echo $formatter->format(new Java('java.util.Date'));
?>
Expected result:
----------------
This result is produced by PHP v4.4.5.
D:\>test-php2Java.php
can't open C:\j2sdk1.4.1_01\lib\tzmappings.
ZoneInfo: C:\j2sdk1.4.1_01\lib\zi\ZoneInfoMappings (The system cannot find
the path specified)
ZoneInfo: C:\j2sdk1.4.1_01\lib\zi\ZoneInfoMappings (The system cannot find
the path specified)
X-Powered-By: PHP/4.4.5
Content-type: text/html
Java version=1.4.1_01<br />Java vendor=Sun Microsystems Inc.<br
/>OS=Windows XP
5.1 on x86 <br />Thursday, March 01, 2007 at 5:57:08 AM Greenwich Mean
Time
Actual result:
--------------
CLI has encountered a problem and needs to close. We are sorry for the
inconvenience.
AppName: php.exe AppVer: 5.2.0.0 ModName: unknown
ModVer: 0.0.0.0 Offset: 011edf24
--
Edit bug report at [url]http://bugs.php.net/?id=40677&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40677&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40677&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40677&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40677&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=40677&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=40677&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40677&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=40677&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=40677&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=40677&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=40677&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=40677&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=40677&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40677&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=40677&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=40677&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40677&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=40677&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40677&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40677&r=mysqlcfg[/url]
poon dot fung at comcast dot net Guest
-
PLJava - Perl embeded into Java (calling Perl from Java) - 1sr release - call for tests and review, please.
Recently on perlmonks.com I have posted a prototype of Perl embeded into Java (#372197="Embeding Perl into Java to use CPAN modules directly from... -
Calling JAVA service from .NET
Hi, I have a question, somebody with exposure please answer. I need to call a JAVA webservice from C# (VS.6 & SOAP tool kit or VS.net). The Java... -
calling java object from cf
Hi there, I am trying to call a java object from cf script but its not working. I know the class should be in web_root/WEB-INF/classes folder and... -
Calling a Java Web Service From C#
Our client has a web service that we need to call to return us information about their customers. We pass in state and customer account number and... -
[newbie]Calling .net from Java
Hello, i'm using Axis for accessing a c# webservice and all works fine. Now i must use a much smaller library for accessing the ws from an applet... -
derick@php.net #2
#40677 [Opn->Fbk]: PHP crash when calling Java
ID: 40677
Updated by: [email]derick@php.net[/email]
Reported By: poon dot fung at comcast dot net
-Status: Open
+Status: Feedback
Bug Type: Java related
Operating System: windows xp
PHP Version: 5.2.1
New Comment:
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
[url]http://bugs.php.net/how-to-report.php[/url]
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2007-03-01 06:05:34] poon dot fung at comcast dot net
Description:
------------
Running the sample code in Java integration page causes PHP crash.
Reproduce code:
---------------
<?php
// get instance of Java class java.lang.System in PHP
$system = new Java('java.lang.System');
// demonstrate property access
echo 'Java version=' . $system->getProperty('java.version') . '<br
/>';
echo 'Java vendor=' . $system->getProperty('java.vendor') . '<br />';
echo 'OS=' . $system->getProperty('os.name') . ' ' .
$system->getProperty('os.version') . ' on ' .
$system->getProperty('os.arch') . ' <br />';
// java.util.Date example
$formatter = new Java('java.text.SimpleDateFormat',
"EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");
echo $formatter->format(new Java('java.util.Date'));
?>
Expected result:
----------------
This result is produced by PHP v4.4.5.
D:\>test-php2Java.php
can't open C:\j2sdk1.4.1_01\lib\tzmappings.
ZoneInfo: C:\j2sdk1.4.1_01\lib\zi\ZoneInfoMappings (The system cannot
find the path specified)
ZoneInfo: C:\j2sdk1.4.1_01\lib\zi\ZoneInfoMappings (The system cannot
find the path specified)
X-Powered-By: PHP/4.4.5
Content-type: text/html
Java version=1.4.1_01<br />Java vendor=Sun Microsystems Inc.<br
/>OS=Windows XP
5.1 on x86 <br />Thursday, March 01, 2007 at 5:57:08 AM Greenwich Mean
Time
Actual result:
--------------
CLI has encountered a problem and needs to close. We are sorry for the
inconvenience.
AppName: php.exe AppVer: 5.2.0.0 ModName: unknown
ModVer: 0.0.0.0 Offset: 011edf24
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40677&edit=1[/url]
derick@php.net Guest
-
valid at email dot address #3
#40677 [Com]: PHP crash when calling Java
ID: 40677
Comment by: valid at email dot address
Reported By: poon dot fung at comcast dot net
Status: Feedback
Bug Type: Java related
Operating System: windows xp
PHP Version: 5.2.1
New Comment:
This crash happens when you add the following to your php.ini
extension=php_java.dll
The php_java.dll from [url]http://pecl4win.php.net/ext.php/php_java.dll[/url] and
the php_java.dll which is part of the official pecl for windows
download crash the php executable.
Either remove the php_java.dll from the official pecl4win download or
or fix this bug.
Previous Comments:
------------------------------------------------------------------------
[2007-03-01 08:15:37] [email]derick@php.net[/email]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
[url]http://bugs.php.net/how-to-report.php[/url]
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2007-03-01 06:05:34] poon dot fung at comcast dot net
Description:
------------
Running the sample code in Java integration page causes PHP crash.
Reproduce code:
---------------
<?php
// get instance of Java class java.lang.System in PHP
$system = new Java('java.lang.System');
// demonstrate property access
echo 'Java version=' . $system->getProperty('java.version') . '<br
/>';
echo 'Java vendor=' . $system->getProperty('java.vendor') . '<br />';
echo 'OS=' . $system->getProperty('os.name') . ' ' .
$system->getProperty('os.version') . ' on ' .
$system->getProperty('os.arch') . ' <br />';
// java.util.Date example
$formatter = new Java('java.text.SimpleDateFormat',
"EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");
echo $formatter->format(new Java('java.util.Date'));
?>
Expected result:
----------------
This result is produced by PHP v4.4.5.
D:\>test-php2Java.php
can't open C:\j2sdk1.4.1_01\lib\tzmappings.
ZoneInfo: C:\j2sdk1.4.1_01\lib\zi\ZoneInfoMappings (The system cannot
find the path specified)
ZoneInfo: C:\j2sdk1.4.1_01\lib\zi\ZoneInfoMappings (The system cannot
find the path specified)
X-Powered-By: PHP/4.4.5
Content-type: text/html
Java version=1.4.1_01<br />Java vendor=Sun Microsystems Inc.<br
/>OS=Windows XP
5.1 on x86 <br />Thursday, March 01, 2007 at 5:57:08 AM Greenwich Mean
Time
Actual result:
--------------
CLI has encountered a problem and needs to close. We are sorry for the
inconvenience.
AppName: php.exe AppVer: 5.2.0.0 ModName: unknown
ModVer: 0.0.0.0 Offset: 011edf24
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40677&edit=1[/url]
valid at email dot address Guest
-
tony2001@php.net #4
#40677 [Fbk->Asn]: PHP crash when calling Java
ID: 40677
Updated by: [email]tony2001@php.net[/email]
Reported By: poon dot fung at comcast dot net
-Status: Feedback
+Status: Assigned
Bug Type: Java related
Operating System: windows xp
PHP Version: 5.2.1
-Assigned To:
+Assigned To: edink
New Comment:
Edin, I'd prefer the former.
Previous Comments:
------------------------------------------------------------------------
[2007-03-02 21:16:38] valid at email dot address
This crash happens when you add the following to your php.ini
extension=php_java.dll
The php_java.dll from [url]http://pecl4win.php.net/ext.php/php_java.dll[/url] and
the php_java.dll which is part of the official pecl for windows
download crash the php executable.
Either remove the php_java.dll from the official pecl4win download or
or fix this bug.
------------------------------------------------------------------------
[2007-03-01 08:15:37] [email]derick@php.net[/email]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
[url]http://bugs.php.net/how-to-report.php[/url]
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2007-03-01 06:05:34] poon dot fung at comcast dot net
Description:
------------
Running the sample code in Java integration page causes PHP crash.
Reproduce code:
---------------
<?php
// get instance of Java class java.lang.System in PHP
$system = new Java('java.lang.System');
// demonstrate property access
echo 'Java version=' . $system->getProperty('java.version') . '<br
/>';
echo 'Java vendor=' . $system->getProperty('java.vendor') . '<br />';
echo 'OS=' . $system->getProperty('os.name') . ' ' .
$system->getProperty('os.version') . ' on ' .
$system->getProperty('os.arch') . ' <br />';
// java.util.Date example
$formatter = new Java('java.text.SimpleDateFormat',
"EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");
echo $formatter->format(new Java('java.util.Date'));
?>
Expected result:
----------------
This result is produced by PHP v4.4.5.
D:\>test-php2Java.php
can't open C:\j2sdk1.4.1_01\lib\tzmappings.
ZoneInfo: C:\j2sdk1.4.1_01\lib\zi\ZoneInfoMappings (The system cannot
find the path specified)
ZoneInfo: C:\j2sdk1.4.1_01\lib\zi\ZoneInfoMappings (The system cannot
find the path specified)
X-Powered-By: PHP/4.4.5
Content-type: text/html
Java version=1.4.1_01<br />Java vendor=Sun Microsystems Inc.<br
/>OS=Windows XP
5.1 on x86 <br />Thursday, March 01, 2007 at 5:57:08 AM Greenwich Mean
Time
Actual result:
--------------
CLI has encountered a problem and needs to close. We are sorry for the
inconvenience.
AppName: php.exe AppVer: 5.2.0.0 ModName: unknown
ModVer: 0.0.0.0 Offset: 011edf24
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40677&edit=1[/url]
tony2001@php.net Guest
-
edink@php.net #5
#40677 [Asn->Sus]: PHP crash when calling Java
ID: 40677
Updated by: [email]edink@php.net[/email]
Reported By: poon dot fung at comcast dot net
-Status: Assigned
+Status: Suspended
Bug Type: Java related
Operating System: windows xp
PHP Version: 5.2.1
Assigned To: edink
New Comment:
Short of deleting it from the CVS it is not possible atm.
Java extension is not maintained and probably does not work on any
platform.
Previous Comments:
------------------------------------------------------------------------
[2007-03-05 09:49:56] [email]tony2001@php.net[/email]
Edin, I'd prefer the former.
------------------------------------------------------------------------
[2007-03-02 21:16:38] valid at email dot address
This crash happens when you add the following to your php.ini
extension=php_java.dll
The php_java.dll from [url]http://pecl4win.php.net/ext.php/php_java.dll[/url] and
the php_java.dll which is part of the official pecl for windows
download crash the php executable.
Either remove the php_java.dll from the official pecl4win download or
or fix this bug.
------------------------------------------------------------------------
[2007-03-01 08:15:37] [email]derick@php.net[/email]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
[url]http://bugs.php.net/how-to-report.php[/url]
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2007-03-01 06:05:34] poon dot fung at comcast dot net
Description:
------------
Running the sample code in Java integration page causes PHP crash.
Reproduce code:
---------------
<?php
// get instance of Java class java.lang.System in PHP
$system = new Java('java.lang.System');
// demonstrate property access
echo 'Java version=' . $system->getProperty('java.version') . '<br
/>';
echo 'Java vendor=' . $system->getProperty('java.vendor') . '<br />';
echo 'OS=' . $system->getProperty('os.name') . ' ' .
$system->getProperty('os.version') . ' on ' .
$system->getProperty('os.arch') . ' <br />';
// java.util.Date example
$formatter = new Java('java.text.SimpleDateFormat',
"EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");
echo $formatter->format(new Java('java.util.Date'));
?>
Expected result:
----------------
This result is produced by PHP v4.4.5.
D:\>test-php2Java.php
can't open C:\j2sdk1.4.1_01\lib\tzmappings.
ZoneInfo: C:\j2sdk1.4.1_01\lib\zi\ZoneInfoMappings (The system cannot
find the path specified)
ZoneInfo: C:\j2sdk1.4.1_01\lib\zi\ZoneInfoMappings (The system cannot
find the path specified)
X-Powered-By: PHP/4.4.5
Content-type: text/html
Java version=1.4.1_01<br />Java vendor=Sun Microsystems Inc.<br
/>OS=Windows XP
5.1 on x86 <br />Thursday, March 01, 2007 at 5:57:08 AM Greenwich Mean
Time
Actual result:
--------------
CLI has encountered a problem and needs to close. We are sorry for the
inconvenience.
AppName: php.exe AppVer: 5.2.0.0 ModName: unknown
ModVer: 0.0.0.0 Offset: 011edf24
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40677&edit=1[/url]
edink@php.net Guest
-
poon dot fung at comcast dot net #6
#40677 [Sus]: PHP crash when calling Java
ID: 40677
User updated by: poon dot fung at comcast dot net
Reported By: poon dot fung at comcast dot net
Status: Suspended
Bug Type: Java related
Operating System: windows xp
PHP Version: 5.2.1
Assigned To: edink
New Comment:
I read in some discussions that PHP-Java Bridge is a replacement to PHP
Java integration method. However, PHP-Java Bridge documentation shows
only methods of calling from PHP to Java application server but not
calling Java classes in-process. I would like to be able to call Java
libraries from PHP.
If PHP Java integration were to be discontinued, manual page should be
updated. I spent quite a bit of time trying to figure out why the
integration did not work because there is no indication that it may
not.
Previous Comments:
------------------------------------------------------------------------
[2007-03-05 16:00:22] [email]edink@php.net[/email]
Short of deleting it from the CVS it is not possible atm.
Java extension is not maintained and probably does not work on any
platform.
------------------------------------------------------------------------
[2007-03-05 09:49:56] [email]tony2001@php.net[/email]
Edin, I'd prefer the former.
------------------------------------------------------------------------
[2007-03-02 21:16:38] valid at email dot address
This crash happens when you add the following to your php.ini
extension=php_java.dll
The php_java.dll from [url]http://pecl4win.php.net/ext.php/php_java.dll[/url] and
the php_java.dll which is part of the official pecl for windows
download crash the php executable.
Either remove the php_java.dll from the official pecl4win download or
or fix this bug.
------------------------------------------------------------------------
[2007-03-01 08:15:37] [email]derick@php.net[/email]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
[url]http://bugs.php.net/how-to-report.php[/url]
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2007-03-01 06:05:34] poon dot fung at comcast dot net
Description:
------------
Running the sample code in Java integration page causes PHP crash.
Reproduce code:
---------------
<?php
// get instance of Java class java.lang.System in PHP
$system = new Java('java.lang.System');
// demonstrate property access
echo 'Java version=' . $system->getProperty('java.version') . '<br
/>';
echo 'Java vendor=' . $system->getProperty('java.vendor') . '<br />';
echo 'OS=' . $system->getProperty('os.name') . ' ' .
$system->getProperty('os.version') . ' on ' .
$system->getProperty('os.arch') . ' <br />';
// java.util.Date example
$formatter = new Java('java.text.SimpleDateFormat',
"EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");
echo $formatter->format(new Java('java.util.Date'));
?>
Expected result:
----------------
This result is produced by PHP v4.4.5.
D:\>test-php2Java.php
can't open C:\j2sdk1.4.1_01\lib\tzmappings.
ZoneInfo: C:\j2sdk1.4.1_01\lib\zi\ZoneInfoMappings (The system cannot
find the path specified)
ZoneInfo: C:\j2sdk1.4.1_01\lib\zi\ZoneInfoMappings (The system cannot
find the path specified)
X-Powered-By: PHP/4.4.5
Content-type: text/html
Java version=1.4.1_01<br />Java vendor=Sun Microsystems Inc.<br
/>OS=Windows XP
5.1 on x86 <br />Thursday, March 01, 2007 at 5:57:08 AM Greenwich Mean
Time
Actual result:
--------------
CLI has encountered a problem and needs to close. We are sorry for the
inconvenience.
AppName: php.exe AppVer: 5.2.0.0 ModName: unknown
ModVer: 0.0.0.0 Offset: 011edf24
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40677&edit=1[/url]
poon dot fung at comcast dot net Guest
-
peter_jones_jr at yahoo dot com #7
#40677 [Com]: PHP crash when calling Java
ID: 40677
Comment by: peter_jones_jr at yahoo dot com
Reported By: poon dot fung at comcast dot net
Status: Suspended
Bug Type: Java related
Operating System: windows xp
PHP Version: 5.2.1
Assigned To: edink
New Comment:
Hi,
the documentation which comes with PHP clearly states that ext/java
only works with some older versions of PHP4. I don't think ext/java is
mentioned in the PHP manual page, at least not on debian.
Calling Java classes in-process is not possible unless you use a PHP
implementation written in pure Java. For the Zend PHP engine you need
an external Java process. I think this is what you mean with "Java
application server".
Peter
Previous Comments:
------------------------------------------------------------------------
[2007-03-05 17:26:38] poon dot fung at comcast dot net
I read in some discussions that PHP-Java Bridge is a replacement to PHP
Java integration method. However, PHP-Java Bridge documentation shows
only methods of calling from PHP to Java application server but not
calling Java classes in-process. I would like to be able to call Java
libraries from PHP.
If PHP Java integration were to be discontinued, manual page should be
updated. I spent quite a bit of time trying to figure out why the
integration did not work because there is no indication that it may
not.
------------------------------------------------------------------------
[2007-03-05 16:00:22] [email]edink@php.net[/email]
Short of deleting it from the CVS it is not possible atm.
Java extension is not maintained and probably does not work on any
platform.
------------------------------------------------------------------------
[2007-03-05 09:49:56] [email]tony2001@php.net[/email]
Edin, I'd prefer the former.
------------------------------------------------------------------------
[2007-03-02 21:16:38] valid at email dot address
This crash happens when you add the following to your php.ini
extension=php_java.dll
The php_java.dll from [url]http://pecl4win.php.net/ext.php/php_java.dll[/url] and
the php_java.dll which is part of the official pecl for windows
download crash the php executable.
Either remove the php_java.dll from the official pecl4win download or
or fix this bug.
------------------------------------------------------------------------
[2007-03-01 08:15:37] [email]derick@php.net[/email]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
[url]http://bugs.php.net/how-to-report.php[/url]
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
[url]http://bugs.php.net/40677[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=40677&edit=1[/url]
peter_jones_jr at yahoo dot com Guest



Reply With Quote

