Menu

[r263]: / trunk / php-java-bridge / INSTALL.WINDOWS  Maximize  Restore  History

Download this file

71 lines (47 with data), 2.4 kB

Installing the PHP/Java Bridge on Windows
----------------------------------------- 
It is recommended to use the Linux or Unix version of the PHP/Java
Bridge.  Especially the Linux version can be installed very easily
(with the command rpm -i php-java-bridge*.rpm), supports fine-grained
access control through Security Enhanced Linux and allows one to audit
the activity on the web server and the bridge.


* Install a J2RE >= 1.4.0, for example Sun JDK 1.5.0

* Download and extract php-java-bridge_*-win32-php5.zip into the
  folder: c:\php5.

* Double-Click on c:\php5\JavaBridge.jar

* Open a command window in c:\php5 and type:

   .\php-cgi test.php >result.html 

  Open the file result.html with a browser.  Search for the "java
  status" entry, it should be "java status: running", and examine the
  java properties at the bottom of the page. 

* Copy your java libraries (.jar files) into c:\php5\lib. Copy the
  php_java.dll into the extension directory of your PHP 5.0.3
  installation.

* Add the following entry to your php.ini:

          extension = php_java.dll
          [java]

* Copy the test.php into your web-server document root and browse to:

    http://localhost/test.php

* If you have problems, start the PHP/Java Bridge at log level 3

    java -jar JavaBridge.jar INET:9167 3 output.log

  or a higher log level and examine the output. Please report
  bugs/problems to the mailing list:

    php-java-bridge-users@lists.sourceforge.net


Known Windows Issues 
--------------------

* You cannot install your .jar files in /usr/share/java. Please copy
  them to c:\php5\lib, e.g. c:\php5\lib\batStore.jar. 
  The libraries can be linked with the java_require() statement, for
  example java_require('c:\php5\lib\batStore.jar');

* Both, the CGI version and the apache or isapi module are
  supported. But it is recommended to use the CGI version.

* All .ini entries except java.socketname and java.hosts are
  meaningless.

* The windows version does not support multicast sockets and therefore
  load balancing is not available.  However, it is possible to start 
  additional backends which may take over if the local backend becomes
  unavailable.  The following .ini entry directs the bridge to two
  additional backends listening on ports 9169 and 9170:

          extension = php_java.dll
          [java]
          java.hosts="127.0.0.1:9169;127.0.0.1:9170"