Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author tamlyn

    (@tamlyn)

    The remote SQL options should not be required as the database is accessed locally at each end and communication is plugin to plugin over HTTP.

    Did you make any progress with this?

    I’m having the same issues

    Screenshot

    View post on imgur.com

    Plugin Author tamlyn

    (@tamlyn)

    Hi Jacob, were you pulling or pushing when you got this error? And are you also using Hostgator?

    Hi,

    I am getting exactly the same error message when trying to push from my local install to live, and yes, I am on Hostgator,

    How can I fix this?

    Hi Tamlyn,

    thank you for this plugin. I am having the same problem both pulling and pushing and I am using as well hostgator. Did you find out what can it be?

    Thanks

    I found the fix to this atleast on HostGator. The issue is their mod_security settings on their shared hosting.

    function.php
    look for the function dbs_post

    Below is what my function looks like. I am sure it can be cleaned up some more but this was just something to get it working.

    function dbs_post($url, $action, $params) {
    	$header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,";
    	$header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
    	$header[] = "Cache-Control: max-age=0";
    	$header[] = "Connection: keep-alive";
    	$header[] = "Keep-Alive: 300";
    	$header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
    	$header[] = "Accept-Language: en-us,en;q=0.5";
    	$header[] = "Pragma: "; // browsers keep this blank.
    
    	$remote = $url . '/wp-admin/admin-ajax.php?action=' . $action . '&api_version=' . DBS_API_VERSION;
    	$ch = curl_init($remote);
    	curl_setopt($ch, CURLOPT_POST, true);
    	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    	curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
    	curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
    	$result = curl_exec($ch);
    	$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    	curl_close($ch);
    
    	if ($code != 200) {
    		throw new RuntimeException('HTTP Error', $code);
    	}
    	return $result;
    }

    I just made an account here to thank rearley for giving the solution to this problem. I have lots of sites in Hostgator and Database Sync just solved my life for pushing local db stuff to production.

    @rodrigovilla3, No problem, glad I could help.

    Seeing the same error using Bluehost, pulling from remote into local dev environment. I’ve also treid it from the other way around.

    Remote site not accessible (HTTP 406)

    or

    Remote site not accessible (HTTP 0)

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘(HTTP 406) Remote site not accessible’ is closed to new replies.