<?xml version="1.0"?>
<!--
	Licensed to the Apache Software Foundation (ASF) under one or more
	contributor license agreements.  See the NOTICE file distributed with
	this work for additional information regarding copyright ownership.
	The ASF licenses this file to You under the Apache License, Version 2.0
	(the "License"); you may not use this file except in compliance with
	the License.  You may obtain a copy of the License at
	
	http://www.apache.org/licenses/LICENSE-2.0
	
	Unless required by applicable law or agreed to in writing, software
	distributed under the License is distributed on an "AS IS" BASIS,
	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	See the License for the specific language governing permissions and
	limitations under the License.
-->
<document>
	<properties>
		<title>PHP Bridge Getting Started</title>
		<authors>
			<person name="Roger Ruttimann" email="rogerrut@apache.org"/>
		</authors>
	</properties>
	<body>
		<section name="Getting Started">
			<TABLE WIDTH='100%' BORDER='1' BORDERCOLOR="#000000" CELLPADDING='4' CELLSPACING='0' FRAME='BELOW' RULES='GROUPS' STYLE="page-break-before: always">
				<COLGROUP>
					<COL WIDTH='74*'/>
					<COL WIDTH='88*'/>
				</COLGROUP>
				<COLGROUP>
					<COL WIDTH='94*'/>
				</COLGROUP>
				<THEAD>
					<TR>
						<TH COLSPAN='3' WIDTH='100%' VALIGN='TOP'>
							<P>The following document describes how to install and configure
								your php-Applications</P>
						</TH>
					</TR>
				</THEAD>
				<TBODY>
					<TR VALIGN="TOP">
						<TD COLSPAN="2" WIDTH="63%">
							<P><U><B>System requirements</B></U></P>
						</TD>
						<TD WIDTH="37%">
							<P><U><B>Resources</B></U></P>
							
						</TD>
					</TR>
					<TR VALIGN="TOP">
						<TD COLSPAN="2" WIDTH="63%">
							<P><FONT SIZE="2">The PHP library needs to be in the path of the
								servlet container so that it can get invoked from the portlet.
								The library is platform specific. Download the library from the
								PHP site or from the links on the left.</FONT></P>
						</TD>
						<TD ROWSPAN="4" WIDTH="37%">
							<UL>
								
								<LI>
									<P>
										<FONT SIZE="2">Linux: </FONT>
										<A HREF="http://www.bluesunrise.com/jetspeed-2/bridges/php/dist/libphp4.so">
											<FONT SIZE="2">libphp4.so</FONT>
										</A>
									</P>
								</LI>
								<LI>
									<P>
										<FONT SIZE="2">Windows: </FONT>
										<A HREF="http://www.bluesunrise.com/jetspeed-2/bridges/php/dist/php4ts.dll">
											<FONT SIZE="2">php4ts.dll</FONT>
										</A>
										<FONT SIZE="2">&amp; </FONT>
										<A HREF="http://www.bluesunrise.com/jetspeed-2/bridges/php/dist/phpsrvlt.dll">
											<FONT SIZE="2">phpsrvlt.dll</FONT>
										</A>
									</P>
								</LI>
								<LI>
									<P>
										<FONT SIZE="2">Servlet interface between PHP libraries and portlets. The package
											is automatically downloaded to the maven/repository/itgroundwork/jars
											directory during the build.<A
												HREF="http://www.bluesunrise.com/maven/itgroundwork/jars/phpportlet-1.0.jar"
												>phportlet-1.0.jar</A></FONT>
									</P>
								</LI>
								<LI/>
								<LI>
									<FONT SIZE="2">
										<P>Entire source tree for PHP 4.3.6 which was used for building the shared
											libraries used by the portlet. PHP4 included the servlet and java
											extensions. The java and the servlet subdirectories were modified to work
											with the portlet part of the Portals Bridges Project</P>
										<P>Note: This version was successfully tested on Linux</P>
										<P>Source: <A
											HREF="http://www.bluesunrise.com/jetspeed-2/bridges/php/src/source-php-portlet-4.3.6.tar.gz"
											>PHP 4.3.6 source with modified java &amp; servlet extension</A></P>
									</FONT>
									
								</LI>
								<LI>
									<FONT SIZE="2">
										<P>In PHP 5 the Java and Servlet extensions were removed from the core product.
											They are only available in the CVS repository. An initial effort went in to
											upgrade it to PHP5 API's. The source includes the modified <A
												HREF="http://www.bluesunrise.com/jetspeed-2/bridges/php/src/source-php-portlet-5.0.4.tar.gz"
												>Extensions for PHP 5.0.4 (java &amp; servlet)</A></P>
										<P>Note: This version was tested with PHP 5 on Linux but it wasn't as stable as
											version 4.x. Using any PHP objects crashed tomcat. Running PHP 4.x style
											code worked without any problems and was stable. </P>
									</FONT>
								</LI>
							</UL>
						</TD>
					</TR>
					
				</TBODY>
				<TBODY>
					<TR>
						<TD COLSPAN='2' WIDTH='63%' VALIGN='TOP'>
							<P><FONT SIZE='3'><U><B>Setup</B></U></FONT></P>
						</TD>
					</TR>
					<TR VALIGN='TOP'>
						<TD WIDTH='29%'>
							<P><FONT SIZE='2'>Linux</FONT></P>
						</TD>
						<TD WIDTH='34%'>
							<P><FONT SIZE='2'>Windows</FONT></P>
						</TD>
					</TR>
					<TR VALIGN='TOP'>
						<TD WIDTH='29%'>
							<P><FONT SIZE='2'>Download libphp4.so and add the directory
								containing the library to the environment var  <B>LD_LIBRARY_PATH</B>.</FONT></P>
							<P><BR/>
							</P>
						</TD>
						<TD WIDTH='34%'>
							<P><FONT SIZE='2'>Download php4ts.dll and phpsrvlt.dll and add the
								directory containing  the libraries to the <B>PATH.</B></FONT></P>
						</TD>
					</TR>
				</TBODY>
			</TABLE>
		</section>
	</body>
</document>
