You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Malka Cymbalista <Ma...@weizmann.ac.il> on 2005/11/07 14:57:18 UTC

Apache, mod_perl and PHP

We are having a strange problem with our PHP sites and I was wondering
of someone has any pointers to offer.
We are running apache 2.0.55 with mod_perl 2.0.1 and php 4.3.3 and
mod_ssl 2.0.55 on  a Sun Solaris machine.  Every now and then, when
you
click on a URL that is a php script, instead of the file executing, a
File Download panel opens and it asks if you want to  save it to your
computer.  It is as if it does not recognize that it is a php file.
Sometimes it actually displays the code of the file. The really
strange
thing is that it appears to happen randomly.  That is, some times the
same link  works perfectly well and the links open properky.  But
sometimes, it asks if you want to save the file. If you click on
Cancel
and then click on the link again, it usually opens properly.
Someone told me that there are problems for mod perl and php and
mod_ssl to live together.  Most of our site is in perl so I am not
about
to give up the mod_perl abilities but there are a few people who
insist
on PHP and I'd like that to be able to work properly as well. Does
anyone have any information on this and is there anything I can do so
that everything works?

Thanks for any help.



Malka Cymbalista
Webmaster, Weizmann Institute of Science
malki.cymbalista@weizmann.ac.il
08-934-3036

Re: Apache, mod_perl and PHP

Posted by Jonathan <mo...@2xlp.com>.
i can't talk as to why that's happening - aside from stating the  
obvious that the server is forgetting to parse things as php.

what i will say is this:

redo your system as a multi-server setup.

run a seperate configuration of mod_perl bound to port 8080 or  
something on localhost, and proxypass to it.
run mod_ssl on the front and let that handle the decryption, static  
files, and toss php on it if needed (or run php on something else)

that  should not only get rid of compatibility issues, but save you a  
lot of overhead... the only reason you should be running php and  
mod_perl on the same server instance is if they need to talk to each  
other.  you're wasting a bunch of memory and overhead otherwise.



On Nov 7, 2005, at 8:57 AM, Malka Cymbalista wrote:

> We are having a strange problem with our PHP sites and I was wondering
> of someone has any pointers to offer.
> We are running apache 2.0.55 with mod_perl 2.0.1 and php 4.3.3 and
> mod_ssl 2.0.55 on  a Sun Solaris machine.  Every now and then, when
> you
> click on a URL that is a php script, instead of the file executing, a
> File Download panel opens and it asks if you want to  save it to your
> computer.  It is as if it does not recognize that it is a php file.
> Sometimes it actually displays the code of the file. The really
> strange
> thing is that it appears to happen randomly.  That is, some times the
> same link  works perfectly well and the links open properky.  But
> sometimes, it asks if you want to save the file. If you click on
> Cancel
> and then click on the link again, it usually opens properly.
> Someone told me that there are problems for mod perl and php and
> mod_ssl to live together.  Most of our site is in perl so I am not
> about
> to give up the mod_perl abilities but there are a few people who
> insist
> on PHP and I'd like that to be able to work properly as well. Does
> anyone have any information on this and is there anything I can do so
> that everything works?
>
> Thanks for any help.
>
>
>
> Malka Cymbalista
> Webmaster, Weizmann Institute of Science
> malki.cymbalista@weizmann.ac.il
> 08-934-3036
>