|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-11-09 06:59 UTC] trustpunk at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 06:00:01 2025 UTC |
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.