php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21007 html_errors off text-only output in phpinfo
Submitted: 2002-12-14 05:28 UTC Modified: 2003-03-30 08:15 UTC
Votes:4
Avg. Score:4.0 ± 1.7
Reproduced:4 of 4 (100.0%)
Same Version:4 (100.0%)
Same OS:3 (75.0%)
From: holliwell at gmx dot net Assigned: helly
Status: Closed Package: PHP options/info functions
PHP Version: 4.3.0 OS: all
Private report: No CVE-ID:
 [2002-12-14 05:28 UTC] holliwell at gmx dot net
Hi,
tested with the cgi-Version, also with the Apache-module with Apache 1.3.27. Setting html_errors off or this little skript:

<?php
ini_set("html_errors","on");
phpinfo();
?>

causes phpinfo() output text-only.

Regards
Friedhelm Betz

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-14 06:05 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php
 [2002-12-14 06:16 UTC] holliwell at gmx dot net
Sorry a misleading typo, but the script should be:
<?php
ini_set("html_errors","off");
phpinfo();
?>
or php.ini html_errors=off

Is it intended behaviour with this settings that phpinfo() produces text-only output no html-formated output?

Sorry if my first post wasn't clear enough.
BTW, I wasn'able to find anything in the docs, that setting html_errors off causes phpinfo() to display text-only output.

Regards
Friedhelm Betz
 [2002-12-14 06:19 UTC] derick@php.net
It's indeed intended like this (and I already forgave your typo :).

Derick
 [2002-12-14 06:31 UTC] holliwell at gmx dot net
If this is intended behaviour, this seems to be a doc problem, since I can't find anything about in the docs.

Regards
Friedhelm Betz
 [2002-12-14 13:39 UTC] davidbulock at tech-center dot com
I've submitted a note to document this behavior in the PHP Manual.
 [2002-12-14 15:17 UTC] philip@php.net
Where?  Put the information in this bug report.
 [2002-12-29 23:56 UTC] philip@php.net
Please explain why this is intended behavior, it does not make sense to me.  html_errors is for html_errors, it's documented as such in php.ini:

; Disable the inclusion of HTML tags in error messages.
;html_errors = Off

This says nothing about phpinfo() and IMHO it shouldn't affect it at all.  The patch that resulted in this change is here:

* add phpinfo() support for CLI.
http://cvs.php.net/diff.php/php4/ext/standard/info.c?r1=1.193&r2=1.194

Why is html_errors being used in this way?  When html_errors = off, errors remain readable when viewing in a browser but this textual version of phpinfo() == complete fubar in the browser (yes, one can use <pre>).  One might turn html_errors off, for example, to use error_prepend_string/error_append_string in some way.  Or they just don't want html in the errors... I don't see how this has anything to do with phpinfo() output.  Why doesn't that patch instead check if sapi = cli? 

A person shouldn't be forced to have this textual phpinfo() if they decide to not include html in php generated errors.  Please explain.  phpinfo() is not an error! :)
 [2003-01-04 10:02 UTC] axel_kollmorgen at hotmail dot com
having "html_errors" "off" causing phpinfo() outputting text-only doesn't make any sense to me, neither. i completely support philip@php.net: phpinfo() is not an error, so it shouldn't depend on "html_errors".
 [2003-03-30 08:15 UTC] helly@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot 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 in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 17:01:58 2014 UTC