Re: php via cmdline including unwanted headers
| From: | Sebe | Date: | Wed, 30 May 2007 10:53:43 +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-255790@lists.php.net to get a copy of this message | ||
Stut wrote:
Sebe wrote:turning cgi.check_shebang_line in php.ini solved the problem without using php cliYeni Setiawan wrote:Well that's your mistake. The CGI binary is meant for use as a web page generator. You need php-cli. -StutOn 5/30/07, *Sebe* <sebastian@dslr.net <mailto:sebastian@dslr.net>> wrote:i tried using -q still shows the headers.. this problem started when i switched to php cgi.I run some scripts via php (cgi) which sends output to another file, but it's including unwanted cookie header, etc in the outfile.example:php /home/dev/script.php > /home/production/feeds/news.xml 2>&1and at the top of news.xml i get:X-Powered-By: PHP/5.2.2 Set-Cookie: ..... Set-Cookie: ..... Cache-Control: private Content-Type: text/html; charset=ISO-8859-1i turned off expose php which gets rid of the x-powered-by but what about the rest?try to use quiet mode by using -q option as follow: php -q /home/dev/script.php > /home/production/feeds/news.xml 2>&1