Re: php via cmdline including unwanted headers
| From: | Robert Cummings | Date: | Wed, 30 May 2007 13:18:53 +0000 |
| Subject: | Re: php via cmdline including unwanted headers | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-255805@lists.php.net to get a copy of this message | ||
On Wed, 2007-05-30 at 09:38 +0100, Stut wrote:
> Sebe wrote:
> >
> > i tried using -q
> > still shows the headers.. this problem started when i switched to php cgi.
>
> Well that's your mistake. The CGI binary is meant for use as a web page
> generator. You need php-cli.
While php-cli is an improvement over php-cgi for shell scripts it is not
a necessity unless you want better handling of stdin and the other
streams. That has been my experience, so much so that I haven't bothered
updating any old scripts that still make use of the php-cgi binary.
They've worked all the way from php 4.1.0 all the way through 5.2.0 (I
haven't bothered with 5.2.1 or 5.2.2 yet :) I do always run them with
the -qC flags though.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com
|
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'