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 http://bugs.php.net/?id=40677&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40677&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40677&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40677&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40677&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40677&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40677&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40677&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40677&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40677&r=support Expected behavior: http://bugs.php.net/fix.php?id=40677&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40677&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40677&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40677&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40677&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40677&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40677&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40677&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40677&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40677&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40677&r=mysqlcfg