From:             csaba at alum dot mit dot edu
Operating system: Windows
PHP version:      5.1.0b3
PHP Bug Type:     Feature/Change Request
Bug description:  CLI php.exe should allow HTML with phpinfo()

Description:
------------
Using CLI php.exe or php-win.exe on Windows, it is a perfectly reasonable
thing to use COM to bring up Internet Explorer.  In fact, it makes a lot
of sense to use it strictly as a graphical output (or I/O) mechanism. 
Unfortunately, phpinfo() from these versions of php does not allow the
option of outputting with HTML.  Since COM is now supported in PHP5, it
seems that wanting CLI output of phpinfo() to go to a browser will become
more common.

I would therefore like to suggest that either:
(1) phpinfo() respect the html_errors setting or
(2) phpinfo() take a second, optional argument, which, if supplied and non
false, would lead to phpinfo() outputting HTML for CLI php and withholding
the HTML for non CLI php.

Thanks,
Csaba Gabor from Vienna

Note.  Running the attached code with php-cgi.exe will illustrate what I
would like: formatted phpinfo() appearing in IE.  But I'd like it to work
with php.exe and php-win.exe, too.

Reproduce code:
---------------
<?php
    // bring up IE (from CLI php.exe)
    $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);
?> 

Expected result:
----------------
I would expect to get formatted phpinfo() with the supplied code example,
but I only get raw phpinfo().


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

Reply via email to