php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18782 Phpinfo sets output colors incorrectly
Submitted: 2002-08-07 08:55 UTC Modified: 2002-08-08 09:31 UTC
From: hramrach_l at centrum dot cz Assigned:
Status: Closed Package: PHP options/info functions
PHP Version: 4.2.2 OS: OSF1 V4.0 878 alpha
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: hramrach_l at centrum dot cz
New email:
PHP Version: OS:

 

 [2002-08-07 08:55 UTC] hramrach_l at centrum dot 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-07 09:05 UTC] 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 09:25 UTC] hramrach_l at centrum dot 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:33 UTC] 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:38 UTC] 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:58 UTC] hramrach_l at centrum dot cz
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.
 [2002-08-08 01:54 UTC] kalowsky@php.net
If you change your browsers config from the default, then that really is your choice.  I don't see how that is a PHP issue at all.
 [2002-08-08 02:49 UTC] hramrach_l at centrum dot cz
That is PHP(or HTML) issue because you force background of the table to be different from my default. When you do so you should set text color to be visible on the background you forced me.
 [2002-08-08 08:02 UTC] sniper@php.net
phpinfo() is only informative tool.
There's no reason real bug here for anybody to start
wasting time on trying to 'fix' it.


 [2002-08-08 08:53 UTC] hramrach_l at centrum dot cz
On the other hand I do not see any reason why the provided information cannot be presented in clearly readable form.

About wasting time: if the time wasted on this discussion was instead wasted on fixing the trivial issue it would probably make some of us happier ;-)

Oh I can't leave it a wonfix. I wonder why.
 [2002-08-08 09:31 UTC] hholzgra@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.


although someone should port this to unsing CSS
as we already have a CSS block in there
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 11:01:28 2024 UTC