Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #6551 > unrolled thread

PHP Always Outputs

Started byRyan <rbilesky@gmail.com>
First post2012-07-13 21:21 -0700
Last post2012-07-16 14:20 +0200
Articles 20 on this page of 27 — 11 participants

Back to article view | Back to comp.lang.php


Contents

  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

Page 1 of 2  [1] 2  Next page →


#6551 — PHP Always Outputs

FromRyan <rbilesky@gmail.com>
Date2012-07-13 21:21 -0700
SubjectPHP Always Outputs
Message-ID<a5baa7aa-287c-4862-8ab9-898783d691f4@googlegroups.com>
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?

[toc] | [next] | [standalone]


#6552

FromLuuk <luuk@invalid.lan>
Date2012-07-14 10:54 +0200
Message-ID<4no7d9-bnb.ln1@luuk.invalid.lan>
In reply to#6551
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>

[toc] | [prev] | [next] | [standalone]


#6554

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-07-14 09:19 -0400
Message-ID<jtrrkg$2s3$2@dont-email.me>
In reply to#6552
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.

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.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#6557

FromLuuk <luuk@invalid.lan>
Date2012-07-14 16:21 +0200
Message-ID<frb8d9-g5f.ln1@luuk.invalid.lan>
In reply to#6554
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.
> 
> 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.... ;)

[toc] | [prev] | [next] | [standalone]


#6559

FromLuuk <luuk@invalid.lan>
Date2012-07-14 16:51 +0200
Message-ID<7ld8d9-5rf.ln1@luuk.invalid.lan>
In reply to#6557
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

[toc] | [prev] | [next] | [standalone]


#6561

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-07-14 15:46 -0400
Message-ID<jtsiap$b61$1@dont-email.me>
In reply to#6559
On 7/14/2012 10:51 AM, Luuk wrote:
> 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
>

Yes, he's using IE, which inserted the HTML when it got a blank page 
back.  This can easily be duplicated in IE 8.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#6553

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-07-14 09:17 -0400
Message-ID<jtrrgt$2s3$1@dont-email.me>
In reply to#6551
On 7/14/2012 12:21 AM, 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, it doesn't.  The PHP code you showed will only generate the 
appropriate response headers - no HTML.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#6555

FromDoug Miller <doug_at_milmac_dot_com@example.com>
Date2012-07-14 13:37 +0000
Message-ID<XnsA09061B2DDDBBdougmilmaccom@88.198.244.100>
In reply to#6551
Ryan <rbilesky@gmail.com> wrote in news:a5baa7aa-287c-4862-8ab9-898783d691f4
@googlegroups.com:

> 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?

Check your .htaccess file -- it probably contains a line that looks like this:

php_value auto_prepend_file "foo.php"

with the contents of the file foo.php resembling

echo "!<DOCTYPE HTML PUBLIC...";
echo "<HTML><HEAD>";
etc.

[toc] | [prev] | [next] | [standalone]


#6556

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-07-14 09:46 -0400
Message-ID<jtrt6u$ccj$1@dont-email.me>
In reply to#6555
On 7/14/2012 9:37 AM, Doug Miller wrote:
> Ryan <rbilesky@gmail.com> wrote in news:a5baa7aa-287c-4862-8ab9-898783d691f4
> @googlegroups.com:
>
>> 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?
>
> Check your .htaccess file -- it probably contains a line that looks like this:
>
> php_value auto_prepend_file "foo.php"
>
> with the contents of the file foo.php resembling
>
> echo "!<DOCTYPE HTML PUBLIC...";
> echo "<HTML><HEAD>";
> etc.
>

If it were, it would be seriously broken.  There would be no way to add 
<HEAD> tags or the <BODY> in their proper places.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#6558

FromDoug Miller <doug_at_milmac_dot_com@example.com>
Date2012-07-14 14:40 +0000
Message-ID<XnsA0906C7C39899dougmilmaccom@88.198.244.100>
In reply to#6556
Jerry Stuckle <jstucklex@attglobal.net> wrote in
news:jtrt6u$ccj$1@dont-email.me: 

