#18782 [Bgs->Opn]: Phpinfo sets output colors incorrectly
| From: | hramrach_l at centrum dot cz | Date: | Wed, 07 Aug 2002 13:25:10 +0000 |
| Subject: | #18782 [Bgs->Opn]: Phpinfo sets output colors incorrectly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-16166@lists.php.net to get a copy of this message | ||
ID: 18782
User updated by: hramrach_l@centrum.cz
-Summary: Phpinfo sets output colors
Reported By: hramrach_l@centrum.cz
-Status: Bogus
+Status: Open
Bug Type: PHP options/info functions
Operating System: OSF1 V4.0 878 alpha
PHP Version: 4.2.2
New Comment:
They should not be ok.
Default text color may be black, white, gray, violet, yellow, anything.
When you set background, you should set text color to ensure it is
visible on the background.
Here is body tag from this page, which renders correctly.
<body topmargin="0" leftmargin="0" marginheight="0"
marginwidth="0"
bgcolor="#ffffff" text="#000000" link="#000033"
alink="#0099ff"
vlink="#000033">
Here's a patch, hopefully correct
--- php-4.2.2/ext/standard/info.c~ Thu Mar 14 19:39:37 2002
+++ php-4.2.2/ext/standard/info.c Wed Aug 7 15:19:06 2002
@@ -165,7 +165,8 @@
php_uname = php_get_uname();
PUTS("<head>");
php_info_print_style();
- PUTS("<title>phpinfo()</title></head><body>");
+ PUTS("<title>phpinfo()</title></head>");
+ PUTS("<body text=\"#000000\" bgcolor=\"#f0f0ff\"
link=\"#0000ff\" vlink=\"#ff00ff\" alink=\"#0000ff\">");
php_info_print_box_start(1);
if (expose_php) {
Previous Comments:
------------------------------------------------------------------------
[2002-08-07 09:05:51] hholzgra@php.net
the "black" background of the outer table is there just
for the black border around the inner table
the "#9999cc" background of the inner table is the
blueish-violett color of the top phpinfo box
we do not care about font and link colors so we do not
set them at all, default colors should be ok
------------------------------------------------------------------------
[2002-08-07 08:55:05] hramrach_l@centrum.cz
My script is
<?php
phpinfo()
?>
Output includes:
<body><table border="0" cellpadding="3" cellspacing="1"
width="600"
bgcolor="#000000" align="center">
<tr valign="middle" bgcolor="#9999cc"><td align="left">
[img left out]
<h1>PHP Version 4.2.2</h1>
</td></tr>
</table><br />
As you may see there is background set several times but
text/link/vlink color is not set at all.
Because my text color is not readable on the background I cannot read
the info.
I think something like <body text="#000000" bgcolor="#f0f0ff"
link="#0000ff" vlink="#ff00ff"
alink="#0000ff"> instead of simple <body> would give correct page that
looks as intended.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18782&edit=1