php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25416 Script parsed twice on <table background> tag
Submitted: 2003-09-07 12:18 UTC Modified: 2003-09-07 12:22 UTC
From: alex dot hennecke at web dot de Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.3.1 OS: Windows 98, Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alex dot hennecke at web dot de
New email:
PHP Version: OS:

 

 [2003-09-07 12:18 UTC] alex dot hennecke at web dot de
Description:
------------
The "background" attribute of a <table>-tag causes the script to be executed twice.

This also happens if the script is nested somewhere in included sub-scripts, causing the calling main script to be executed twice, e.g.:

main.php includes sub1.php
sub1.php includes error.php

error.php has a <table background=...>

will result in a successive GET request, causing main.php to be executed again.

This occurs on Apache 1.3.27, both on Linux and Windows environment, tested with Internet Explorer 6 and Mozilla (Firebird). 
Apache and Php are running at the default configuration, no additional modules.

Reproduce code:
---------------
test.php:
-------------------
<html>
<body>
<table background="#FFFFFF">
	<tr><td></td></tr>
</table>
</body>
</html>



Expected result:
----------------
Should execute script once, which it does if the "background" attribute is removed.

Actual result:
--------------
Script will be executed twice, as described above.

Apache access.log:

----------------------------------------------------
127.0.0.1 - - [08/Sep/2003:18:00:01 +0200] "GET /phpLib/test2.php HTTP/1.1" 200 107
127.0.0.1 - - [08/Sep/2003:18:00:02 +0200] "GET /phpLib/test2.php HTTP/1.1" 200 107
----------------------------------------------------

Apache error.log (running on DEBUG loglevel):
----------------------------------------------------

[Mon Sep 08 18:04:13 2003] [info] Parent: Created child process -1399539
[Mon Sep 08 18:04:13 2003] [info] Parent: Duplicating socket 68 and sending it to child process -1399539
[Mon Sep 08 18:04:13 2003] [info] BytesRead = 372 WSAProtocolInfo = 020
[Mon Sep 08 18:04:17 2003] [info] Invoking CGI Command 'd:\PHP\PHP.EXE '
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[0] = 'COMSPEC=C:\WINDOWS\COMMAND.COM'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[1] = 'DOCUMENT_ROOT=e:/dulce/marketing site2/'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[2] = 'HTTP_ACCEPT=text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[3] = 'HTTP_ACCEPT_CHARSET=ISO-8859-1,utf-8;q=0.7,*;q=0.7'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[4] = 'HTTP_ACCEPT_ENCODING=gzip,deflate'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[5] = 'HTTP_ACCEPT_LANGUAGE=en-us,en;q=0.5'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[6] = 'HTTP_CONNECTION=keep-alive'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[7] = 'HTTP_HOST=localhost'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[8] = 'HTTP_KEEP_ALIVE=300'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[9] = 'HTTP_USER_AGENT=Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[10] = 'PATH=D:\PERL\BIN;D:\UTILS\RESKIT;D:\JAVA\J2SDK-1_4_0_02\BIN\;C:\WINDOWS;C:\WINDOWS\COMMAND'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[11] = 'REDIRECT_STATUS=200'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[12] = 'REDIRECT_URL=/phpLib/test2.php'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[13] = 'REMOTE_ADDR=127.0.0.1'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[14] = 'REMOTE_PORT=2591'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[15] = 'SCRIPT_FILENAME=d:/php/php.exe'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[16] = 'SERVER_ADDR=127.0.0.1'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[17] = 'SERVER_ADMIN=webmaster@e-nterests.com'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[18] = 'SERVER_NAME=www.e-nterests.com'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[19] = 'SERVER_PORT=80'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[20] = 'SERVER_SIGNATURE=<ADDRESS>Apache/1.3.27 Server at www.e-nterests.com Port 80</ADDRESS>
'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[21] = 'SERVER_SOFTWARE=Apache/1.3.27 (Win32)'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[22] = 'WINDIR=C:\WINDOWS'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[23] = 'GATEWAY_INTERFACE=CGI/1.1'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[24] = 'SERVER_PROTOCOL=HTTP/1.1'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[25] = 'REQUEST_METHOD=GET'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[26] = 'QUERY_STRING='
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[27] = 'REQUEST_URI=/phpLib/test2.php'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[28] = 'SCRIPT_NAME=/php/php.exe'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[29] = 'PATH_INFO=/phpLib/test2.php'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[30] = 'PATH_TRANSLATED=e:\dulce\marketing site2\phplib\test2.php'
[Mon Sep 08 18:04:17 2003] [info] Invoking CGI Command 'd:\PHP\PHP.EXE '
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[0] = 'COMSPEC=C:\WINDOWS\COMMAND.COM'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[1] = 'DOCUMENT_ROOT=e:/dulce/marketing site2/'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[2] = 'HTTP_ACCEPT=image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[3] = 'HTTP_ACCEPT_CHARSET=ISO-8859-1,utf-8;q=0.7,*;q=0.7'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[4] = 'HTTP_ACCEPT_ENCODING=gzip,deflate'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[5] = 'HTTP_ACCEPT_LANGUAGE=en-us,en;q=0.5'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[6] = 'HTTP_CACHE_CONTROL=max-age=0'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[7] = 'HTTP_CONNECTION=keep-alive'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[8] = 'HTTP_HOST=localhost'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[9] = 'HTTP_KEEP_ALIVE=300'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[10] = 'HTTP_REFERER=http://localhost/phpLib/test2.php'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[11] = 'HTTP_USER_AGENT=Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[12] = 'PATH=D:\PERL\BIN;D:\UTILS\RESKIT;D:\JAVA\J2SDK-1_4_0_02\BIN\;C:\WINDOWS;C:\WINDOWS\COMMAND'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[13] = 'REDIRECT_STATUS=200'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[14] = 'REDIRECT_URL=/phpLib/test2.php'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[15] = 'REMOTE_ADDR=127.0.0.1'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[16] = 'REMOTE_PORT=2591'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[17] = 'SCRIPT_FILENAME=d:/php/php.exe'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[18] = 'SERVER_ADDR=127.0.0.1'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[19] = 'SERVER_ADMIN=webmaster@e-nterests.com'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[20] = 'SERVER_NAME=www.e-nterests.com'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[21] = 'SERVER_PORT=80'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[22] = 'SERVER_SIGNATURE=<ADDRESS>Apache/1.3.27 Server at www.e-nterests.com Port 80</ADDRESS>
'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[23] = 'SERVER_SOFTWARE=Apache/1.3.27 (Win32)'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[24] = 'WINDIR=C:\WINDOWS'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[25] = 'GATEWAY_INTERFACE=CGI/1.1'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[26] = 'SERVER_PROTOCOL=HTTP/1.1'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[27] = 'REQUEST_METHOD=GET'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[28] = 'QUERY_STRING='
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[29] = 'REQUEST_URI=/phpLib/test2.php'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[30] = 'SCRIPT_NAME=/php/php.exe'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[31] = 'PATH_INFO=/phpLib/test2.php'
[Mon Sep 08 18:04:17 2003] [debug] .\main\util_script.c(1144):   CGI env[32] = 'PATH_TRANSLATED=e:\dulce\marketing site2\phplib\test2.php'

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-07 12:22 UTC] sniper@php.net
Yes, and this is not PHP bug.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 02 08:01:31 2024 UTC