When I activate "Aggregate and compress CSS files" (admin/settings/performance) The result is a "blank screen"
In Apache log I have: "exit signal Illegal instruction (4)"
The problem occurs in the preg_replace that strip the comment in all CSS. In /includes/common.inc function drupal_build_css_cache. If the css contain a certain string (see below, this string is present in stsytem.css, cck date.css ...) I think this is perhaps related to my server config (Mac OS), and regex libray. I submitted the bug in php too:
http://bugs.php.net/bug.php?id=43185
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 to put in a php file
---------------
<?
$data=
"
/*
** Details: http://www.positioniseverything.net/easyclearing.html
*/
";
$data = preg_replace('<
\s*([@{}:;,]|\)\s|\s\()\s* |
/\*([^*\\\\]|\*(?!/))+\*/ |
[\n\r]
>x', '\1', $data);
echo $data;
?>
Regards,
PS: congratutaltion for your good work Drupal Folks ! I hope I could contribute in the near futur too, when my learning curve will be absorbe ;-)
Comments
Comment #1
hass commentedsubscribe
Comment #2
millions commentedsubscribe
Comment #3
nico059 commentedThis problem is not present in Drupal 6.4
The function drupal_build_css_cache as been reworked, and do not perform this kind of optimisation anymore
Regards!
Comment #4
hass commentedShould be the server config, not the regex. I would expect the PHP memory limit...
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #6
millions commentedIt's great that this is fixed in 6.4, but the post was originally for 5.2, and still present in 5.10.
Comment #7
hass commentedI'm sure the "white screen of death" is a PHP memory issue... every time I have had such issues it was PHP memory limit or PHP timout. Please check your logs. The compression works well for me on many many sites in D5.
Comment #8
nico059 commentedThx hass for your response,
I have used the compression me too on D5 without problem on other plateform. This issue should be related to a config on this particular host (Mac OS X, apache, php ....) I don't know where exactly .... my host had recompile apache / php stuff perhaps something wrong in the build ... ?
I haven't this issue in D6.5, so I move to another challenge (perhaps learn more about YAML !)
My memory limit is 128 Mo.
Regards.
Comment #9
millions commentedmy memory is set at 64, and it works fine in other browsers.
Comment #10
hass commentedWhatever the issue is - it's a server issue - not a browser issue.
Comment #11
nico059 commentedYes it's a server issue
in drupal 5, I know it's not the best way to do: patch the core, but I just remove in
includes/common.inc the infriging line:
// Perform some safe CSS optimizations.
$data = preg_replace('<
\s*([@{}:;,]|\)\s|\s\()\s* | # Remove whitespace around separators, but keep space around parentheses.
/\*([^*\\\\]|\*(?!/))+\*/ | # Remove comments that are not CSS hacks.
[\n\r] # Remove line breaks.
>x', '\1', $data);
Comment #12
ainigma32 commentedAs this appears to be server issue and a workaround is given I'm setting this to fixed.
Feel free to reopen if you think that is wrong.
- Arie