Skip to content

Commit

Permalink
Cleanup embedded php-cgi binaries close #3 and doc added
Browse files Browse the repository at this point in the history
  • Loading branch information
belgattitude committed Jan 14, 2017
1 parent 0fc0c6d commit 4289af9
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 6 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# CHANGELOG


## 6.2.1_1 (2017-01-15)

### Changes

- Cleanup embedded php-cgi binaries [see #3](https://github.com/belgattitude/php-java-bridge/issues/3)

### Documentation

- README.md: added Recipe for building and deploying on tomcat

31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,24 @@ $ ant

See the resulting files in the `/dist` folder :

- Files required to run the bridge under a servlet container (tomcat...)
- The bridge files.

- `php-servlet.jar`: Servlet for php-java communication (required).
- `php-script.jar`: Lib to allow java to talk with a php-cgi instance.
- `php-servlet.jar`: Servlet for php-java communication (required). Approx 58k.
- `php-script.jar`: Lib to allow java to talk with a php-cgi instance. Approx 58k.

- For convenience, you'll find ready to run war bundles, you can choose between :

- `JavaBridgeTemplate.war`: Minimal war file (only php-servlet.jar, php-script.jar, web.xml and support for system php-cgi). Approx 500k.
- `JavaBridge.war`: Example war file with some lib and examples. Approx **47Mb** !!!


- Command line standalone server to run the bridge without a servlet container (development)

- `JavaBridge.jar`: the standalone server used in [pjbserver-tools](https://github.com/belgattitude/pjbserver-tools)

*See also the [pjbserver-tools](https://github.com/belgattitude/pjbserver-tools) project which
offers command line support and api from PHP.*

- Obsolete files

- `script-api.jar`: *obsolete javax.script package. Included from Java 1.6, see [doc](https://docs.oracle.com/javase/7/docs/api/index.html?javax/script/package-summary.html)*
Expand All @@ -63,6 +69,23 @@ See the resulting files in the `/dist` folder :
*Note that if you intend to build the `Java.inc` client, you must be sure to install php < 7.0
on your machine. In case you have multiple version installed, run ant with `ant -buildfile build-php5.6.xml`.*

### How to deploy on Tomcat (Ubuntu)

Ensure you have tomcat installed and a php-cgi

```console
$ sudo apt-get install tomcat7 tomcat7-admin
$ sudo apt-get install php-cgi
```

And copy the ready to run `JavaBridgeTemplate.war` (or `JavaBridge.war` or bundle yours) in the tomcat webapps folder:

```console
cp dist/JavaBridgeTemplate.war /var/lib/tomcat7/webapps
```

Wait few seconds for deployment and point your browser to [http://localhost:8080/JavaBridge](http://localhost:8080/JavaBridgeTemplate).

### How to build documentation

You can build the doc with
Expand Down
6 changes: 5 additions & 1 deletion build-php5.6.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<project name="JavaBridge" basedir="." default="JavaBridgeWar">
<project name="JavaBridge" basedir="." default="all">
<target name="init">
<property name="javaBaseDir" value="${basedir}/server"/>
<property name="javaSourceDir" value="${javaBaseDir}"/>
Expand Down Expand Up @@ -277,4 +277,8 @@
</webinf>
</war>
</target>
<target name="all"
depends="JavaBridgeTemplateWar,JavaBridgeWar">
</target>

</project>
6 changes: 5 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<project name="JavaBridge" basedir="." default="JavaBridgeWar">
<project name="JavaBridge" basedir="." default="all">
<target name="init">
<property name="javaBaseDir" value="${basedir}/server"/>
<property name="javaSourceDir" value="${javaBaseDir}"/>
Expand Down Expand Up @@ -277,4 +277,8 @@
</webinf>
</war>
</target>
<target name="all"
depends="JavaBridgeTemplateWar,JavaBridgeWar">
</target>

</project>
Binary file removed server/WEB-INF/cgi/i386-freebsd/php-cgi
Binary file not shown.
Binary file removed server/WEB-INF/cgi/i386-linux/php-cgi
Binary file not shown.
Binary file removed server/WEB-INF/cgi/x86-sunos/php-cgi
Binary file not shown.
Binary file removed server/WEB-INF/cgi/x86-windows/php-cgi.exe
Binary file not shown.
Binary file removed server/WEB-INF/cgi/x86-windows/php5ts.dll
Binary file not shown.

0 comments on commit 4289af9

Please sign in to comment.