php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1828 call to ereg crashes apache with a segfault 11.
Submitted: 1999-07-22 09:19 UTC Modified: 1999-07-22 09:31 UTC
From: rasjani at pcuf dot fi Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0.11 OS: Linux / REdhat 6.0
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: rasjani at pcuf dot fi
New email:
PHP Version: OS:

 

 [1999-07-22 09:19 UTC] rasjani at pcuf dot fi
This following script is from  php manual and is causing me trouble.  Ive asked help from #php (from efnet & ircnet) and in both places ppl think its a bug.  Here's the script.

<?PHP
	$date = "1999-01-01";
	if ( ereg( "([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $date, $regs ) ) {
	    echo "$regs[3].$regs[2].$regs[1]";
	} else {
	    echo "Invalid date format: $date";
	}
?>

This script wasnt the first time i found the bug but ive tested this too and the same things happens. Browser complains about empty document and apache's errlog file gets this message:

[Thu Jul 22 15:59:22 1999] [notice] child pid 16696 exit signal Segmentation fault (11)

Here's info that might help to solve the problem.. 

PHP Version: 3.0.11 (selfcompiled, with following switches)
	--with-apxs=/usr/sbin/apxs --with-pgsql=/usr/include/pgsql --with-system-regex
Apache: 1.3.6 (straight from redhat RPM, not self compiled)
Distro: Linux Redhat 6.0


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-22 09:31 UTC] andrey at cvs dot php dot net
There is a bug in configure when hsregex and apxs are used.

To fix it,  undo this change:

http://cvs.php.net/cvsweb.cgi/configure.in.diff?r1=1.412&r2=1.413&f=h

and then run autoconf and remake PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 15:01:29 2024 UTC