From:             csaba at alum dot mit dot edu
Operating system: 
PHP version:      5.1.0b3
PHP Bug Type:     CGI related
Bug description:  CLI phpinfo showing html on odbc.default_pw

Description:
------------
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
http://bugs.php.net/bug.php?id=28405 )

<?php
    // bring up IE (from CLI)
    $ie = new COM("InternetExplorer.Application");
    $ie->Navigate("about:blank");
    $ie->visible = true;

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

    // output it to IE
    $ie->Document->Write($phpinfo);
?> 

The suggestion that I got at
http://groups-beta.google.com/group/comp.lang.php/browse_frm/thread/8b98f603dcd62123/
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.

Thanks,
Csaba Gabor from Vienna


-- 
Edit bug report at http://bugs.php.net/?id=34006&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34006&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34006&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34006&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34006&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34006&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34006&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34006&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34006&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34006&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34006&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=34006&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=34006&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34006&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34006&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34006&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34006&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34006&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34006&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34006&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34006&r=mysqlcfg

Reply via email to