-
☆ A M B ☆
- 318 Posts
I'm getting strange warnings when clearing the cache that I've never seen before, and I'm not sure whether the problem is on my end or if there is something wrong with the server. Uncached performance got really really slow at the same time, so it feels like something is wrong.
Environment:
CentOS
PHP: 5.2.14
Apache: 2.0.63
MySQL: 5.0.92-community
MODX: 2.1.3
Errors - I get lots of these when clearing the cache, and then the cache clears OK, but performance is very slow:
PHP warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set
and
Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/freenat4/core/model/modx/modx.class.php on line 2068
I checked phpinfo and open_basedir is indeed set. I'm not sure whether it was before, but my guess is that it was.
Right before this happened, I tried turning off cache_db to see if that impacted performance. Seems like that could be related. I turned it back on but that didn't help.
I also tried emptying the cache directory by hand, and reinstalling MODX. That hasn't helped either.
Does it sound like the problem is on my end (and if so, what can I do about it), or is there something wrong with my server, or...?
The string time one is no big deal, I think you need to add an entry to the .htaccess to make this one go away. IF you google the error and "MODx" you will get a post, i've definitly had this error before.
I know that safe_mode should also be SWITCHED OFF.
It seems like it's on in your config? Might be related.
Seems like a config change alright, is it your server?
Could anyone else have changed the version of php or the config in any way?
Also opengeek mention in another post that cache_db was giving inconsistent results.
As a result i am leaving it off for a project im currently on. Perhaps someone with more info on this can update you on this.
-
☆ A M B ☆
- 318 Posts
Thanks jusmeig. safe_mode is off, I checked. The trouble is that open_basedir is set.
I'll try turing cache_db off again. It doesn't seem to affect performance much, presumably because database access is adequately fast in my environment.
I guess my question is, why is MODX even trying to use CURLOPT_FOLLOWLOCATION when I clear the cache? Since I never got this error before, I assume it wasn't doing that before, why would it start now?
-
☆ A M B ☆
- 318 Posts
Yeah, I saw that, but this is not happening during package management, it's when I clear the cache.
-
MODX Staff
- 10,725 Posts
I certainly don't see anything that would trigger this error when refreshing the cache. Make sure you don't have any plugins attached to the OnBeforeCacheUpdate or OnSiteRefresh events doing something.
-
☆ A M B ☆
- 318 Posts
Aha! I found it! Thanks for the tip about plugins! It's the phpthumbof cache manager plugin -- it listens to the OnSiteRefresh event and tries to clear the cache. I normally keep this plugin disabled because I use Amazon S3 and I don't actually want to clear the cache there every time I clear the site cache, but last night I updated my phpthumbof and forgot to disable the plugin!
I suppose I should file this as a bug in phpthumbof. I disabled the plugin and everything is back to normal -- including the uncached performance, because presumably what was slowing it down was having to regenerate all of the thumbnails every time I cleared the cache!
[ed. note: esnyder last edited this post 15 years ago.]