Bug #66375 [NEW]: Embedded Server segfault with header_register_callback
| From: | gmblar+php at gmail dot com | Date: | Tue, 31 Dec 2013 11:45:23 +0000 |
| Subject: | Bug #66375 [NEW]: Embedded Server segfault with header_register_callback | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-183511@lists.php.net to get a copy of this message | ||
From: gmblar+php at gmail dot com
Operating system: MacOSX 10.9.1
PHP version: 5.5.7
Package: *General Issues
Bug Type: Bug
Bug description:Embedded Server segfault with header_register_callback
Description:
------------
Embedded server segfault when callback for header_register_callback is a
method.
1. Create script.
2. Start embedded server with php -S 0.0.0.0:8080.
3. First curl request curl http://localhost:8080/foo
succeed.
4. Second curl request (only when path differs!) curl
http://localhost:8080/foobar fails.
Test script:
---------------
<?php
class Foo {
public function __construct() {
header_register_callback(array($this, 'headerCallback'));
}
public function headerCallback() {
}
}
$foo = new Foo();
Expected result:
----------------
PHP 5.5.7 Development Server started at Tue Dec 31 12:40:41 2013
Listening on http://0.0.0.0:8080
Document root is /Users/Username/Sites/Projectname/Public
Press Ctrl-C to quit.
[Tue Dec 31 12:41:27 2013] 127.0.0.1:54151 [200]: /foo
[Tue Dec 31 12:41:27 2013] 127.0.0.1:54154 [200]: /foobar
Actual result:
--------------
PHP 5.5.7 Development Server started at Tue Dec 31 12:39:09 2013
Listening on http://0.0.0.0:8080
Document root is /Users/Username/Sites/Projectname/Public
Press Ctrl-C to quit.
[Tue Dec 31 12:40:39 2013] 127.0.0.1:54136 [200]: /foo
[Tue Dec 31 12:40:41 2013] 127.0.0.1:54139 [200]: /foobar
Segmentation fault: 11
--
Edit bug report at https://bugs.php.net/bug.php?id=66375&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66375&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66375&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66375&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66375&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66375&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66375&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66375&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66375&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66375&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66375&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66375&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66375&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66375&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66375&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66375&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66375&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66375&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66375&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66375&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66375&r=mysqlcfg