php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37977 PHP Crash while trying to use PHP/JAVA integration
Submitted: 2006-06-30 20:15 UTC Modified: 2006-06-30 22:09 UTC
From: rohit dot keshwani at gmail dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.1.4 OS: Windows XP Media Center Edition
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rohit dot keshwani at gmail dot com
New email:
PHP Version: OS:

 

 [2006-06-30 20:15 UTC] rohit dot keshwani at gmail dot com
Description:
------------
PHP crashes when I try create a new Java class Object. I am running on Abyss Web Server. I have php_java.dll added in my php ini correctly, and it shows up under php info. I have searched the internet and have found no solution. I have checked these paths and all of them are correct and the files exist in those directories. I know that the problem here doesn't exist with the php_java.dll. I think it may have something to do with jvm.dll
[java]
  java.class.path = "c:\PHP\ext\php_java.jar"
  java.home = "C:\Program Files\Java\jdk1.5.0_07"
  java.library.path = "c:\PHP\ext"
  java.library = "C:\Program Files\Java\jdk1.5.0_07\jre\bin\server\jvm.dll"

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 "Date:".$formatter->format(new Java('java.util.Date'));
?> 

Expected result:
----------------
Java version=xxxxx
Java vendor=xxxxx
OS=xxxxx
Date:xxxxx

Actual result:
--------------
    <MATCHING_FILE NAME="ext\php_java.dll" SIZE="28735" CHECKSUM="0x91046076" BIN_FILE_VERSION="5.1.2.2" BIN_PRODUCT_VERSION="5.1.2.0" PRODUCT_VERSION="5.1.2" FILE_DESCRIPTION="Java" COMPANY_NAME="The PHP Group" PRODUCT_NAME="PHP php_java.dll" FILE_VERSION="5.1.2.2" ORIGINAL_FILENAME="php_java.dll" INTERNAL_NAME="php_java.dll" LEGAL_COPYRIGHT="Copyright ? 1997-2005 The PHP Group" VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x50001" UPTO_BIN_FILE_VERSION="5.1.2.2" UPTO_BIN_PRODUCT_VERSION="5.1.2.0" LINK_DATE="06/26/2006 20:17:48" UPTO_LINK_DATE="06/26/2006 20:17:48" VER_LANGUAGE="English (United States) [0x409]" />

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-30 22:09 UTC] tony2001@php.net
Please report PECL bugs using PECL bug system.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Aug 02 03:00:02 2025 UTC