bsmither Posted April 30, 2018 Share Posted April 30, 2018 Manually updated a CC6114 existing installation: Windows Server 2003 Dev Machine Apache 2.2 PHP 5.4.44 Yes, I know its old, but hasn't been a problem - until now. Specifically, the problem is related to the new function and filter added to Smarty. That function and filter minimizes the page's resource files, then combines them all into one large CSS file and one large javascript file. The CC620 Foundation skin makes use of this new Smarty code. That crash manifests itself as an Unhandled Win32 Exception, and you may or may not be able to escape out of it via RDP. (A server restart was the way out for me.) A second occurrence, I dismissed the JITDebugger at the console, but the Apache httpd kept re-throwing it. (PHP is an Apache CGI module.) I restarted the Apache service to get out of that one. This will be interesting to suss out. HOWEVER, a fresh install of CC620B1 on Windows Server 2008R2x64, PHP 7.1 worked flawlessly. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 30, 2018 Share Posted April 30, 2018 Wow it really is old. Is there a good reason you are having to use such old software? PHP 7.1 or 7.2 would be ideal. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 30, 2018 Share Posted April 30, 2018 The only advice I can give us to remove the filter file and any uses of it within skins until you can upgrade the environment. It's not needed if the skin is optimised manually. Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 30, 2018 Author Share Posted April 30, 2018 (edited) "Is there a good reason you are having to use such old software?" It's a 'reason', not a "good reason" -- the cost of acquiring Windows Server (both financial and psychological). PHP 5.4.44 is the last version to run on Server 2003 (although there are stories of someone successfully compiling PHP 5.6 to run on it). Last year, I built a Linux Mint box. I chucked it in the closet after three weeks. "until you can upgrade the environment" I would rather re-work the CubeCart code to work with this environment. Edited April 30, 2018 by bsmither Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 30, 2018 Share Posted April 30, 2018 Ok I'd suggest removing the minification filter then unless we have some clearer error messages we can Google. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 2, 2018 Author Share Posted May 2, 2018 The exact trigger is attempting to minify an overly large CSS file (foundation.css). CubeCart6.2.0/includes/lib/smarty/plugins/minify/CSSmin.php The problem is setup by PCRE Regex (preg_replace(), etc) processing this large file. The minifier sets, via ini_set(), a higher limit for pcre.recursion_limit (default 100,000) to 500,000. The problem happens when this recursion limit allows for a stack overflow within Apache when running PHP as a CGI module. Apache Windows has a default 1MB stack size, Linux has 8MB. The solution is to configure Apache to run with an 8MB ThreadStackSize. However, even this is a fail waiting to happen. The fault is triggered when working with a sufficiently large file size no matter the stack size, and the recursion_limit is set high enough. The CSSmin module chunks the file into 25000 character parts. Perhaps having the module use smaller chunk sizes will avoid the stack overflows. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted May 2, 2018 Share Posted May 2, 2018 Might be worth asking at the official github project. https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port Our version could actually be out of date. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.