You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by puneetjain <pu...@wipro.com> on 2008/02/05 06:57:14 UTC

Facing problem in integration of PHP and tomcat

Hi,

I am trying to integrate PHP with tomcat server i.e. trying to running PHP
in servlet container.

Environment:
=========
Operating System: RedHat Enterprize Linux 3
Tomcat Version: 6
PHP version: 5.2.5
Java: 1.5

Steps Performed:
============
1. Install the tomcat.
2. Install the php
3. Create a web project.
4. Place the php5servlet.jar in the WEB_INF/lib directory.
5. Add the below entry in my web.xml.

     <?xml version="1.0" encoding="ISO-8859-1"?>
     <web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.3"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http:/java.sun.com/dtd/web-app_2_3.dtd">

          <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>

6. Create a war file and deployed on the tomcat.

Exception:
=======
When I tried to deploy this war file it says that the libphp5servlet.so and
libphp5.so libraries are missing.

I have tried these steps on Windows XP and used php5servlet.dll. PHP is
working on tomcat in windows. 

I am unable to find the procedure to create/get the libphp5servlet.so and
libphp5.so library to run PHP in Tomcat container in Linux Environment.

Please help me to resolve this problem.

Thanks,
Puneet
-- 
View this message in context: http://www.nabble.com/Facing-problem-in-integration-of-PHP-and-tomcat-tp15283840p15283840.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Facing problem in integration of PHP and tomcat

Posted by YogeshArora <yo...@wipro.com>.
Hi,

Thanks for the reply !

Actually, I am not able to find these dependencies on the internet.
Could you please help me in finding these dependencies or provide some links
from where I can download it.

Thanks,
Yogesh


Goldstein, Barry A wrote:
> 
>  
> I looked on google and it looks like these shared libraries mysql.so,
> mcrypt.so, and mbstring.so are php extensions for communicating with
> mysql, doing encryption and decryption, etc. You probably need to download
> these extensions and follow some kind of installation to use them.
> 
> Thank you,
> Barry 
> 
> -----Original Message-----
> From: YogeshArora [mailto:yogesh.kumar3@wipro.com] 
> Sent: Tuesday, February 05, 2008 10:57 AM
> To: users@tomcat.apache.org
> Subject: Re: Facing problem in integration of PHP and tomcat
> 
> 
> Hi,
> 
> Thanks for the response !
> 
> I tried the below URL sent by you.  I have successfully setup the JSR 223
> reference implementation on my Linux, but when I tried to deploy the WAR
> fille containing the PHP code, I am getting the errors in the following
> environment.
> 
> Here are the environment details
> ========================
> Operation System - Red Hat Enterprise Edition Linux Version 4
> JDK - jdk1.5.0_14
> Tomcat - version 6.0.14
> PHP - Version 5.2.5
> 
> Errors Encountered
> ===============
> 
> Warning: main(./config.inc.php) [function.main]: failed to open stream: No
> such file or directory in /collabo/sns/public_html/index.php on line 7
> 
> Fatal error: main() [function.require]: Failed opening required
> './config.inc.php' (include_path='.:') in
> /collabo/sns/public_html/index.php
> on line 7
> 
> Please help in resolving the issue.
> 
> Thanks,
> Yogesh
> 
> I have tried the 
> 
> David Delbecq-2 wrote:
>> 
>> Did you try this? http://www.alexander-merz.com/21.html
>> En l'instant précis du 05/02/08 06:57, puneetjain s'exprimait en ces 
>> termes:
>>> Hi,
>>>
>>> I am trying to integrate PHP with tomcat server i.e. trying to running
>>> PHP
>>> in servlet container.
>>>
>>> Environment:
>>> =========
>>> Operating System: RedHat Enterprize Linux 3
>>> Tomcat Version: 6
>>> PHP version: 5.2.5
>>> Java: 1.5
>>>
>>> Steps Performed:
>>> ============
>>> 1. Install the tomcat.
>>> 2. Install the php
>>> 3. Create a web project.
>>> 4. Place the php5servlet.jar in the WEB_INF/lib directory.
>>> 5. Add the below entry in my web.xml.
>>>
>>>      <?xml version="1.0" encoding="ISO-8859-1"?>
>>>      <web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.3"
>>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>          xsi:schemaLocation="http:/java.sun.com/dtd/web-app_2_3.dtd">
>>>
>>>           <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>
>>>
>>> 6. Create a war file and deployed on the tomcat.
>>>
>>> Exception:
>>> =======
>>> When I tried to deploy this war file it says that the libphp5servlet.so
>>> and
>>> libphp5.so libraries are missing.
>>>
>>> I have tried these steps on Windows XP and used php5servlet.dll. PHP is
>>> working on tomcat in windows. 
>>>
>>> I am unable to find the procedure to create/get the libphp5servlet.so
>>> and
>>> libphp5.so library to run PHP in Tomcat container in Linux Environment.
>>>
>>> Please help me to resolve this problem.
>>>
>>> Thanks,
>>> Puneet
>>>   
>> 
>> 
>> -- 
>> http://www.devlog.be (a belgian developer's logs)
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Facing-problem-in-integration-of-PHP-and-tomcat-tp15283840p15292920.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> 
> *******************************
> The information contained in this message may be privileged and/or
> confidential and protected from disclosure. If the reader of this message
> is not the intended recipient, or an employee or agent responsible for
> delivering this message to the intended recipient, you are hereby notified
> that any dissemination, distribution or copying of this communication is
> strictly prohibited. Note that any views or opinions presented in this
> message are solely those of the author and do not necessarily represent
> those of Ameren. All emails are subject to monitoring and archival.
> Finally, the recipient should check this message and any attachments for
> the presence of viruses. Ameren accepts no liability for any damage caused
> by any virus transmitted by this email. If you have received this in
> error, please notify the sender immediately by replying to the message and
> deleting the material from any computer. Ameren Corporation
> *******************************
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Facing-problem-in-integration-of-PHP-and-tomcat-tp15283840p15349900.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Facing problem in integration of PHP and tomcat

