From: alex dot hennecke at web dot de
Operating system: Windows 98, Linux
PHP version: 4.3.1
PHP Bug Type: Apache related
Bug description: Script parsed twice on <table background> tag
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] = '[EMAIL PROTECTED]'
[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] = '[EMAIL PROTECTED]'
[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'
--
Edit bug report at http://bugs.php.net/?id=25416&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25416&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25416&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25416&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25416&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25416&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25416&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25416&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25416&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25416&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25416&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25416&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25416&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25416&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25416&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25416&r=gnused