Thread Starter
Tybaze
(@tybaze)
My Fix is wrong, please use
@eval('$config = '.substr($content, 16));
Hi there,
after upgrading to 0.9.4 I have the same problem. The site is not working as soon the plugin is activated. Just like Tybaze I’m using Ubuntu 10.04.4.
Other versions:
Apache: 2.2.14
PHP: 5.3.2
WP: 3.8.2
W3TC: 0.9.4
There’s nothing else in the logs, just a Segfault
[Wed Apr 09 09:39:51 2014] [notice] child pid 28026 exit signal Segmentation fault (11)
0.9.3 worked without any problem. The above mentioned fix does not work for me. :/
Thread Starter
Tybaze
(@tybaze)
This is possible my fix didn’t work, because I do a substr starting at 16, but I don’t know what is in your “/w3tc-config/master-admin.php” file.
On the svn I can see a change in the method W3_ConfigData::get_array_from_file()
You can fix it by replacing line 134/135:
$content = @file_get_contents($filename);
$config = @eval(substr($content, 5));
With :
$config = include $filename;
This will do the trick, I just tested it and it work.
I don’t know if the dev of this plugin will read this but :
I do not recommand to use “serialize/unserialize” for configuration, I recomand json_decode/encode.
Serilize implementation can change between PHP versions, so it could break compatibility whereas json never change.
More, json_decode/json_decode are faster than serialize. (but they do not manage Object, and here the configuration is an Array)
Hi Tybaze, really thanks for your fix, it worked for me and dont know why after 11 months it’s still exist 🙂