From: riseofthethorax at earthlink dot net
Operating system: Linux cgi30 2.4.29-grsec #4 SMP
PHP version: 4.3.10
PHP Bug Type: Output Control
Bug description: //. causes php to dump its code to stdout
Description:
------------
Well my webhost had upgraded from 4.28 to 4.3.10,
and one of my scripts was failing.. I narrowed down the
bug to this one line.. For some reason it made the difference
between showning a submission form and dumping what looks like
a partial dump of all the php code on the script.
//. '<br><table width=100%><tr><td align=right>' . $messages['mandatory']
. $messages['incorrect'] . '</td></tr></table><br>'
Reproduce code:
---------------
$crap = '<form action="' . $complete_url . '" method=POST>'
. '<table border=2 width=100%><tr><td
align=center><table><tr><td
align=center>' . $messages['mandatory'] . $messages['incorrect'] .
'</td></tr></table></td></tr></table><br>'
. $button_set
. "<br><br><br>"
. '<table border=1 ><tr><td>'
. $precrap
. "</td></tr></table>"
. '<input type=hidden name=generate value=1>'
. "<br><br><br>"
. $button_set
. '<br><br><br><table border=2 width=100%><tr><td
align=center><table><tr><td align=center>' . $messages['mandatory'] .
$messages['incorrect'] . '</td></tr></table></td></tr></table><br>'
//. '<br><table width=100%><tr><td align=right>' . $messages['mandatory']
. $messages['incorrect'] . '</td></tr></table><br>'
. '</form>';
Expected result:
----------------
IT creates a form by concantenating some
assoaciative variables together with strings..
Actual result:
--------------
Picture a complete dump of everything in the script..
Removal of the line
//. '<br><table width=100%><tr><td align=right>' . $messages['mandatory']
. $messages['incorrect'] . '</td></tr></table><br>'
Displays the form as it was intended..
Its something having to do with that //. I think..
--
Edit bug report at http://bugs.php.net/?id=32070&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32070&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=32070&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=32070&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32070&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32070&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32070&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32070&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32070&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32070&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32070&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=32070&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=32070&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32070&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32070&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32070&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32070&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32070&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32070&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32070&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32070&r=mysqlcfg