php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61662 header() cause apache to segfault
Submitted: 2012-04-07 22:03 UTC Modified: 2012-04-08 01:19 UTC
From: gmblar+php at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.4.0 OS: Debian 6
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: gmblar+php at gmail dot com
New email:
PHP Version: OS:

 

 [2012-04-07 22:03 UTC] gmblar+php at gmail dot com
Description:
------------
Apache segfault, when call header() with wrong parameters.

Test script:
---------------
header('Cache-Control', 'public,max-age=86400');


Expected result:
----------------
Nothing

Actual result:
--------------
httpd[26348]: [core:notice] [pid 26348:tid 47243385569824] AH00052: child pid 
26491 exit signal Segmentation fault (11), referer:

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-04-07 22:54 UTC] rasmus@php.net
Are you sure that's all you have in your script? I tried this both on Debian and 
Ubuntu from CLI and under Apache and I also checked it with Valgrind. I see no 
memory issues with this.
 [2012-04-07 22:54 UTC] rasmus@php.net
-Status: Open +Status: Feedback
 [2012-04-08 00:15 UTC] gmblar+php at gmail dot com
Tested with Apache 2.4 (mod_proxy_fcgi) and PHP-FPM 5.4.

Apache configuration: http://foobox.de/Apache/Konfiguration/
PHP configuration: http://foobox.de/PHP/info.php
 [2012-04-08 00:22 UTC] rasmus@php.net
-Status: Feedback +Status: Not a bug
 [2012-04-08 00:22 UTC] rasmus@php.net
But if you are running php-fpm then there is no PHP code in your Apache process. 
It is only communicating via FastCGI. And since your segfault is in httpd then 
this isn't a PHP bug. It doesn't matter what we send over FastCGI to Apache, 
nothing we can possibly send should trigger a segfault. Report the bug to the 
Apache folks.
 [2012-04-08 00:24 UTC] gmblar+php at gmail dot com
-Status: Not a bug +Status: Open
 [2012-04-08 00:24 UTC] gmblar+php at gmail dot com
The problem occurs only with Apache 2.4, not in the CLI version of php.

$ uname -a
Linux foobox 2.6.32-238.19.1.el5.028stab092.2 #1 SMP Thu Sep 22 13:24:07 MSD 2011 
x86_64 GNU/Linux

$ cat /etc/debian_version 
6.0.4
 [2012-04-08 00:29 UTC] rasmus@php.net
-Status: Open +Status: Not a bug
 [2012-04-08 00:29 UTC] rasmus@php.net
Yes, but we can't fix bugs in Apache 2.4. Show me a stack of a segfault in actual 
PHP code and I can take a look.
 [2012-04-08 01:19 UTC] gmblar+php at gmail dot com
Reported to Apache Bugtracker https://issues.apache.org/bugzilla/show_bug.cgi?
id=48272
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 19:01:28 2025 UTC