|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-06-03 23:55 UTC] mikemc-phpbug at contactdesigns dot com
I have code that ran fine under 4.3.1 compiled with Apache like so:
'./configure' '--with-openssl' '--enable-memory-limit' '--with-mysql=/usr/local/mysql' '--with-zlib' '--with-apache=../apache_1.3.27' '--enable-inline-optimization' '--with-curl=/usr/local' '--with-mcrypt=/usr/local'
It was compiled the same exact way with 4.3.2 except with a newer version of curl.
This same code now causes a segmentation fault under 4.3.2:
[Tue Jun 3 21:25:51 2003] [notice] child pid 12107 exit signal Segmentation fault (11)
The offending code is related to a user defined error handler. My current workaround: remove the error handling code. I have isolated the problem to a single file and a function within that file. When I comment out the code that loads this file and calls that function, the segfaults stop and the code runs as normal:
//include_once('lib/Error/Handler.php');
//CDS_Error_Handler_Init();
Furthermore, I have to call the function - loading the file alone does not cause the problem. This error handler is a very old version of our current one which has changed significantly and has no problems in 4.3.2. You can find the code here:
http://caffeine.contactdesigns.com/~jolt/Handler.phps
I hope this helps - I am in no way put in a bind because of this bug - it is old code and does nothing for us now. Just hoping to help PHP out in any way possible. I tried out RC1 on the developemntal servers, but as it is sometimes, you don't catch the bug until you go to production.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 03:00:01 2025 UTC |
Here are the config parameters you will need to set prior to running the code (I only changed 4 from the original config where the crash was happening): // Set environment - either production or development $CDS_CONFIG['ENV_MODE'] = 'production'; // Semicolon delimited list of developers responsible $CDS_CONFIG['ADMINS'] = 'some@email.com'; // Error log - be sure to specify full path $CDS_CONFIG['ERROR_LOG'] = '/tmp/error.log'; // Template to be displayed to end users in production environment when an error // occurs. For example, "The web server has fallen and can't get up" ;-) $CDS_CONFIG['ERROR_TEMPLATE'] = '/tmp/error_template.html'; // Error callback function that can alter the way the error handler behaves. // Read lib/Error/Handler.php for more information. $CDS_CONFIG['ERROR_CALLBACK'] = NULL; // Set the error reporting level based on the environment $CDS_CONFIG['ERROR_REPORTING'] = ($CDS_CONFIG['ENV_MODE'] == 'development') ? (E_ERROR | E_WARNING | E_PARSE | E_NOTICE) : (E_ALL & ~E_NOTICE); // Log that debug messages are sent to (tail -f this file during debugging) $CDS_CONFIG['DEBUG_LOG'] = '/tmp/debug.log'; // Specify where debug output goes ("browser" or "log") $CDS_CONFIG['DEBUG_MODE'] = 'browser'; // Regular expression specifying which variables are not sent to debug output $CDS_CONFIG['DEBUG_EXCLUSION'] = '/.*(?:HTTP|CDS)/s';