|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34006 CLI phpinfo showing html on odbc.default_pw
Submitted: 2005-08-05 11:06 UTC Modified: 2005-08-06 00:38 UTC
From: csaba at alum dot mit dot edu Assigned:
Status: Closed Package: CGI/CLI related
PHP Version: 5.1.0b3 OS:
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.
Block user comment
Status: Assign to:
Bug Type:
From: csaba at alum dot mit dot edu
New email:
PHP Version: OS:


 [2005-08-05 11:06 UTC] csaba at alum dot mit dot edu
If, on my Win XP Pro, I invoke the CLI php.exe or php-win.exe to do:
<? phpinfo() ?>
then I see that only the odbc.default_pw line has html markup:
odbc.default_pw <i>no value</i> <i>no value</i>

That line seems incorrect, being at odds with the rest of the output generated, which has no html markup.

Expected result:
OK, the reason for this trivial, though real, report is actually to ask a question, lest I missed something, before filing a suggestion.

A perfectly reasonable thing to do with CLI PHP is to bring up IE and have it do things, including displaying html formatted phpinfo(), but the below code will not format it (as is also noted at )

    // bring up IE (from CLI)
    $ie = new COM("InternetExplorer.Application");
    $ie->visible = true;

    // try to get formatted phpinfo();
    ini_set("html_errors", "1");
    $phpinfo = ob_get_contents();

    // output it to IE

The suggestion that I got at
was to use the CGI version of PHP.  Which works.  But that begs the question of why have the CLI version at all, then.

Thus, my real question is:  Wouldn't it make sense to have phpinfo() respect the html_errors setting, or, have a 2nd, optional argument on phpinfo() to allow it use the "other" format.  Unless it's already possible or there's a reason not to, I'll presume to file this as a suggestion.

Csaba Gabor from Vienna


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-05 11:15 UTC]
Please try using this CVS snapshot:
For Windows:

Works just fine here.
 [2005-08-05 23:57 UTC] csaba at alum dot mit dot edu
Hi Tony,

    I have downloaded from just now and find that both issues I reported are still there:

1.  the concrete bug report of the (<i>) italics are still there when invoking (CLI) php.exe on the code that I gave (of course, in the code that I gave you have to search for 'obdc' and then notice that 'no value' is italicized since the output has gone to the browser).  This is true regardless of whether the ini_set line is invoked or commented out.

2.  The issue that I raised at the end is also not resolved since at the same time, the output to the browser is otherwise not formatted, despite having set html_errors to 1
 [2005-08-06 00:38 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

Problem in summary is fixed. I don't know what you meant with the other one anyway. Plus we don't like many bugs reported with one report..

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Jul 23 20:01:23 2021 UTC