php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #28405 phpinfo() outputs HTML only
Submitted: 2004-05-14 21:45 UTC Modified: 2004-05-21 15:40 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: jpleveille at gameloft dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.0.0RC2 OS: Windows XP SP1
Private report: No CVE-ID: None
 [2004-05-14 21:45 UTC] jpleveille at gameloft dot com
Description:
------------
This might sound strange, but I want to display the content of phpinfo() in plain text in an administrative tool that only developers has access to, to embed its content without altering my design. The documentation reads that phpinfo() outputs plain text if html_errors is Off but even if I set html_errors to Off into php.ini, an .htaccess file or manually with ini_set(), this doesn't affect the output of phpinfo().

Reproduce code:
---------------
<?php
    // backing up old value
    $html_errors = ini_get('html_errors');
    ini_set('html_errors', 0);

    phpinfo();

    // restoring preceding html_errors value
    ini_set('html_errors', $html_errors);
?>

Expected result:
----------------
Plain text and no HTML.

Actual result:
--------------
HTML, HTML and only HTML.

I checked into PHP 4.3.5 and it does the same too. I also checked using the PHP CLI and fortunately, the content outputted is in Plain Text (php -r phpinfo();)

JP.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-15 17:31 UTC] derick@php.net
The documentation is wrong then as phpinfo() will only output plain text when you use it through the CLI.
 [2004-05-21 15:40 UTC] nlopess@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:12 UTC] phpdocbot@php.net
Automatic comment on behalf of nlopess
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=58a08565ccb44386ce148db9cf2e089e7a24b10a
Log: fix #28405: correcting the note about output
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 18:01:28 2024 UTC