sqlwiz
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin: W3 Total Cache] w3tc conflict with mu multi-sitehttp://www.w3-edge.com/wordpress-plugins/w3-total-cache/#idc-cover
Page 2 – Gordon Franke.
Looks like I was seeing things that are not there, it is not the same – sorry.
Forum: Plugins
In reply to: [Plugin: W3 Total Cache] w3tc conflict with mu multi-siteVHOST is set to no. Multiple domains are handled by the MU Multi-Site plugin. Blog may or may not be at the top level. That is why nothing was returned. I see someone over on the other thread had this issue two months ago and came up with the same fix. I noticed that W3TC uses the same logic when creating the cache_key in Db.php
So I think define.php should have this logic.
define(‘W3TC_CONFIG_PATH’, WP_CONTENT_DIR . ‘/w3-total-cache-config’ . (($w3_blog_id = w3_get_blog_id()) != ” ? ‘-‘ . $w3_blog_id : ‘-‘ . w3_get_domain($_SERVER[‘HTTP_HOST’])) . ‘.php’);My fix gets the function working but a better solution is needed.
I removed the if statement that starts at line 1044 in W3/lib/Plugin/Cdn.php.
This was done for debugging purposes only, and is not the best solution because the function will execute unnecessarily. But you might be able to tell if you have the same problem as we do.
Hopefully, there will be more info soon.
Okay, I found the code I suspect is doing this, it returns from the callback if a regex match is already in the list of match urls. Will send to you.
No luck. I added some debug info near preg_replace_callback in the function ob_callback in Cdn.php.
preg_last_error returns PREG_NO_ERROR.
ini_get(‘pcre.backtrack_limit’) returns whatever I set in php.ini.
added limit -1 and a count variable to preg_replace_callback.The replacement count is 6 – which is the correct number of targets – 4 occurrences of one url and 2 occurrences of the second url.
The CDN Debug info lists the two replaced urls correctly, it is just the urls gets replaced only once not globally.
Forum: Plugins
In reply to: [Plugin: W3 Total Cache] disk enhanced page cacheWe’re using memcached for the database. I was trying to get the big win from bypassing php and wp. I’ll stick with memcached for the pgcache.
I suspect a php ini setting may be the cause of the problem here:
see http://www.php.net/manual/en/ref.pcre.php#77790
pcre.backtrack_limit is at the default of 100000
Do you have a recommended value?
Forum: Plugins
In reply to: [Plugin: W3 Total Cache] disk enhanced page cacheIf you that you might manage the /tmp directory, I did not expect that from w3tc. This is a special case in which we cannot write to the file system.
My question concerns disk based enhanced page caching in a multiple server setup. It seems that on any given server, if Apache does not find a given cached file, it will send the request to WP and the result will be cached. So I think the down side is that a given page could be different on the various servers for a period of time if posts are updated. We would probably keep the cache time short and flush as needed.
Forum: Plugins
In reply to: [Plugin: W3 Total Cache] CDN Type: Origin PushFrederick – I’ve added a little code to our copy of http://Ftp.php that checks file dates (if available) before deciding that a file already exists. Works great.
I’ll send it or publish here if you want it.
Forum: Plugins
In reply to: [Plugin: W3 Total Cache] A few Questions From a Non-ExpertSage one,
The Yslow FAQ describes how you can configure Firefox to recognize your static subdomain host as a “CDN”.
http://developer.yahoo.com/yslow/faq.html#faq_cdn
It’s pretty easy and helps you to easily narrow down the list of things that still need to be addressed.
Forum: Plugins
In reply to: [Plugin: W3 Total Cache] disk enhanced page cacheI see that if /tmp/pgcache is removed, the plugin does not recreate it or the .htacces file. We will have to manage that. This deployment is a multi-server environment, I’d expect that a page may wind up cached on each server, but I don’t see that as a problem for a page cache.
Frederick – what do you think about that?
Forum: Plugins
In reply to: [Plugin: W3 Total Cache] CDN Type: Origin PushThere is another way of looking at this. I just noticed that a change in file size is picked up by w3tc, and the file is resent – nice!
Each file to be sent is checked on the remote server with ftp_size and if found and the size matches, the “File already exists” message is displayed, otherwise the file is resent.
It would be extremely helpful to add support for a date check with ftp_mtdm (if the remote server supports it).
If ftp_mtdm is not an option, because not all servers support it, a simple time stamp of the last transfer (includes, theme, custom, etc.) stored in the config could be used to check files on the way out.
Further testing. The previous test was to add an image from the media library using a “File URL” and only the first occurrence (out of two) of the url was replaced with the asset host url. In the next test I used “Post URL” on an image added from the media library. In this case the image tag SRC url was replaced with asset host because the anchor tag HREF url is now a post url and not a candidate for replacement.
The software acts like the the search/replace logic only replaces the first occurrence of the file url string.
I confirmed this by adding the same image twice in the same post using the “File URL” option. Only one of four occurrences of the file url has the domain replaced with the asset host.
I just tried this on a test post. I added a new post, added an image using the Add Media function and selected an image from the media library.
That creates an image tag inside an anchor tag. In the post content, both tags refer to the same url:
http://www.domain.com/blogname/files/2009/09/somepic.jpg.
I expected, that when viewed from outside, the domain would be replaced with the asset host that we configured (assets.domain.com).
The anchor tag does point to the asset host, but the image tag does not, so the jpeg is still sourced from the wordpress site, not the asset host. It is only sourced from the asset host if you click on the picture.
Forum: Plugins
In reply to: [Plugin: W3 Total Cache] w3tc conflict with mu multi-siteGood Morning!
We’re using MU Multi-Site V 0.0.7 from jerseyconnect.net/development.
Looks like the memcached keys will be okay since w3tc appends the HTTP_HOST when $blog_id is empty. That gave me the idea to modify line 36 in define.php as follows:
define(‘W3TC_CONFIG_PATH’, WP_CONTENT_DIR . ‘/w3-total-cache-config’ . (($w3_blog_id = w3_get_blog_id()) != ” ? ‘-‘ . $w3_blog_id : ‘-‘ . $_SERVER[‘HTTP_HOST’]) . ‘.php’);
I’ve just tried it and it seems to be working. Hopefully, you’ll include this or something similar.