php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21640 phpinfo() should contain character encoding to be valid html
Submitted: 2003-01-14 12:14 UTC Modified: 2003-01-15 03:48 UTC
From: hanno at gmx dot de Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 4.3.0 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hanno at gmx dot de
New email:
PHP Version: OS:

 

 [2003-01-14 12:14 UTC] hanno at gmx dot de
The phpinfo()-function should contain a character encoding meta-tag. This would make it valid html with the w3c-validator at http://validator.w3.org.

The meta-tag would be like:
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-14 12:15 UTC] derick@php.net
Why care for a debug tool? It's not that phpinfo() is supposed to be used everywhere. Also iso-8859-1 might not be always correct.
 [2003-01-14 16:56 UTC] hanno at gmx dot de
Well, iso-8859-1 was only an example-tag.
It is really simple to implement, so why not making it valid.
 [2003-01-14 19:21 UTC] sniper@php.net
It's a debug tool. There's absolutely NO reason for it being 100% valid as long as it can be READ.

 [2003-01-15 03:43 UTC] hanno at gmx dot de
Well, it seems that this is already implenented, only commented out.
After looking at
/php-4.3.0/ext/standard/info.c
I found these lines:
/*
	php_printf("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\" />\n", charset);
*/

So you just have to uncomment it and it'll work.
 [2003-01-15 03:48 UTC] sniper@php.net
Here you can find the reason:

http://marc.theaimsgroup.com/?l=php-dev&m=103486469714881&w=2
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC