Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28985 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23856 invoked by uid 1010); 24 Apr 2007 16:13:18 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 23841 invoked from network); 24 Apr 2007 16:13:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Apr 2007 16:13:18 -0000 X-Host-Fingerprint: 90.240.39.28 user-5af0271c.wfd97.dsl.pol.co.uk Received: from [90.240.39.28] ([90.240.39.28:6020] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/81-60955-D9C2E264 for ; Tue, 24 Apr 2007 12:13:17 -0400 Message-ID: <40.81.60955.D9C2E264@pb1.pair.com> To: internals@lists.php.net Date: Tue, 24 Apr 2007 17:13:19 +0100 User-Agent: Thunderbird 1.5.0.10 (X11/20070403) MIME-Version: 1.0 References: <35.58.21560.7D6AD264@pb1.pair.com> <462DB34D.4080506@zend.com> <56.EF.60955.8A52E264@pb1.pair.com> <462E2989.4090908@zend.com> In-Reply-To: <462E2989.4090908@zend.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Posted-By: 90.240.39.28 Subject: Re: [PHP-DEV] Segfault in PHP 5.2.1 From: chrism@cjsoftuk.dyndns.org (Chris Malton) Antony Dovgal wrote: >>> What's in modx/index.php ? >>> Looking at the backtrace, I'd say there is an infinite loop. ]*?>.*?@si', '@&#(\d+);@e', '@\[\[(.*?)\]\]@si', '@\[!(.*?)!\]@si', '@\[\~(.*?)\~\]@si', '@\[\((.*?)\)\]@si', '@{{(.*?)}}@si', '@\[\*(.*?)\*\]@si'); foreach($_POST as $key => $value) { $_POST[$key] = preg_replace($modxtags,"", $value); } foreach($_GET as $key => $value) { $_GET[$key] = preg_replace($modxtags,"", $value); } $_SERVER['HTTP_USER_AGENT'] = isset($_SERVER['HTTP_USER_AGENT']) ? preg_replace("/[^A-Za-z0-9_\-\,\.\/\s]/", "", $_SERVER['HTTP_USER_AGENT']): ''; $_SERVER['HTTP_REFERER'] = isset($_SERVER['HTTP_REFERER']) ? preg_replace($modxtags,"", $_SERVER['HTTP_REFERER']) : ''; if(strlen($_SERVER['HTTP_USER_AGENT'])>255) $_SERVER['HTTP_USER_AGENT'] = substr(0,255,$_SERVER['HTTP_USER_AGENT']); if(isset($_GET['q'])) $_GET['q'] = preg_replace("/[^A-Za-z0-9_\-\.\/]/", "", $_GET['q']); // first, set some settings, and address some IE issues @ini_set('url_rewriter.tags', ''); @ini_set('session.use_trans_sid', 0); @ini_set('session.use_only_cookies',1); session_cache_limiter(''); header('P3P: CP="NOI NID ADMa OUR IND UNI COM NAV"'); // header for weird cookie stuff. Blame IE. header('Cache-Control: private, must-revalidate'); ob_start(); error_reporting(E_ALL & ~E_NOTICE); /** * Filename: index.php * Function: This file loads and executes the parser. * */ define("IN_ETOMITE_PARSER", "true"); // provides compatibility with etomite 0.6 and maybe later versions define("IN_PARSER_MODE", "true"); define("IN_MANAGER_MODE", "false"); // initialize the variables prior to grabbing the config file $database_type = ''; $database_server = ''; $database_user = ''; $database_password = ''; $dbase = ''; $table_prefix = ''; $base_url = ''; $base_path = ''; // get the required includes if($database_user=="") { $rt = @include_once "manager/includes/config.inc.php"; // Be sure config.inc.php is there and that it contains some important values if(!$rt || !$database_type || !$database_server || !$database_user || !$dbase) { echo "

MODx is not currently installed or the configuration file cannot be found.

Do you want to install now?

"; exit; } } // start session startCMSSession(); // initiate a new document parser include_once($base_path."manager/includes/document.parser.class.inc.php"); $modx = new DocumentParser; $etomite = &$modx; // for backward compatibility // set some parser options $modx->minParserPasses = 1; // min number of parser recursive loops or passes $modx->maxParserPasses = 10; // max number of parser recursive loops or passes $modx->dumpSQL = false; $modx->dumpSnippets = false; // feed the parser the execution start time $modx->tstart = $tstart; // Debugging mode: $modx->stopOnNotice = false; // Don't show PHP errors to the public if(!isset($_SESSION['mgrValidated']) || !$_SESSION['mgrValidated']) @ini_set("display_errors","0"); // execute the parser $modx->executeParser(); ?> I have pasted the modx/index.php file above, but it includes so many files, you might want to download it from http://www.modxcms.com Chris