You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by michel <co...@videotron.ca> on 2009/02/25 17:59:19 UTC

Getting PHP to work on Tomcat

I am running Tomcat (finally got it set up!) , and I would like to run some PHP software on it also. I tried Quercus and ran into some bugs, seemingly because the Quercus implementation isn't complete. 

Has anybody really gotten a reliable PHP going on Tomcat?


Thanks!

Re: Getting PHP to work on Tomcat

Posted by Victor H De la Luz <it...@gmail.com>.
On Wed, Feb 25, 2009 at 1:59 PM, michel <co...@videotron.ca> wrote:
> I am running Tomcat (finally got it set up!) , and I would like to run some PHP software on it also. I tried Quercus and ran into some bugs, seemingly because the Quercus implementation isn't complete.
>
> Has anybody really gotten a reliable PHP going on Tomcat?
>
>
> Thanks!
>

Yes, I'm using tomcat with php in a Linux Debian Lenny. I have a wiki
and in the same time my jsp aplications.

I get the tomcat-6 from apache webpage and install the php and php-cgi
package from the repositories from debian (via aptitude).

Then edit the file conf/web.xml:

   <servlet>
        <servlet-name>cgi</servlet-name>
        <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
        <init-param>
          <param-name>debug</param-name>
          <param-value>0</param-value>
        </init-param>
        <init-param>
          <param-name>cgiPathPrefix</param-name>
          <param-value>php</param-value>
        </init-param>
      <init-param>
          <param-name>executable</param-name>
          <param-value>php-cgi</param-value>
        </init-param>
         <load-on-startup>5</load-on-startup>
    </servlet>

   <servlet-mapping>
        <servlet-name>cgi</servlet-name>
        <url-pattern>/dev/*</url-pattern>
    </servlet-mapping>

    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
	<welcome-file>index.php</welcome-file>
    </welcome-file-list>


You can do it this in other plataform with any CGI.
Only you need one "executable" to convert the .php into html.

Saludos!

-- 
ItZtLi

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


Re: Getting PHP to work on Tomcat

Posted by michel <co...@videotron.ca>.
Martin, I love the analogy! But I am trying to run Dokuwiki on Tomcat. The 
reality is that there are a lot of PHP-writen stuff out there that I would 
love to be able to run on Tomcat; not because it's PHP, but because it 
works. This is one of those cases where "works" is alerady good enough.


Michel


----- Original Message ----- 
From: "Martin Gainty" <mg...@hotmail.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Wednesday, February 25, 2009 2:20 PM
Subject: RE: Getting PHP to work on Tomcat



you have to feed your PHP script to Tomcat CGIServlet
Not to belabor the point but you're saying you want to race your Yugo 
(PHPScript) at Lemans
instead of a Ferrari(Tomcat)..

Would you really want to run single-processing/single thread proc instead of 
a
Object Oriented multi-language running in a multi-thread aware container
?

Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official 
business of Sender. This transmission is of a confidential nature and Sender 
does not endorse distribution to any party other than intended recipient. 
Sender does not necessarily endorse content contained within this 
transmission.




> From: compukat@videotron.ca
> To: users@tomcat.apache.org
> Subject: Getting PHP to work on Tomcat
> Date: Wed, 25 Feb 2009 11:59:19 -0500
>
> I am running Tomcat (finally got it set up!) , and I would like to run 
> some PHP software on it also. I tried Quercus and ran into some bugs, 
> seemingly because the Quercus implementation isn't complete.
>
> Has anybody really gotten a reliable PHP going on Tomcat?
>
>
> Thanks!

_________________________________________________________________
Windows Live™ Hotmail®:…more than just e-mail.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_explore_022009 


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


Re: Getting PHP to work on Tomcat

Posted by michel <co...@videotron.ca>.
Ok, thanks all for all the great help! I will be taking a wack at these very 
helpful ideas and I hope that I can figure it out and make it work.

 


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


RE: Getting PHP to work on Tomcat

Posted by Martin Gainty <mg...@hotmail.com>.
you have to feed your PHP script to Tomcat CGIServlet
Not to belabor the point but you're saying you want to race your Yugo (PHPScript) at Lemans
instead of a Ferrari(Tomcat)..

Would you really want to run single-processing/single thread proc instead of a 
Object Oriented multi-language running in a multi-thread aware container 
?

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 




> From: compukat@videotron.ca
> To: users@tomcat.apache.org
> Subject: Getting PHP to work on Tomcat
> Date: Wed, 25 Feb 2009 11:59:19 -0500
> 
> I am running Tomcat (finally got it set up!) , and I would like to run some PHP software on it also. I tried Quercus and ran into some bugs, seemingly because the Quercus implementation isn't complete. 
> 
> Has anybody really gotten a reliable PHP going on Tomcat?
> 
> 
> Thanks!

_________________________________________________________________
Windows Live™ Hotmail®:…more than just e-mail. 
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_explore_022009