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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC