I’ve isolated the problem to the minify scripts you included in W3TC, as you can see in the error. Here’s what I did to fix the problem.
1. Disabled Minify in W3TC
2. Installed the WP Minify plugin
3. All the errors stopped, and I have my site minified
WP Minify uses the Minify engine as I believe W3TC does as well. I compared line 119 from the HTML.php file from W3TC to the Minify engine file, and found they are identical, however the HTML.php from both the Minify engine and W3TC differed from the code in WP Minify.
The Minify Engine and W3TC HMTL.php file contains (lines 115-119):
// replace TEXTAREAs with placeholders
$this->_html = preg_replace_callback(
'/\\s*(<textarea\\b[^>]*?>[\\s\\S]*?<\\/textarea>)\\s*/i'
,array($this, '_removeTextareaCB')
,$this->_html);
The WP Minify HTML.php contains (lines 89-93):
// replace TEXTAREAs with placeholders
$html = preg_replace_callback(
'/\\s*(<textarea\\b[^>]*?>[\\s\\S]*?<\\/textarea>)\\s*/i'
,array(self::$className, '_removeTaCB')
, $html);
The only disadvantage to using WP Minify is that it serves the compressed .css and .js files from the hard disk, rather than memcached, but Apache compresses them with gzip as well, so there’s no resource use impact that is noticeable.