|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-03-01 08:15 UTC] derick@php.net
[2007-03-02 21:16 UTC] valid at email dot address
[2007-03-05 09:49 UTC] tony2001@php.net
[2007-03-05 16:00 UTC] edink@php.net
[2007-03-05 17:26 UTC] poon dot fung at comcast dot net
[2007-03-06 16:03 UTC] peter_jones_jr at yahoo dot com
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 06:00:02 2025 UTC |
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