> On 7/14/2012 9:37 AM, Doug Miller wrote:
>> Ryan <rbilesky@gmail.com> wrote in
>> news:a5baa7aa-287c-4862-8ab9-898783d691f4 @googlegroups.com:
>>
>>> 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? 
>>
>> Check your .htaccess file -- it probably contains a line that
>> looks like this: 
>>
>> php_value auto_prepend_file "foo.php"
>>
>> with the contents of the file foo.php resembling
>>
>> echo "!<DOCTYPE HTML PUBLIC...";
>> echo "<HTML><HEAD>";
>> etc.
>>
> If it were, it would be seriously broken.  

I disagree.

>There would be no way
> to add <HEAD> tags or the <BODY> in their proper places.

Of course there is. I have reproduced the OP's results *exactly*
with the following: 

C:\WebSites\fubar>type .htaccess
php_value auto_prepend_file "prepend.php"
php_value auto_append_file  "append.txt"


C:\WebSites\fubar>type prepend.php
<?php
printf ("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n"); 
printf ("<HTML><HEAD>\n");
printf ("<META content=\"text/html; charset=windows-1252\" http-equiv=Content-Type>
</HEAD>\n"); 
printf ("<BODY>");
?>

C:\WebSites\fubar>type append.txt
</BODY></HTML>

Content of the OP's pages will be served between the <BODY> and </BODY> tags. If he 
wants to be able to add tags in the HEAD section as well, it's simple enough to insert
readfile ("head_tags.txt")
into the file prepend.php somewhere between <HEAD> and <\HEAD>, putting the desired 
tags into head_tags.txt.

[toc] | [prev] | [next] | [standalone]


#6560

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-07-14 15:00 -0400
Message-ID<jtsfl7$rqo$1@dont-email.me>
In reply to#6558
On 7/14/2012 10:40 AM, Doug Miller wrote:
> Jerry Stuckle <jstucklex@attglobal.net> wrote in
> news:jtrt6u$ccj$1@dont-email.me:
>
>> On 7/14/2012 9:37 AM, Doug Miller wrote:
>>> Ryan <rbilesky@gmail.com> wrote in
>>> news:a5baa7aa-287c-4862-8ab9-898783d691f4 @googlegroups.com:
>>>
>>>> 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?
>>>
>>> Check your .htaccess file -- it probably contains a line that
>>> looks like this:
>>>
>>> php_value auto_prepend_file "foo.php"
>>>
>>> with the contents of the file foo.php resembling
>>>
>>> echo "!<DOCTYPE HTML PUBLIC...";
>>> echo "<HTML><HEAD>";
>>> etc.
>>>
>> If it were, it would be seriously broken.
>
> I disagree.
>
>> There would be no way
>> to add <HEAD> tags or the <BODY> in their proper places.
>
> Of course there is. I have reproduced the OP's results *exactly*
> with the following:
>
> C:\WebSites\fubar>type .htaccess
> php_value auto_prepend_file "prepend.php"
> php_value auto_append_file  "append.txt"
>
>
> C:\WebSites\fubar>type prepend.php
> <?php
> printf ("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n");
> printf ("<HTML><HEAD>\n");
> printf ("<META content=\"text/html; charset=windows-1252\" http-equiv=Content-Type>
> </HEAD>\n");
> printf ("<BODY>");
> ?>
>
> C:\WebSites\fubar>type append.txt
> </BODY></HTML>
>
> Content of the OP's pages will be served between the <BODY> and </BODY> tags. If he
> wants to be able to add tags in the HEAD section as well, it's simple enough to insert
> readfile ("head_tags.txt")
> into the file prepend.php somewhere between <HEAD> and <\HEAD>, putting the desired
> tags into head_tags.txt.
>

Now, how is the user supposed to place other <HEAD> tags such as 
<TITLE>, <SCRIPT> and <LINK>?  The answer is, he can't.  And while he 
*could* put a readfile() in there, it would be no different than placing 
the tags directly in the file.  He couldn't customize the tags to the page.

While what you say *could* be used - it would result in a seriously 
broken site with the inability to add such tags.

Also, there would be no need to use printf() there.  Just the HTML code 
itself would be fine.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#6562

FromDoug Miller <doug_at_milmac_dot_com@example.com>
Date2012-07-14 20:12 +0000
Message-ID<XnsA090A4C7FC3D3dougmilmaccom@88.198.244.100>
In reply to#6560
Jerry Stuckle <jstucklex@attglobal.net> wrote in
news:jtsfl7$rqo$1@dont-email.me: 

> On 7/14/2012 10:40 AM, Doug Miller wrote:
>> Jerry Stuckle <jstucklex@attglobal.net> wrote in
>> news:jtrt6u$ccj$1@dont-email.me:
>>
>>> On 7/14/2012 9:37 AM, Doug Miller wrote:
>>>> Ryan <rbilesky@gmail.com> wrote in
>>>> news:a5baa7aa-287c-4862-8ab9-898783d691f4 @googlegroups.com:
>>>>
>>>>> 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?
>>>>
>>>> Check your .htaccess file -- it probably contains a line that
>>>> looks like this:
>>>>
>>>> php_value auto_prepend_file "foo.php"
>>>>
>>>> with the contents of the file foo.php resembling
>>>>
>>>> echo "!<DOCTYPE HTML PUBLIC...";
>>>> echo "<HTML><HEAD>";
>>>> etc.
>>>>
>>> If it were, it would be seriously broken.
>>
>> I disagree.
>>
>>> There would be no way
>>> to add <HEAD> tags or the <BODY> in their proper places.
>>
>> Of course there is. I have reproduced the OP's results
>> *exactly* with the following:
>>
>> C:\WebSites\fubar>type .htaccess
>> php_value auto_prepend_file "prepend.php"
>> php_value auto_append_file  "append.txt"
>>
>>
>> C:\WebSites\fubar>type prepend.php
>> <?php
>> printf ("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0
>> Transitional//EN\">\n"); printf ("<HTML><HEAD>\n");
>> printf ("<META content=\"text/html; charset=windows-1252\"
>> http-equiv=Content-Type> </HEAD>\n");
>> printf ("<BODY>");
>> ?>
>>
>> C:\WebSites\fubar>type append.txt
>> </BODY></HTML>
>>
>> Content of the OP's pages will be served between the <BODY> and
>> </BODY> tags. If he wants to be able to add tags in the HEAD
>> section as well, it's simple enough to insert readfile
>> ("head_tags.txt") into the file prepend.php somewhere between
>> <HEAD> and <\HEAD>, putting the desired tags into
>> head_tags.txt. 
>>
> 
> Now, how is the user supposed to place other <HEAD> tags such as
> <TITLE>, <SCRIPT> and <LINK>?  The answer is, he can't.  

Ummmm, yes, he can. I just described how that can be done.

> And while he 
> *could* put a readfile() in there, it would be no different than
> placing the tags directly in the file.  He couldn't customize
> the tags to the page. 

I didn't say that the tags could be customized. But you *did* say
they couldn't be inserted at all. Which they obviously can. 
> 
> While what you say *could* be used - it would result in a
> seriously broken site with the inability to add such tags.

Again -- there is no such "inability to add" tags in the HEAD
section. OK, they can't be customized. But let's back up a few
paragraphs, to where you said "there would be no way" to add them.
Of course there is. 

> Also, there would be no need to use printf() there.  Just the
> HTML code itself would be fine.

If the prepended file is just HTML code, not a PHP script, then
it's not possible to use readfile() to insert any head tags that
may be desired. 

[toc] | [prev] | [next] | [standalone]


#6563

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-07-14 16:16 -0400
Message-ID<jtsk27$lrt$1@dont-email.me>
In reply to#6562
On 7/14/2012 4:12 PM, Doug Miller wrote:
> Jerry Stuckle <jstucklex@attglobal.net> wrote in
> news:jtsfl7$rqo$1@dont-email.me:
>
>> On 7/14/2012 10:40 AM, Doug Miller wrote:
>>> Jerry Stuckle <jstucklex@attglobal.net> wrote in
>>> news:jtrt6u$ccj$1@dont-email.me:
>>>
>>>> On 7/14/2012 9:37 AM, Doug Miller wrote:
>>>>> Ryan <rbilesky@gmail.com> wrote in
>>>>> news:a5baa7aa-287c-4862-8ab9-898783d691f4 @googlegroups.com:
>>>>>
>>>>>> 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?
>>>>>
>>>>> Check your .htaccess file -- it probably contains a line that
>>>>> looks like this:
>>>>>
>>>>> php_value auto_prepend_file "foo.php"
>>>>>
>>>>> with the contents of the file foo.php resembling
>>>>>
>>>>> echo "!<DOCTYPE HTML PUBLIC...";
>>>>> echo "<HTML><HEAD>";
>>>>> etc.
>>>>>
>>>> If it were, it would be seriously broken.
>>>
>>> I disagree.
>>>
>>>> There would be no way
>>>> to add <HEAD> tags or the <BODY> in their proper places.
>>>
>>> Of course there is. I have reproduced the OP's results
>>> *exactly* with the following:
>>>
>>> C:\WebSites\fubar>type .htaccess
>>> php_value auto_prepend_file "prepend.php"
>>> php_value auto_append_file  "append.txt"
>>>
>>>
>>> C:\WebSites\fubar>type prepend.php
>>> <?php
>>> printf ("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0
>>> Transitional//EN\">\n"); printf ("<HTML><HEAD>\n");
>>> printf ("<META content=\"text/html; charset=windows-1252\"
>>> http-equiv=Content-Type> </HEAD>\n");
>>> printf ("<BODY>");
>>> ?>
>>>
>>> C:\WebSites\fubar>type append.txt
>>> </BODY></HTML>
>>>
>>> Content of the OP's pages will be served between the <BODY> and
>>> </BODY> tags. If he wants to be able to add tags in the HEAD
>>> section as well, it's simple enough to insert readfile
>>> ("head_tags.txt") into the file prepend.php somewhere between
>>> <HEAD> and <\HEAD>, putting the desired tags into
>>> head_tags.txt.
>>>
>>
>> Now, how is the user supposed to place other <HEAD> tags such as
>> <TITLE>, <SCRIPT> and <LINK>?  The answer is, he can't.
>
> Ummmm, yes, he can. I just described how that can be done.
>
>> And while he
>> *could* put a readfile() in there, it would be no different than
>> placing the tags directly in the file.  He couldn't customize
>> the tags to the page.
>
> I didn't say that the tags could be customized. But you *did* say
> they couldn't be inserted at all. Which they obviously can.

That is not inserting tags.  It is just copying them from a file - just 
as if they were in the original header.

>>
>> While what you say *could* be used - it would result in a
>> seriously broken site with the inability to add such tags.
>
> Again -- there is no such "inability to add" tags in the HEAD
> section. OK, they can't be customized. But let's back up a few
> paragraphs, to where you said "there would be no way" to add them.
> Of course there is.
>

Which makes them pretty worthless.  And no, you are NOT "adding them". 
You are just placing fixed tags in the header.

>> Also, there would be no need to use printf() there.  Just the
>> HTML code itself would be fine.
>
> If the prepended file is just HTML code, not a PHP script, then
> it's not possible to use readfile() to insert any head tags that
> may be desired.
>

Which, since it is always reading the same file, is no different than 
just placing the tags in the HTML file itself.

You are over-complicating the problem with a *very stoopid* response.

The *real* problem here is that IE is inserting the HTML when it gets 
the blank page back.  It is easily duplicated in IE8.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#6564

FromDoug Miller <doug_at_milmac_dot_com@example.com>
Date2012-07-15 00:59 +0000
Message-ID<XnsA090D5539EF86dougmilmaccom@88.198.244.100>
In reply to#6563
Jerry Stuckle <jstucklex@attglobal.net> wrote in news:jtsk27$lrt$1@dont-email.me:

> You are over-complicating the problem with a *very stoopid* response.

Typical Jerry -- proven wrong (once again), you resort to insults (once again).
 
> The *real* problem here is that IE is inserting the HTML when it gets 
> the blank page back.  It is easily duplicated in IE8.

I wouldn't know -- I haven't used IE for years, and don't plan to start.

[toc] | [prev] | [next] | [standalone]


#6565

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-07-14 21:49 -0400
Message-ID<jtt7jb$tj6$1@dont-email.me>
In reply to#6564
On 7/14/2012 8:59 PM, Doug Miller wrote:
> Jerry Stuckle <jstucklex@attglobal.net> wrote in news:jtsk27$lrt$1@dont-email.me:
>
>> You are over-complicating the problem with a *very stoopid* response.
>
> Typical Jerry -- proven wrong (once again), you resort to insults (once again).
>
>> The *real* problem here is that IE is inserting the HTML when it gets
>> the blank page back.  It is easily duplicated in IE8.
>
> I wouldn't know -- I haven't used IE for years, and don't plan to start.
>
>

Nope, you're so stoopid you don't see how asinine (and wrong) your 
"response" is.  But you still try to defend it! (It isn't working).

And you claim I'm "wrong" - but refuse to run the simple test I shows 
you that proves it.

Just another example of you trolling.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#6577

FromDoug Miller <doug_at_milmac_dot_com@example.com>
Date2012-07-15 16:14 +0000
Message-ID<XnsA0917C7126E6Ddougmilmaccom@88.198.244.100>
In reply to#6565
Jerry Stuckle <jstucklex@attglobal.net> wrote in news:jtt7jb$tj6$1@dont-email.me:

> On 7/14/2012 8:59 PM, Doug Miller wrote:
>> Jerry Stuckle <jstucklex@attglobal.net> wrote in news:jtsk27$lrt$1@dont-email.me:
>>
>>> You are over-complicating the problem with a *very stoopid* response.
>>
>> Typical Jerry -- proven wrong (once again), you resort to insults (once again).
>>
>>> The *real* problem here is that IE is inserting the HTML when it gets
>>> the blank page back.  It is easily duplicated in IE8.
>>
>> I wouldn't know -- I haven't used IE for years, and don't plan to start.
>>
>>
> 
> Nope, you're so stoopid you don't see how asinine (and wrong) your 
> "response" is.  But you still try to defend it! (It isn't working).

I never claimed it was the only, or even the best, explanation of what the OP observed, only 
that it was a *possible* explanation.

> And you claim I'm "wrong" - but refuse to run the simple test I shows 
> you that proves it.

I already ran the test that proves you wrong. I don't need to run *another* one.
> 
> Just another example of you trolling.
> 
Just another example of your typical behavior. One thing is different this time, though: this 
time, I've had enough of your obnoxious, immature behavior. This is long overdue, but 
better late than never: I'm killfiling you, Jerry, so don't bother responding. I won't see it.

[toc] | [prev] | [next] | [standalone]


#6579

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-07-15 14:15 -0400
Message-ID<jtv1bm$on9$1@dont-email.me>
In reply to#6577
On 7/15/2012 12:14 PM, Doug Miller wrote:
> Jerry Stuckle <jstucklex@attglobal.net> wrote in news:jtt7jb$tj6$1@dont-email.me:
>
>> On 7/14/2012 8:59 PM, Doug Miller wrote:
>>> Jerry Stuckle <jstucklex@attglobal.net> wrote in news:jtsk27$lrt$1@dont-email.me:
>>>
>>>> You are over-complicating the problem with a *very stoopid* response.
>>>
>>> Typical Jerry -- proven wrong (once again), you resort to insults (once again).
>>>
>>>> The *real* problem here is that IE is inserting the HTML when it gets
>>>> the blank page back.  It is easily duplicated in IE8.
>>>
>>> I wouldn't know -- I haven't used IE for years, and don't plan to start.
>>>
>>>
>>
>> Nope, you're so stoopid you don't see how asinine (and wrong) your
>> "response" is.  But you still try to defend it! (It isn't working).
>
> I never claimed it was the only, or even the best, explanation of what the OP observed, only
> that it was a *possible* explanation.
>
>> And you claim I'm "wrong" - but refuse to run the simple test I shows
>> you that proves it.
>
> I already ran the test that proves you wrong. I don't need to run *another* one.
>>
>> Just another example of you trolling.
>>
> Just another example of your typical behavior. One thing is different this time, though: this
> time, I've had enough of your obnoxious, immature behavior. This is long overdue, but
> better late than never: I'm killfiling you, Jerry, so don't bother responding. I won't see it.
>

Ah, another troll can't handle the truth!

Good riddance, Doug.  I just wish you'd get out of the group all 
together.  It would be a much nicer place.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#6596

FromMichael Vilain <vilain@NOspamcop.net>
Date2012-07-16 16:48 -0700
Message-ID<vilain-29183D.16484416072012@news.individual.net>
In reply to#6577
In article <XnsA0917C7126E6Ddougmilmaccom@88.198.244.100>,
 Doug Miller <doug_at_milmac_dot_com@example.com> wrote:

> Jerry Stuckle <jstucklex@attglobal.net> wrote in 
> news:jtt7jb$tj6$1@dont-email.me:
> 
> > 
> > Just another example of you trolling.
> > 
> Just another example of your typical behavior. One thing is different this 
> time, though: this 
> time, I've had enough of your obnoxious, immature behavior. This is long 
> overdue, but 
> better late than never: I'm killfiling you, Jerry, so don't bother 
> responding. I won't see it.

I gave up listening to Jerry and his twaddle years ago.  So far, he 
hasn't kept silent long enough to expire from my killfile so I'm 
guessing when he finally does, he'll either be in Assisted Care and 
barred from the Day Room computers or dead.  I'm voting for #2, 
personally.

-- 
DeeDee, don't press that button!  DeeDee!  NO!  Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]

[toc] | [prev] | [next] | [standalone]


#6597

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-07-16 20:30 -0400
Message-ID<ju2bno$vul$1@dont-email.me>
In reply to#6596
On 7/16/2012 7:48 PM, Michael Vilain wrote:
> In article <XnsA0917C7126E6Ddougmilmaccom@88.198.244.100>,
>   Doug Miller <doug_at_milmac_dot_com@example.com> wrote:
>
>> Jerry Stuckle <jstucklex@attglobal.net> wrote in
>> news:jtt7jb$tj6$1@dont-email.me:
>>
>>>
>>> Just another example of you trolling.
>>>
>> Just another example of your typical behavior. One thing is different this
>> time, though: this
>> time, I've had enough of your obnoxious, immature behavior. This is long
>> overdue, but
>> better late than never: I'm killfiling you, Jerry, so don't bother
>> responding. I won't see it.
>
> I gave up listening to Jerry and his twaddle years ago.  So far, he
> hasn't kept silent long enough to expire from my killfile so I'm
> guessing when he finally does, he'll either be in Assisted Care and
> barred from the Day Room computers or dead.  I'm voting for #2,
> personally.
>

I really don't give a damn if you don't want to learn how to do things 
correctly.  It's your loss, not mine.

And chances are I'll end up with more of your clients than you will of mine.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#6606

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2012-07-17 09:12 +0100
Message-ID<ju36ph$9sn$4@news.albasani.net>
In reply to#6596
Michael Vilain wrote:
> In article <XnsA0917C7126E6Ddougmilmaccom@88.198.244.100>,
>  Doug Miller <doug_at_milmac_dot_com@example.com> wrote:
> 
>> Jerry Stuckle <jstucklex@attglobal.net> wrote in 
>> news:jtt7jb$tj6$1@dont-email.me:
>>
>>> Just another example of you trolling.
>>>
>> Just another example of your typical behavior. One thing is different this 
>> time, though: this 
>> time, I've had enough of your obnoxious, immature behavior. This is long 
>> overdue, but 
>> better late than never: I'm killfiling you, Jerry, so don't bother 
>> responding. I won't see it.
> 
> I gave up listening to Jerry and his twaddle years ago.  So far, he 
> hasn't kept silent long enough to expire from my killfile so I'm 
> guessing when he finally does, he'll either be in Assisted Care and 
> barred from the Day Room computers or dead.  I'm voting for #2, 
> personally.
> 
+1


-- 
To people who know nothing, anything is possible.
To people who know too much, it is a sad fact
that they know how little is really possible -
and how hard it is to achieve it.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.php


csiph-web