Here is a detailed list of the steps I went through to get the PHP
bridge working, as I promised in an earlier post. I certainly do not
claim to be an expert, but this worked for me. I am running Linux
(Centos 4.0), and I am using MySQL instead of the default Hypersonic
database.
1. Download and install JDK, Tomcat, Ant, and Maven. Be sure to
set up all the necessary environment variables and add the bin
directories to the PATH. The versions I installed were: java
1.4.2, Tomcat 5.0.30, Ant 1.6.5, and Maven 1.0.2.
2. Add a user with a management role to Tomcat.
3. Download libphp4.so from
http://www.itgroundwork.com/resources/php-setup.html. Add an
environment variable called LD_LIBRARY_PATH that points to the
directory where libphp4.so resides.
4. Download the jetspeed source code.
5. Modify the file <jetspeed-source>/portal/maven.xml to contain
the correct directory and war names for deleting the php demo
application. In the goal remove.wars (~line 704), be sure you
have the lines
<delete dir="${org.jetspeed.deploy.war.dir}/php"/>
<delete file="${org.apache.jetspeed.deploy.war.dir}/php.war"/>
(In my version of maven.xml, PHP is capitalized for both of
these tasks.)
6. Move the css and hosts directories from
<jetspeed-source>/applications/php/src/webapp to
<jetspeed-source>/applications/php/src/webapp/WEB-INF.
7. Modify the file
<jetspeed-source>/portal/src/webapp/WEB-INF/pages/default-page.psml
to include the php demo portlet. For example, add the following
code snippet:
<fragment id="dp-20" type="portlet" name="php::php-demo">
<property layout="TwoColumns" name="row" value="4" />
<property layout="TwoColumns" name="column" value="1" />
</fragment>
8. Create a mysql database to hold the php demo data.
9. Edit <jetspeed-source>/applications/php/src/webapp/WEB-INF/
hosts/conf/config.php to match the hostname, database name,
username, and password for the database created in step 8.
10. Run the script
<jetspeed-source>/applications/php/src/webapp/sql/php-demo.sql
against the database created in step 8 to populate it with php
demo data.
11. Download the latest version of the JDBC driver for MySQL from
http://dev.mysql.com/downloads/connector/j/3.1.html and copy it
to $CATALINA_HOME/common/endorsed/
12. Create MySQL test and production databases for jetspeed.
13. Create a $USER_HOME/build.properties file to match all of
these settings. For example, mine looks like this:
org.apache.jetspeed.project.home = /home/sbutman/code/jetspeed-source
org.apache.jetspeed.server.home =
/usr/local/tomcat/jakarta-tomcat-5.0.30
org.apache.jetspeed.catalina.version.major = 5
org.apache.jetspeed.server.shared =
/usr/local/tomcat/jakarta-tomcat-5.0.30/shared/lib
org.apache.jetspeed.deploy.war.dir =
/usr/local/tomcat/jakarta-tomcat-5.0.30/webapps
org.apache.jetspeed.services.autodeployment.user = sbutman
org.apache.jetspeed.services.autodeployment.password = <password>
# My SQL driver paths for test and production
org.apache.jetspeed.test.jdbc.drivers.path=/usr/local/tomcat/jakarta-tomcat-5.0.30/common/endorsed/mysql-connector-java-3.1.10-bin.jar
org.apache.jetspeed.production.jdbc.drivers.path=/usr/local/tomcat/jakarta-tomcat-5.0.30/common/endorsed/mysql-connector-java-3.1.10-bin.jar
#
-------------------------------------------------------------------------
# configure MySQL Test DB (only needed when running unit tests)
#
-------------------------------------------------------------------------
org.apache.jetspeed.test.database.default.name=mysql
org.apache.jetspeed.test.database.url =
jdbc:mysql://macbeth/jetspeed_test
org.apache.jetspeed.test.database.driver = com.mysql.jdbc.Driver
org.apache.jetspeed.test.database.user = jetspeed
org.apache.jetspeed.test.database.password = <password>
#
-------------------------------------------------------------------------
# configure MySQL Production DB
#
-------------------------------------------------------------------------
org.apache.jetspeed.production.database.default.name=mysql
org.apache.jetspeed.production.database.url =
jdbc:mysql://macbeth/jetspeed
org.apache.jetspeed.production.database.driver = com.mysql.jdbc.Driver
org.apache.jetspeed.production.database.user = jetspeed
org.apache.jetspeed.production.database.password = <password>
14. Stop the tomcat server if it is running.
15. Run maven allClean.
16. Run maven allBuild.
17. Run maven quickStart.
18. Restart the tomcat server and give it several minutes to unpack
all of the jars and wars.
19. Access the jetspeed portal page. You should see the php demo
application toward the bottom of the right-hand side of the screen.
Hope this helps.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]