|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-01-06 01:31 UTC] aharvey@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: aharvey
[2015-01-06 01:31 UTC] aharvey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 01:00:02 2025 UTC |
Description: ------------ I'm not sure whether this is a bug in the web server or in PHP itself, but trying to access $_SERVER when PHP has received an invalid request such as: GET www.example.com:80 HTTP/1.1 Makes the built-in web server segfault. Test script: --------------- 1. Create a test.php file containing this line: <?php print_r($_SERVER); 2. Start the built-in web server on this file: php -S localhost:8888 test.php 3. Run this PHP code to send an invalid HTTP request: $fp = fsockopen('localhost', 8888); fwrite($fp, "GET www.example.com:80 HTTP/1.1\r\n\r\n"); while (! feof($fp)) echo fread($fp, 1024); fclose($fp); The web server will segfault.