Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #6559
| Date | 2012-07-14 16:51 +0200 |
|---|---|
| From | Luuk <luuk@invalid.lan> |
| Newsgroups | comp.lang.php |
| Subject | Re: PHP Always Outputs |
| References | <a5baa7aa-287c-4862-8ab9-898783d691f4@googlegroups.com> <4no7d9-bnb.ln1@luuk.invalid.lan> <jtrrkg$2s3$2@dont-email.me> <frb8d9-g5f.ln1@luuk.invalid.lan> |
| Message-ID | <7ld8d9-5rf.ln1@luuk.invalid.lan> (permalink) |
On 14-07-2012 16:21, Luuk wrote: > 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: >>>> >>>> <?php >>>> ?> >>>> >>>> will output this html >>>> >>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> >>>> <HTML><HEAD> >>>> <META content="text/html; charset=windows-1252" >>>> http-equiv=Content-Type></HEAD> >>>> <BODY></BODY></HTML> >>>> >>>> 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 >>> <?php >>> ?> >>> ~/tmp> php -f empty.php >>> ~/tmp> >>> >>> >> >> No, Apache does not generate HTML. oops, i should have typed: The output you see is 'problably' generated by apache?..... >> >> 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. so, in this case PHP will not output anyythingm >> > > > ~/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.... ;) > remains the question from the OP if PHP does not do it (as proved above), i'm sure someone will say: "This output is not caused by PHP, so 'ask somewhere else'" @Ryan: where did you see this:"<!DOCTYPE HTML PUBLIC....." Did you start Internet Explorer, and looked at 'view source'??????? In that case, the HTML was created by IE -- Luuk
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
PHP Always Outputs Ryan <rbilesky@gmail.com> - 2012-07-13 21:21 -0700
Re: PHP Always Outputs Luuk <luuk@invalid.lan> - 2012-07-14 10:54 +0200
Re: PHP Always Outputs Jerry Stuckle <jstucklex@attglobal.net> - 2012-07-14 09:19 -0400
Re: PHP Always Outputs Luuk <luuk@invalid.lan> - 2012-07-14 16:21 +0200
Re: PHP Always Outputs Luuk <luuk@invalid.lan> - 2012-07-14 16:51 +0200
Re: PHP Always Outputs Jerry Stuckle <jstucklex@attglobal.net> - 2012-07-14 15:46 -0400
Re: PHP Always Outputs Jerry Stuckle <jstucklex@attglobal.net> - 2012-07-14 09:17 -0400
Re: PHP Always Outputs Doug Miller <doug_at_milmac_dot_com@example.com> - 2012-07-14 13:37 +0000
Re: PHP Always Outputs Jerry Stuckle <jstucklex@attglobal.net> - 2012-07-14 09:46 -0400
Re: PHP Always Outputs Doug Miller <doug_at_milmac_dot_com@example.com> - 2012-07-14 14:40 +0000
Re: PHP Always Outputs Jerry Stuckle <jstucklex@attglobal.net> - 2012-07-14 15:00 -0400
Re: PHP Always Outputs Doug Miller <doug_at_milmac_dot_com@example.com> - 2012-07-14 20:12 +0000
Re: PHP Always Outputs Jerry Stuckle <jstucklex@attglobal.net> - 2012-07-14 16:16 -0400
Re: PHP Always Outputs Doug Miller <doug_at_milmac_dot_com@example.com> - 2012-07-15 00:59 +0000
Re: PHP Always Outputs Jerry Stuckle <jstucklex@attglobal.net> - 2012-07-14 21:49 -0400
Re: PHP Always Outputs Doug Miller <doug_at_milmac_dot_com@example.com> - 2012-07-15 16:14 +0000
Re: PHP Always Outputs Jerry Stuckle <jstucklex@attglobal.net> - 2012-07-15 14:15 -0400
Re: PHP Always Outputs Michael Vilain <vilain@NOspamcop.net> - 2012-07-16 16:48 -0700
Re: PHP Always Outputs Jerry Stuckle <jstucklex@attglobal.net> - 2012-07-16 20:30 -0400
Re: PHP Always Outputs The Natural Philosopher <tnp@invalid.invalid> - 2012-07-17 09:12 +0100
Re: PHP Always Outputs "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-07-16 11:52 +0200
Re: PHP Always Outputs Tim Streater <timstreater@greenbee.net> - 2012-07-16 19:18 +0100
Re: PHP Always Outputs "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-07-17 09:30 +0200
Re: PHP Always Outputs Tim Streater <timstreater@greenbee.net> - 2012-07-17 09:49 +0100
Re: PHP Always Outputs "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-07-17 11:03 +0200
Re: PHP Always Outputs "Peter H. Coffin" <hellsop@ninehells.com> - 2012-07-17 09:58 -0500
Re: PHP Always Outputs Arno Welzel <usenet@arnowelzel.de> - 2012-07-16 14:20 +0200
csiph-web