#18782 [Bgs->Opn]: Phpinfo sets output colors incorrectly

From: Date: Wed, 07 Aug 2002 13:58:39 +0000
Subject: #18782 [Bgs->Opn]: Phpinfo sets output colors incorrectly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16173@lists.php.net to get a copy of this message
ID: 18782 User updated by: hramrach_l@centrum.cz 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: It fails on any platform with any browser from IE/Win IE/Mac Moz/Win Moz/Mac Moz/Linux(i386). It does not fail with Lynx because it has no colors at all ;-) I really set my default page colors. That's what's the pref for. You can expect I have set my colors to black on white. On the other hand I can expect everyone runs Lynx under hurd/gnumach on an Alpha. The fact the combination probably does not even compile yet is just a minor flaw in my assumptions. Previous Comments: ------------------------------------------------------------------------ [2002-08-07 09:38:04] cynic@php.net i think he has set some strange default colors in his browser. common guys, the fix is trivial, doesn't hurt anything, so why such strong opposition? ------------------------------------------------------------------------ [2002-08-07 09:33:45] kalowsky@php.net If the colors aren't readable this is really a your video card and browser issue. This looks fine on every other platform. ------------------------------------------------------------------------ [2002-08-07 09:25:09] hramrach_l@centrum.cz 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) { ------------------------------------------------------------------------ [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

« previous php.bugs (#16173) next »