Posted by "Goldstein, Barry A" <BG...@ameren.com>.
 
I looked on google and it looks like these shared libraries mysql.so, mcrypt.so, and mbstring.so are php extensions for communicating with mysql, doing encryption and decryption, etc. You probably need to download these extensions and follow some kind of installation to use them.

Thank you,
Barry 

-----Original Message-----
From: YogeshArora [mailto:yogesh.kumar3@wipro.com] 
Sent: Tuesday, February 05, 2008 10:57 AM
To: users@tomcat.apache.org
Subject: Re: Facing problem in integration of PHP and tomcat


Hi,

Thanks for the response !

I tried the below URL sent by you.  I have successfully setup the JSR 223
reference implementation on my Linux, but when I tried to deploy the WAR
fille containing the PHP code, I am getting the errors in the following
environment.

Here are the environment details
========================
Operation System - Red Hat Enterprise Edition Linux Version 4
JDK - jdk1.5.0_14
Tomcat - version 6.0.14
PHP - Version 5.2.5

Errors Encountered
===============

Warning: main(./config.inc.php) [function.main]: failed to open stream: No
such file or directory in /collabo/sns/public_html/index.php on line 7

Fatal error: main() [function.require]: Failed opening required
'./config.inc.php' (include_path='.:') in /collabo/sns/public_html/index.php
on line 7

Please help in resolving the issue.

Thanks,
Yogesh

I have tried the 

