In one of my project, I'm using Zend_Rest_Client to call a webservice
and this call made Apache crash (only happen on Windows).
After some analysis I found the issue :
Line 633 : "$status = @preg_match($pattern, $query);" in
Zend_Uri_Http::validateQuery($query = null) called with a very long
query string creates a stackoverflow in Apache (the pattern matching
each char).
This is a known issue http://bugs.php.net/bug.php?id=47689 but IMO the
proposed solution isn't a good solution.
Right now, I have to override Zend_Uri_Http::valid() in order to
suppress the validateQuery() call but it's a very poor workarround.
Is there any possibility to use a more memory effective regexp to
validate the query ?
Thanks for your comments,
PS :
$query =
"id=5055671,5043821,43718,5040579,5043177,1804001,5055602,8849,5001901,5039536,336481,5000145,38863,5010085,692614,5037669,5003404,5035540,5038331,39231,690949,5037926,44400,5035825,690028,28133,5009032,5012210,5034533,5025474,33404,48122,5042203,695314,5041796,5013147,46451,25312,690951,46766,5012566,602766,41686,694744,5038016,5038276,5040088,5042757,15463,5041183,5021371,40121,5036192,336592,5009097,5034641,46867,5001512,5036270,39511,41466,5036173,695881,5055569,5019073,5034986,5034940,5034680,45218,5042898,48768,5042763,5001458,38404,5041164,5040721,5037143,5042012,5040568,1090475,39369,5039376,336506,5055619,9442,5039741,5021534,5021652,5002264,5050153,5034865,47431,5055663,5034653,5038207,5037996,46781,5043001,27226,40363,40623,5043102,5000080,694667,3050105,5027726,5034872,5042046,23280,4015463,5037615,5025088,5040637,5032419,24515,5043530,5002758,20287,5043718,41139,5037409,5041925,5034927,28134,5042795,5039893,5042526,5039644,5032573,5040374,5034996,5008820,5034934
,5022130,46897,18262";
--
Jean-Sébastien H.
au-fil-du.net
没有评论:
发表评论