Bug #71942 [Opn->Nab]: php_info() displays logo although expose_php is off

From: Date: Fri, 01 Apr 2016 19:32:33 +0000
Subject: Bug #71942 [Opn->Nab]: php_info() displays logo although expose_php is off
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200299@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71942&edit=1 ID: 71942 Updated by: cmb@php.net Reported by: powtac at gmx dot de Summary: php_info() displays logo although expose_php is off -Status: Open +Status: Not a bug Type: Bug Package: *General Issues Operating System: Ubuntu 3.13.0-79 PHP Version: 5.6.20 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: The note in the manual clarifies (emphasis mine): | Similarly, turning expose_php off will *not* affect seeing the | PHP logo in phpinfo(). So this is not a bug. Previous Comments: ------------------------------------------------------------------------ [2016-04-01 13:27:12] powtac at gmx dot de Description: ------------ With expose_php off I expect to have no logo displayed on php_info(). http://php.net/manual/ini.core.php#ini.expose-php says: "... affected the output of phpinfo(), as when disabled, the PHP logo and credits information would not be displayed." But actually the logo is displayed when running simple php_info(). See also http://stackoverflow.com/a/36356058/22470 Test script: --------------- <?php // expose_php must be off in php.ini // It can't be tested with 3v4l.org since php_info() is disabled there! ob_start(); phpinfo(); $out = ob_get_contents(); ob_end_clean(); echo 'expose_php is set to: '.var_export(getenv('expose_php'), 1)."\n"; echo 'Logo is present: '.var_export(preg_match('~alt="PHP logo"~', $out), 1); Expected result: ---------------- expose_php is set to: false Logo is present: 0 Actual result: -------------- expose_php is set to: false Logo is present: 1 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71942&edit=1

« previous php.bugs (#200299) next »