David Delbecq-2 wrote:
> 
> Did you try this? http://www.alexander-merz.com/21.html
> En l'instant précis du 05/02/08 06:57, puneetjain s'exprimait en ces 
> termes:
>> Hi,
>>
>> I am trying to integrate PHP with tomcat server i.e. trying to running
>> PHP
>> in servlet container.
>>
>> Environment:
>> =========
>> Operating System: RedHat Enterprize Linux 3
>> Tomcat Version: 6
>> PHP version: 5.2.5
>> Java: 1.5
>>
>> Steps Performed:
>> ============
>> 1. Install the tomcat.
>> 2. Install the php
>> 3. Create a web project.
>> 4. Place the php5servlet.jar in the WEB_INF/lib directory.
>> 5. Add the below entry in my web.xml.
>>
>>      <?xml version="1.0" encoding="ISO-8859-1"?>
>>      <web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.3"
>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>          xsi:schemaLocation="http:/java.sun.com/dtd/web-app_2_3.dtd">
>>
>>           <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>
>>
>> 6. Create a war file and deployed on the tomcat.
>>
>> Exception:
>> =======
>> When I tried to deploy this war file it says that the libphp5servlet.so
>> and
>> libphp5.so libraries are missing.
>>
>> I have tried these steps on Windows XP and used php5servlet.dll. PHP is
>> working on tomcat in windows. 
>>
>> I am unable to find the procedure to create/get the libphp5servlet.so and
>> libphp5.so library to run PHP in Tomcat container in Linux Environment.
>>
>> Please help me to resolve this problem.
>>
>> Thanks,
>> Puneet
>>   
> 
> 
> -- 
> http://www.devlog.be (a belgian developer's logs)
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Facing-problem-in-integration-of-PHP-and-tomcat-tp15283840p15292920.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


*******************************
The information contained in this message may be privileged and/or confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. Note that any views or opinions presented in this message are solely those of the author and do not necessarily represent those of Ameren. All emails are subject to monitoring and archival. Finally, the recipient should check this message and any attachments for the presence of viruses. Ameren accepts no liability for any damage caused by any virus transmitted by this email. If you have received this in error, please notify the sender immediately by replying to the message and deleting the material from any computer. Ameren Corporation
*******************************



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Facing problem in integration of PHP and tomcat

Posted by YogeshArora <yo...@wipro.com>.
Hi,

Thanks for the response !

I tried the below URL sent by you.  I have successfully setup the JSR 223
reference implementation on my Linux, but when I tried to deploy the WAR
fille containing the PHP code, I am getting the errors in the following
environment.

Here are the environment details
========================
Operation System - Red Hat Enterprise Edition Linux Version 4
JDK - jdk1.5.0_14
Tomcat - version 6.0.14
PHP - Version 5.2.5

Errors Encountered
===============

Warning: main(./config.inc.php) [function.main]: failed to open stream: No
such file or directory in /collabo/sns/public_html/index.php on line 7

Fatal error: main() [function.require]: Failed opening required
'./config.inc.php' (include_path='.:') in /collabo/sns/public_html/index.php
on line 7

Please help in resolving the issue.

Thanks,
Yogesh

I have tried the 

David Delbecq-2 wrote:
> 
> Did you try this? http://www.alexander-merz.com/21.html
> En l'instant précis du 05/02/08 06:57, puneetjain s'exprimait en ces 
> termes:
>> Hi,
>>
>> I am trying to integrate PHP with tomcat server i.e. trying to running
>> PHP
>> in servlet container.
>>
>> Environment:
>> =========
>> Operating System: RedHat Enterprize Linux 3
>> Tomcat Version: 6
>> PHP version: 5.2.5
>> Java: 1.5
>>
>> Steps Performed:
>> ============
>> 1. Install the tomcat.
>> 2. Install the php
>> 3. Create a web project.
>> 4. Place the php5servlet.jar in the WEB_INF/lib directory.
>> 5. Add the below entry in my web.xml.
>>
>>      <?xml version="1.0" encoding="ISO-8859-1"?>
>>      <web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.3"
>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>          xsi:schemaLocation="http:/java.sun.com/dtd/web-app_2_3.dtd">
>>
>>           <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>
>>
>> 6. Create a war file and deployed on the tomcat.
>>
>> Exception:
>> =======
>> When I tried to deploy this war file it says that the libphp5servlet.so
>> and
>> libphp5.so libraries are missing.
>>
>> I have tried these steps on Windows XP and used php5servlet.dll. PHP is
>> working on tomcat in windows. 
>>
>> I am unable to find the procedure to create/get the libphp5servlet.so and
>> libphp5.so library to run PHP in Tomcat container in Linux Environment.
>>
>> Please help me to resolve this problem.
>>
>> Thanks,
>> Puneet
>>   
> 
> 
> -- 
> http://www.devlog.be (a belgian developer's logs)
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Facing-problem-in-integration-of-PHP-and-tomcat-tp15283840p15292920.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Facing problem in integration of PHP and tomcat

