php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #39441 "expose_php" does not work with ini_set() function.
Submitted: 2006-11-09 03:08 UTC Modified: 2006-11-09 08:52 UTC
From: trustpunk at gmail dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.2.0 OS: Windows
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: trustpunk at gmail dot com
New email:
PHP Version: OS:

 

 [2006-11-09 03:08 UTC] trustpunk at gmail dot com
Description:
------------
I can't get the "expose_php" Configuration option to work with
the ini_set function. I'm shocked that it doesn't work.

Reproduce code:
---------------
Let's test this on the "get_headers" function.

<pre>
<?php
ini_set("expose_php", 0);

$headers = get_headers("http://localhost/phpinfo.php", 1);

print_r($headers);
?>
</pre>

The same server is requesting a PHP page to see if the
"expose_php" configuration worked.

Output:

Array
(
    [0] => HTTP/1.1 200 OK
    [X-Powered-By] => PHP/5.2.0
    [Content-type] => text/html
    [Connection] => Close
    [Date] => Thu, 09 Nov 2006 03:05:24 GMT
    [Server] => Abyss/2.3.2-X2-Win32 AbyssLib/2.3.2
)

Why is PHP still exposed? I set it to Off!


Expected result:
----------------
I expect this to happen.

Array
(
    [0] => HTTP/1.1 200 OK
    [Content-type] => text/html
    [Connection] => Close
    [Date] => Thu, 09 Nov 2006 03:05:24 GMT
    [Server] => Abyss/2.3.2-X2-Win32 AbyssLib/2.3.2
)

Actual result:
--------------
The "expose_php" Configuration from the ini_set function did
not work. I would like this to be fixed. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-09 06:59 UTC] trustpunk at gmail dot com
I just read that it's a "php.ini" only Configuration. Sorry.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue May 17 13:05:45 2022 UTC