Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Remove "Content-type: text/html" header on each page PHP CGI

335 views
Skip to first unread message

Andrew

unread,
Jun 3, 2003, 9:39:53 AM6/3/03
to
Folks,

When I ran php as a dso, I never got this header: Content-type:
text/html, but when I switched to PHP CGI (for modules that require it
- I have to do it), I get this on each page. I really want to remove
it.

I have seen this info on the web before, but all I get is that you
need to add a -q somewhere. I really don't know where. I would
really appreciate any help that you folks can offer.

Thanks in Advance.

Andrew

Arnoud Galactus Engelfriet

unread,
Jun 3, 2003, 2:42:12 PM6/3/03
to
In article <9571151f.03060...@posting.google.com>,

Andrew <joe_...@linuxmail.org> wrote:
>When I ran php as a dso, I never got this header: Content-type:
>text/html, but when I switched to PHP CGI (for modules that require it
>- I have to do it), I get this on each page. I really want to remove
>it.

How and where is PHP invoked in your CGI? If you have CGI scripts
written in PHP, there's probably a line like

#!/usr/local/bin/php

at the top. Add " -q" to the end of that line:

#!/usr/local/bin/php -q

That should do the trick. If PHP is invoked in another way, then
you need to figure out where in that other way the php binary
is executed. There may be a configuration option in your
webserver for this.

Arnoud

--
Arnoud Engelfriet, Dutch patent attorney - Speaking only for myself
Patents, copyright and IPR explained for techies: http://www.iusmentis.com/

Andrew

unread,
Jun 3, 2003, 6:41:25 PM6/3/03
to
gala...@stack.nl (Arnoud "Galactus" Engelfriet) wrote in message
> In article <9571151f.03060...@posting.google.com>,
> Andrew <joe_...@linuxmail.org> wrote:
> >When I ran php as a dso, I never got this header: Content-type:
> >text/html, but when I switched to PHP CGI (for modules that require it
> >- I have to do it), I get this on each page. I really want to remove
> >it.
>
> How and where is PHP invoked in your CGI? If you have CGI scripts
> written in PHP, there's probably a line like
>
> #!/usr/local/bin/php
>
> at the top. Add " -q" to the end of that line:
>
> #!/usr/local/bin/php -q
>
> That should do the trick. If PHP is invoked in another way, then
> you need to figure out where in that other way the php binary
> is executed. There may be a configuration option in your
> webserver for this.
>
> Arnoud

Thanks for your reply. I actually have the php cgi executable set as
the action in the apache configuration and am not using the #! line at
all.

I am still working on getting the -q option in the apache
configuration, but I can't find any documentation that tells me where
to put that.

Thanks again for your reply. I am going to try to set it up to work
it the way that you suggest.

Andrew

0 new messages