php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35210 php script as errordocument causes segmentation fault
Submitted: 2005-11-14 06:01 UTC Modified: 2005-11-23 01:00 UTC
Votes:9
Avg. Score:4.4 ± 0.7
Reproduced:9 of 9 (100.0%)
Same Version:8 (88.9%)
Same OS:5 (55.6%)
From: jmaguire123 at hotmail dot com Assigned:
Status: No Feedback Package: Apache2 related
PHP Version: 5CVS-2005-11-14 (CVS) OS: Fedora Core 4 httpd-2.0.55
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jmaguire123 at hotmail dot com
New email:
PHP Version: OS:

 

 [2005-11-14 06:01 UTC] jmaguire123 at hotmail dot com
Description:
------------
I know this issue has been seen and fixed in other versions, but I am seeing this in both php5.0.5 and the 11/14 snapshot.

Linux Fedora, core 4.  stock httpd 2.0.55 built from source.

I have custom 404 errordocument directive in my httpd.conf file which points to .php script.  404 the causes segmentation fault.

Any help is greatly appreciated.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-14 14:33 UTC] frederic dot jacquot at insa-lyon dot fr
Same probleme here, using php-4.4.1 and httpd-2.0.55 (both built from source). It may also be a HTTPd problem.
 [2005-11-14 14:57 UTC] frederic dot jacquot at insa-lyon dot fr
Ok, downgrading to 4.4.0 fixed this issue.
 [2005-11-14 18:46 UTC] iliaa@php.net
This works fine in 4.4.2-dev and 5.1.0RC5 
 [2005-11-15 20:12 UTC] jmaguire123 at hotmail dot com
I am not sure why this was closed.  Downgrading is not a solution to this issue.

Has anyone fixed this?

Thanks.
 [2005-11-15 20:21 UTC] tony2001@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2005-11-21 15:55 UTC] daniel at caret dot cam dot ac dot uk
OK. This is broken for us, too.
Platform details: 
* Apache 2 built from source[0].
* php 4.4.1 built from source[1]

In httpd.conf for a virtual host:
* ErrorDocument 404 /errordoc.php

What I did?
* caused a 404 by going to non-existent page
What I expected?
* errordoc.php to be served
What actually happened?
* "Error reading from socket" -- nothing is served.

This used to server errordoc.php prior to the upgrade to 4.4.1.

[0]
export CFLAGS="-DOPENSSL_NO_KRB5=1"
./configure --prefix=/usr/local/apache2/ --enable-so --enable-mods-shared=all --enable-auth-dbm --enable-proxy --enable-proxy-http --enable-ssl --enable-rewrite --with-ldap --enable-ldap --enable-auth-ldap

[1]
./configure  --with-mysql --with-openssl  --with-dom --with-zlib --with-xml --with-apxs2=/usr/local/apache2/bin/apxs --prefix=/usr/local/php-apache2 --with-pgsql --with-ldap --with-mcrypt --with-gd --with-jpeg-dir=/usr
 [2005-11-21 21:49 UTC] igor-php at grinchenko dot org
apache 2.0.55(source), php 4.4.1(source), FC2.
exactly the same problem as described above. apache only segfaults when errordocument page is set to a file. tried php and html extensions. when errordocument is set to some text message: 
i.e.  ErrorDocument 403 "page doesn't exist"
all is fine.
related strace output:

[pid 12688] getsockname(9, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("local_ip")}, [16]) = 0
[pid 12688] fcntl64(9, F_GETFL)         = 0x2 (flags O_RDWR)
[pid 12688] fcntl64(9, F_SETFL, O_RDWR|O_NONBLOCK) = 0
[pid 12688] read(9, "GET /asdfdasfd HTTP/1.1\r\nAccept:"..., 8000) = 416
[pid 12688] gettimeofday({1132605779, 447411}, NULL) = 0
[pid 12688] stat64("path_to_nonexistent_file", 0xbff19abc) = -1 ENOENT (No such file or directory)
[pid 12688] lstat64("/www", {st_mode=S_IFDIR|0755, st_size=440, ...}) = 0
[pid 12688] lstat64("path_to_dir_three_levels_up_from_nonexistent_file", {st_mode=S_IFDIR|0755, st_size=136, ...}) = 0
[pid 12688] lstat64("path_to_dir_two_levels_up_from_nonexistent_file", {st_mode=S_IFDIR|0755, st_size=72, ...}) = 0
[pid 12688] lstat64("path_to_dir_where_nonexistent_file_is", {st_mode=S_IFDIR|0755, st_size=176, ...}) = 0
[pid 12688] lstat64("path_to_nonexistent_file", 0xbff19a9c) = -1 ENOENT (No such file or directory)
[pid 12688] gettimeofday({1132605779, 452037}, NULL) = 0
[pid 12688] write(7, "[Mon Nov 21 12:42:59 2005] [erro"..., 135) = 135
[pid 12688] stat64("path_to_404.html", {st_mode=S_IFREG|0644, st_size=1572, ...}) = 0
[pid 12688] lstat64("path_to_404.html", {st_mode=S_IFREG|0644, st_size=1572, ...}) = 0
[pid 12688] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
[pid 12688] chdir("/www")               = 0
[pid 12688] rt_sigaction(SIGSEGV, {SIG_DFL}, {SIG_DFL}, 8) = 0
[pid 12688] kill(12688, SIGSEGV)        = 0
[pid 12688] sigreturn()                 = ? (mask now [])
[pid 12688] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
Process 12688 detached
 [2005-11-23 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 18:01:33 2024 UTC