From: Alan P. <api...@ma...> - 2005-11-22 17:58:55
|
I just got things working on my Mac OS X 10.4.3 box and figured I'd post my notes for posterity. I have a pretty common setup and ran into a few hiccups so hopefully this will save some others some time! Version used: php-java-bridge-2.0.8 PHP Version: 5.0.4 installed via fink Fink Setup Using libapache2-ssl-mod-php5 / php5-apache2-ssl Had to install php5-apache2-ssl-dev to get a working phpize command Build php-java-bridge as directed. Worked very well. Use --with-java= $JAVA_HOME to compile against Mac's JVM. The php-java-bridge script expects the "php" on the PATH to be the desired php. You may need to update the PHP path to /sw/bin/php5 PHP Setup php.ini setup: extension = /sw/lib/php5/20041030/java.so [java] java.log_level="3" java.log_file="/var/log/php-java-bridge.log" java.hosts=localhost:9267 #java.socketname="/var/run/.php-java-bridge_socket" NOTE: the default for php-java-bridge is to use unix sockets (java.socketname), but this doesn't work on Mac OS X. Switch to TCP by commenting out java.socketname and adding the java.hosts line. Copy php-java-bridge shell script to /usr/sbin/ and run it. That's it! After that, the test.php script worked. Enjoy, Alan |