Build your professional network on facebook via our app Go to app
 
 
Posted in Community :

Tech World

Activity:  14 comments  993 views  last activity : 04 16 2012 05:38:34 +0000
 Refer 40
Share
 
 
 

Go to http://www.php.net/downloads.php and download the current version.

PECL modules : Event:http://museum.php.net/php5/pecl-5.2.5-Win32.zip

create "php" directory in folder C:\Program Files\Apache Software Foundation\Tomcat 6.0

Rename php.ini-dist to php.ini

Extract php5servlet.dll from the PECL zip file to C:\Program Files\Apache Software Foundation\Tomcat 6.0\php

create directory phptest under C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps

create sub directory WEB-INF in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\phptest

in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\phptest\WEB-INF create xml file "web.xml"

copy pest below code into web.xml
================================================

<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "

xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd ">

<servlet>

<servlet-name>php</servlet-name>

<servlet-class>net.php.servlet</servlet-class>

</servlet>

<servlet>

<servlet-name>php-formatter</servlet-name>

<servlet-class>net.php.formatter</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>php</servlet-name>

<url-pattern>*.php</url-pattern>

</servlet-mapping>

<servlet-mapping>

<servlet-name>php-formatter</servlet-name>

<url-pattern>*.phps</url-pattern>

</servlet-mapping>

</web-app>
=============================================

Extract/unjar (using jar xvf or WinZip) php5srvlt.jar from pecl folder to : C:\Program Files\Apache Software Foundation\Tomcat 6.0\php\tmp

Modify both C:\Program Files\Apache Software Foundation\Tomcat 6.0\php\tmp\netreflect.properties and C:\Program Files\Apache Software Foundation\Tomcat 6.0\php\tmp\netservlet.properties,

original code : library=phpsrvlt
replace with code : library=php5servlet

Jar the content of C:\Program Files\Apache Software Foundation\Tomcat 6.0\php\tmp into a new version of php5srvlt.jar (command by command prompt: jar -cf php5srvlt.jar *.*)

Move php5srvlt.jar to C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\

Copy C:\Program Files\Apache Software Foundation\Tomcat 6.0\php\php5servlet.dll and C:\Program Files\Apache Software Foundation\Tomcat 6.0\php\php5ts.dll to c:windowssystem32

Create a test page in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\phptest\test.php with this contents:  <?php phpinfo(); ?>

restart Tomcat and go to http://serevrip/phptest/test.php

 
11 comments on "configure php with tomcat"
  Commented by  sameer kamble, IT Manager, indsoft systems    | 01 28 2012 16:12:56 +0000
While installing payment gateway on windows server with java. its useful.
 
  Commented by  sameer kamble, IT Manager, indsoft systems    | 02 25 2011 15:25:11 +0000
this is full of RND work, i started php on tomcat after two days. 
  Commented by  Ankur Tripathi, Btech student, integral university    | 02 24 2011 22:09:57 +0000
nd haan this is the error inside the log file which is created under tomcat 
 "25 Feb, 2011 3:30:40 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized()"

nd dose php used for 64 bit system should be differnt as mine is 64 bit
my php version is 5.3.5
   pecl version is 5.2.5 win32
   tomcat 6
  Commented by  Ankur Tripathi, Btech student, integral university    | 02 24 2011 21:34:28 +0000
well thanks for ur quick reply...per sir jee how can i give u control of my system as i dont know u personally....no offence...

just to tell you my browser is able to display the html content of the file "test.php" if i include any in that.

but when i write only php code it displays a blank page
  Commented by  sameer kamble, IT Manager, indsoft systems    | 02 24 2011 16:52:09 +0000
@  Ankur
install ammy.exe  on your machine , or you can give me RDP of your server. then contacr me on g talk ,m always online, my id servtrix@gmail.com
  Commented by  Ankur Tripathi, Btech student, integral university    | 02 24 2011 13:41:05 +0000
@ sameer..

i dont know it is possible or not......how to do it????

actually i am a bit new to this stuff :)
  Commented by  sameer kamble, IT Manager, indsoft systems    | 02 24 2011 08:29:32 +0000
@  Ankur
Hi 
i need to check your server, is it possible?
  Commented by  Ankur Tripathi, Btech student, integral university    | 02 24 2011 00:52:29 +0000
Thanks for this....really appreciate ur effort

i did everything as illustrated step by step

but i couldnt the final test page.

i believe it should display information about PHP version etc...
but my browser displays the text written it that php.test file as it is....

any help would be great??
Thanks Sameer. It works......
  Commented by  sameer kamble, IT Manager, indsoft systems    | 12 15 2010 13:23:37 +0000
this is useful when you are integrate payment gateway in php  
  Commented by  akshaya bhatia, Program Manager (GM Projects-IT), fsl    | 12 15 2010 08:48:38 +0000
Useful info.,XAMPP is also good environ. to test PHP programs, Is there some advantage of configuring PHP with Tomcat?!
Add your comment on "configure php with tomcat"

Rate:
Submit
Leading Semiconductor and System Design Services Company.
WhizChip is a Semiconductor and System Design Services Company offering a broad spectrum of ASIC / SoC and related system design services & solutions to leading semiconductor and system design - companies around the world. Our unique expertise and customised / milestone based service engagement......
Viewers also viewed
PHP vs ASP.NET
 
0 referals 10 arguments, 2738 views
Obviously there is never a winner in “language X is better/faster/more scalable than language...
 
3 referals 33 arguments, 53197 views
 
0 referals 4 answers, 5631 views
more...  
Recent Knowledge (61)
Online DOCTOR- Informative too....     This site is very informative, which ever diseases you...
 
103 referals 10 comments, 237 views
Recovery of its due has been a hectic exercise for the Banks in the absence of a special...
 
1 referals 1 comments, 0 views
No 1: India Since 1991, when economic liberalization unshackled India from the slow rate of...
 
202 referals 5 comments, 85 views
more...  
More From Author
While installing payment gateway on windows server with java. its useful.
Tips for avoid sleepiness During the Day at work
After deciding on a property,the next big thing one does is to look for a good home loan. While people think that there is no big deal in getting a home loan with Bank waiting in queue to offer home loans. getting home loan is very difficult.
more...