Showing posts with label tomcat. Show all posts
Showing posts with label tomcat. Show all posts

Wednesday, April 9, 2008

Configuring PHP on Tomcat

Preparing

PHP Version 5.2.5
Tomcat Version 5.5.25

Let's assume that your current Tomcat install can be found in c:\Tomcat5\

Download PHP and PECL

PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.

1. Surf to http://www.php.net/downloads.php and download the current version of PHP for Windows machine.
2. Download the corresponding PECL modules.

Configure Tomcat

1. Create a c:\Tomcat5\php\ directory and unzip the PHP zip file in it.
2. Rename php.ini-dist, in c:\Tomcat5\php\, to php.ini
3. Extract php5servlet.dll from the PECL zip file to c:\Tomcat5\php\
4. Create a directory under c:\Tomcat5\webapps\; in our case: phptest
5. In c:\Tomcat5\webapps\phptest\, create a subdirectory: WEB-INF
6. In c:\Tomcat5\webapps\phptest\WEB-INF\,
create web.xml with the following content:



7. Rename php5servlet.dll to php5srvlt.dll.
8. Copy c:\Tomcat5\php\ php5srvlt.dll and c:\Tomcat5\php\php5ts.dll to c:\windows\system32\
9. Create a test page in c:\Tomcat5\webapps\phptest\test.php with this contents:



10. (For Tomcat 4.x copy phpsrvlt.jar c:\Tomcat4\php to c:\Tomcat4\lib)

Run PHP in Tomcat

Start Tomcat and go to http://localhost:8080/phptest/test.php

Monday, January 21, 2008

Web Technologies and Compatible Versions


Tomcat

J2SE

Servlet

JSP

J2EE

JSF


6.0.x

5/6

2.5

2.1

1.5

1.2


5.5.x

1.4

2.4

2.0

1.4

-


4.1.x

1.3

2.3

1.2

1.3

1.0/1.1


3.3.x

1.2

2.2

1.1

1.2

-