|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-11-04 14:21 UTC] nicolas dot fruit+phpbug at gmail dot com
Description: ------------ preg_replace cause a "exit signal Illegal instruction (4)" in the apache log. My config: Mac OS Darwin Kernel Version 8.9.0 Apache/2.0.61 (same error with Apache 2.2) PHP Version 5.2.4 phpinfo related to regex: mbstring: - Multibyte regex (oniguruma) version 4.4.4 - Multibyte regex (oniguruma) backtrack check On The bug come from Drupal 5.2 /includes/common.inc function drupal_build_css_cache Reproduce code: --------------- <? $data= " /* ** Details: http://www.positioniseverything.net/easyclearing.html */ "; $data = preg_replace('< \s*([@{}:;,]|\)\s|\s\()\s* | /\*([^*\\\\]|\*(?!/))+\*/ | [\n\r] >x', '\1', $data); echo $data; ?> Expected result: ---------------- Remove the css "comment" on the string Actual result: -------------- exit signal Illegal instruction (4)" in the apache log. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 21:00:01 2025 UTC |
The same situation: * os x 10.10.4 * homebrew * php 5.6.10 * apache 2.4.12 It works from command line, but doesn't work from apache. <?php $data = file_get_contents("test.html"); $regexp = '!(?:\s*<tr class="row\d+">(?:\s*' . '<td class="column\d+(\s+style\d+ [a-z])?"> <\/td>)*\s*<\/tr>)+!s'; $data = preg_replace($regexp, "", $data); var_dump($data); test.html is here https://gist.github.com/sormy/b77420c0f0a9a50cbef1 this code will cause: [Tue Jul 07 21:19:00.409400 2015] [core:notice] [pid 82348:tid 140735326831360] AH00052: child pid 83095 exit signal Illegal instruction (4)