Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Date: Sat, 14 Jul 2012 16:21:08 +0200 From: Luuk User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.php Subject: Re: PHP Always Outputs References: <4no7d9-bnb.ln1@luuk.invalid.lan> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: Lines: 70 NNTP-Posting-Host: 2001:980:9089:1:84b1:bd70:96fe:33dc X-Trace: 1342276201 news.xs4all.nl 6882 [2001:980:9089:1:84b1:bd70:96fe:33dc]:55894 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.php:6557 On 14-07-2012 15:19, Jerry Stuckle wrote: > On 7/14/2012 4:54 AM, Luuk wrote: >> On 14-07-2012 06:21, Ryan wrote: >>> I want a php script to run and simply output nothing. But even this >>> script: >>> >>> >> ?> >>> >>> will output this html >>> >>> >>> >>> >> http-equiv=Content-Type> >>> >>> >>> Is there a setting somewhere in my php or apache config that needs to >>> be turned off? >>> >> >> no, PHP will not output what you said. >> >> The output you see is generated by apache..... >> >> ~/tmp> cat empty.php >> > ?> >> ~/tmp> php -f empty.php >> ~/tmp> >> >> > > No, Apache does not generate HTML. > > Additionally, PHP generates different output (the appropriate response > headers) when run as module or CGI than when run as a CLI. But it will > not generate HTML on its own. > you are right ~/tmp> vi ../public_html/empty.php ~/tmp> wget -S "http://www.example.com/~luuk/empty.php" -O output.txt asking libproxy about url 'http://www.example.com/~luuk/empty.php' libproxy suggest to use 'direct://' --2012-07-14 16:18:07-- http://www.example.com/~luuk/empty.php Resolving www.example.com (www.example.com)... 192.168.178.250 Connecting to www.example.com (www.example.com)|192.168.178.250|:80... connected. HTTP request sent, awaiting response... HTTP/1.1 200 OK Date: Sat, 14 Jul 2012 14:18:07 GMT Server: Apache/2.2.21 (Linux/SUSE) X-Powered-By: PHP/5.3.8 Content-Length: 0 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html Length: 0 [text/html] Saving to: `output.txt' [ <=> ] 0 --.-K/s in 0s 2012-07-14 16:18:07 (0.00 B/s) - `output.txt' saved [0/0] Legnth is 0 bytes, so i'm sure no one is interested in the output.... ;)