php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71942 php_info() displays logo although expose_php is off
Submitted: 2016-04-01 13:27 UTC Modified: 2016-04-01 19:32 UTC
From: powtac at gmx dot de Assigned: cmb (profile)
Status: Not a bug Package: *General Issues
PHP Version: 5.6.20 OS: Ubuntu 3.13.0-79
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: powtac at gmx dot de
New email:
PHP Version: OS:

 

 [2016-04-01 13:27 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-01 19:32 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2016-04-01 19:32 UTC] cmb@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 02:01:26 2024 UTC