Posted by David Delbecq <de...@oma.be>.
Did you try this? http://www.alexander-merz.com/21.html
En l'instant précis du 05/02/08 06:57, puneetjain s'exprimait en ces 
termes:
> Hi,
>
> I am trying to integrate PHP with tomcat server i.e. trying to running PHP
> in servlet container.
>
> Environment:
> =========
> Operating System: RedHat Enterprize Linux 3
> Tomcat Version: 6
> PHP version: 5.2.5
> Java: 1.5
>
> Steps Performed:
> ============
> 1. Install the tomcat.
> 2. Install the php
> 3. Create a web project.
> 4. Place the php5servlet.jar in the WEB_INF/lib directory.
> 5. Add the below entry in my web.xml.
>
>      <?xml version="1.0" encoding="ISO-8859-1"?>
>      <web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.3"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http:/java.sun.com/dtd/web-app_2_3.dtd">
>
>           <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>
>
> 6. Create a war file and deployed on the tomcat.
>
> Exception:
> =======
> When I tried to deploy this war file it says that the libphp5servlet.so and
> libphp5.so libraries are missing.
>
> I have tried these steps on Windows XP and used php5servlet.dll. PHP is
> working on tomcat in windows. 
>
> I am unable to find the procedure to create/get the libphp5servlet.so and
> libphp5.so library to run PHP in Tomcat container in Linux Environment.
>
> Please help me to resolve this problem.
>
> Thanks,
> Puneet
>   


-- 
http://www.devlog.be (a belgian developer's logs)



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Facing problem in integration of PHP and tomcat

Posted by YogeshArora <yo...@wipro.com>.
Hi Barry,

Thanks a lot for the reply !

I am getting the following error:

<<Fatal error: Call to undefined function mb_language() in
/usr/oki_software/tomcat/apache-tomcat-6.0.14/config.php on line 403>>

Could you please tell me from where I can get the shared objects?

I need the follwoing Shared objects for PHP 5.2.5 on Linux version 4:
1. mbstring.so
2. mcrypt.so
3. mysql.so

Please help me in the same !

Thanks,
Yogesh


