Bug #1035: ereg_replace() causes segmentation fault in Apache+mod_ssl

From: Date: Wed, 06 Jan 1999 21:07:21 +0000
Subject: Bug #1035: ereg_replace() causes segmentation fault in Apache+mod_ssl
Groups: php.dev 
Request: Send a blank email to php-dev+get-3348@lists.php.net to get a copy of this message
From: danbeck@mtginfo.com Operating system: RedHat Linux 5.2 PHP version: 3.0.5 PHP Bug Type: Reproduceable crash Bug description: ereg_replace() causes segmentation fault in Apache+mod_ssl After using the apxs utility that comes with Apache to reconfigure and install PHP3 3.0.5 as a DSO, I attempted to access a script that was previously working on the same machine. By eliminating a line of code at a time, It seems that the ereg_replace function in the code snippit below is causing the problem. If I comment that line out, my script works just fine, if I leave it in, it causes Apache to report and Segmentation Fault and IE4 tells me that the server returned an invalid response. <? $fp = fopen($dat_file_name, "r"); $count = -1; while(!feof($fp)) { $data = explode(":", fgets($fp, 1024)); // chomp $data[0] = chop($data[0]); $data[1] = ereg_replace( "\n", "", $data[1] ); $tmp_array[$data[0]] = $data[1]; } fclose($fp); ?> -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#3348) next »