Unfortunately you have to recompile PHP 4.4 and create a new libphp4.so library. As I mentioned earlier I'm putting together a package with the modified PHP source code for the servlet and java api one for version 4 and one for version 5.
I'll be done by the end of the week.

Hope it helps
Roger



John Voysey wrote:

Hi Steve,

Much appreciated! I've managed to get the PHP Portlet working now..

I've spent a little time trying to get this working on my Linux machine (running Gentoo 2005.0). After reading your last email, I removed PHP from my machine and downloaded libphp4.so from the ITGroundwork site, and it works!

But just to be difficult, I'm now trying to get PHP 4.4.0 (the file provided by ITGroundwork is for 4.3.6 - and ultimately I still want to get PHP 5.0.x working, but that can wait) working with Jetspeed. When I compile PHP manually and use the libphp4.so file that is created I still get the same errors as I do on Windows (see my first email in this thread).

For reference, I'm trying to use Tomcat 5.0.28 and the JDK 1.4.2.

I'm compiling PHP using the following:

  ./configure --with-java=$JAVA_HOME --with-servlet=$TOMCAT_HOME
  make && make install

This puts the PHP libraries in /usr/local/lib/php, including libphp4.so. So I modified my LD_LIBRARY_PATH:

  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/php

Restart Tomcat, open the PHP Portlet, and all I get are exceptions in the Tomcat logs.

At this stage, I'm thinking I've missed an option when compiling PHP, but I can't see anything else in the help that looks relevant.

If anyone has any clues, they would be much appreciated :)

Thanks again,

John

Steve Butman wrote:

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]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to