Goldstein, Barry A wrote:
> 
>  
> In Linux you need to put the directory containing these shared libraries
> in your LD_LIBRARY_PATH environment variable and export the variable.
> These are the directories that the loader searches to dynamically load
> modules at runtime.
> 
> Thank you,
> Barry
> 
> -----Original Message-----
> From: puneetjain [mailto:puneet.jain1@wipro.com] 
> Sent: Monday, February 04, 2008 11:57 PM
> To: users@tomcat.apache.org
> Subject: Facing problem in integration of PHP and tomcat
> 
> 
> Hi,
> 
> I am trying to integrate PHP with tomcat server i.e. trying to running
> PHP
> in servlet container.
> 
> Environment:
> =========
> Operating System: RedHat Enterprize Linux 3
> Tomcat Version: 6
> PHP version: 5.2.5
> Java: 1.5
> 
> Steps Performed:
> ============
> 1. Install the tomcat.
> 2. Install the php
> 3. Create a web project.
> 4. Place the php5servlet.jar in the WEB_INF/lib directory.
> 5. Add the below entry in my web.xml.
> 
>      <?xml version="1.0" encoding="ISO-8859-1"?>
>      <web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.3"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http:/java.sun.com/dtd/web-app_2_3.dtd">
> 
>           <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>
> 
> 6. Create a war file and deployed on the tomcat.
> 
> Exception:
> =======
> When I tried to deploy this war file it says that the libphp5servlet.so
> and
> libphp5.so libraries are missing.
> 
> I have tried these steps on Windows XP and used php5servlet.dll. PHP is
> working on tomcat in windows. 
> 
> I am unable to find the procedure to create/get the libphp5servlet.so
> and
> libphp5.so library to run PHP in Tomcat container in Linux Environment.
> 
> Please help me to resolve this problem.
> 
> Thanks,
> Puneet
> -- 
> View this message in context:
> http://www.nabble.com/Facing-problem-in-integration-of-PHP-and-tomcat-tp
> 15283840p15283840.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> 
> *******************************
> The information contained in this message may be privileged and/or
> confidential and protected from disclosure. If the reader of this message
> is not the intended recipient, or an employee or agent responsible for
> delivering this message to the intended recipient, you are hereby notified
> that any dissemination, distribution or copying of this communication is
> strictly prohibited. Note that any views or opinions presented in this
> message are solely those of the author and do not necessarily represent
> those of Ameren. All emails are subject to monitoring and archival.
> Finally, the recipient should check this message and any attachments for
> the presence of viruses. Ameren accepts no liability for any damage caused
> by any virus transmitted by this email. If you have received this in
> error, please notify the sender immediately by replying to the message and
> deleting the material from any computer. Ameren Corporation
> *******************************
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Facing-problem-in-integration-of-PHP-and-tomcat-tp15283840p15306343.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Facing problem in integration of PHP and tomcat

Posted by "Goldstein, Barry A" <BG...@ameren.com>.
 
In Linux you need to put the directory containing these shared libraries
in your LD_LIBRARY_PATH environment variable and export the variable.
These are the directories that the loader searches to dynamically load
modules at runtime.

Thank you,
Barry

-----Original Message-----
From: puneetjain [mailto:puneet.jain1@wipro.com] 
Sent: Monday, February 04, 2008 11:57 PM
To: users@tomcat.apache.org
Subject: Facing problem in integration of PHP and tomcat


Hi,

I am trying to integrate PHP with tomcat server i.e. trying to running
PHP
in servlet container.

Environment:
=========
Operating System: RedHat Enterprize Linux 3
Tomcat Version: 6
PHP version: 5.2.5
Java: 1.5

Steps Performed:
============
1. Install the tomcat.
2. Install the php
3. Create a web project.
4. Place the php5servlet.jar in the WEB_INF/lib directory.
5. Add the below entry in my web.xml.

     <?xml version="1.0" encoding="ISO-8859-1"?>
     <web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.3"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http:/java.sun.com/dtd/web-app_2_3.dtd">

          <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>

6. Create a war file and deployed on the tomcat.

Exception:
=======
When I tried to deploy this war file it says that the libphp5servlet.so
and
libphp5.so libraries are missing.

I have tried these steps on Windows XP and used php5servlet.dll. PHP is
working on tomcat in windows. 

I am unable to find the procedure to create/get the libphp5servlet.so
and
libphp5.so library to run PHP in Tomcat container in Linux Environment.

Please help me to resolve this problem.

Thanks,
Puneet
-- 
View this message in context:
http://www.nabble.com/Facing-problem-in-integration-of-PHP-and-tomcat-tp
15283840p15283840.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


*******************************
The information contained in this message may be privileged and/or confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. Note that any views or opinions presented in this message are solely those of the author and do not necessarily represent those of Ameren. All emails are subject to monitoring and archival. Finally, the recipient should check this message and any attachments for the presence of viruses. Ameren accepts no liability for any damage caused by any virus transmitted by this email. If you have received this in error, please notify the sender immediately by replying to the message and deleting the material from any computer. Ameren Corporation
*******************************



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org