eltano343
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce PayPal Payments] Error activating VaultingHi Krystian, here it is https://privatebin.syde.com/?5aeec24762613a08#9DCCQkCRHF2CCkFCrQ9xdjoT3gkRxed2HN3PuLV6yZT7
Forum: Plugins
In reply to: [WooCommerce PayPal Payments] Error activating VaultingSorry, I missed the first email. It went to my spam inbox. We could not try the onboarding wizard because it belongs to the client. We used the manual input instead.
Forum: Plugins
In reply to: WP Super Cache and multiple serversHi Anthony. The services.php file simply loops over the list of IPs and call this file directly to the server. It is something like this:
<? $context = stream_context_create(array( 'http' => array( 'method' => 'POST', 'header' => 'Host: www.example.com\r\n", 'content' => 'f='.urlencode(@$_GET['f']).'&p1='.urlencode($_GET['p1']).'&p2='.urlencode($_GET['p2'])))); foreach($ips as $ip) @file_get_contents('https://'.$ip.'/wp-content/plugins/wp-super-cache/multiserver.php?no_propagate_cache_clean=1', false, $context); ?>
Forum: Plugins
In reply to: WP Super Cache and multiple serversI just modified the file wp-cache.php and added this code when the funcion wp_cache_clean_cache starts:
if(empty($_GET['no_propagate_cache_clean'])) @file_get_contents('https://xx.xx.xx.xx/wp-content/plugins/services.php?clean_cache=1&f=wp_cache_clean_cache&p1='.urlencode($file_prefix).'&p2='.($all ? '1' : '0'));
That file, services.php, is in another server (outside the platform) which has the same wordpress installation than the servers in production. Ant it calls another file, called, multiserver.php, inside the wp-super-cache folder which does only the following:
<? include dirname(__FILE__).'/../../../wp-config.php'; $functions_allowed = array(); //$functions_allowed[] = 'wp_cache_post_change'; //$functions_allowed[] = 'wp_cache_clear_cache'; $functions_allowed[] = 'wp_cache_clean_cache'; if(in_array(@$_POST['f'], $functions_allowed)) call_user_func($_POST['f'], @$_POST['p1'], @$_POST['p2']); ?>
It’s not the perfect solution, but it works.
Forum: Plugins
In reply to: WP Super Cache and multiple serversFinally, I just let each server generate its own cache file. I only modified the plugin to allow deleting the cache in all the servers when the user hits the button “Delete cache”.
Forum: Plugins
In reply to: WP Super Cache and multiple serversI tested the modification in production and it had to rollback it. It took too much time to run. I am gonna think in a different solution.
Forum: Plugins
In reply to: WP Super Cache and multiple serversThanks for the response. Finally, I modified the WP Super Cache plugin to propagate the cache refresh to the other servers.
I added my function in wp_cache_clear_cache(), wp_cache_clean_cache() and wp_cache_page_update() and it seems to work fine.