WordPress.org

Ready to get started?Download WordPress

Forums

CDN Sync Tool
Can not troubleshoot the "Details aren't valid" message (10 posts)

  1. Sergei
    Member
    Posted 3 years ago #

    I am using Cloudfiles and have attempted to setup the plugin to use my account. I am getting the "Details aren't valid" message upon clicking the "Check Details" button and "Fatal error: Call to a member function create_object() on a non-object in /xxxx/wordpress/wp-content/plugins/cdn-sync-tool/lib/Cdn/Cf.php on line 76" upon attempt to sync files. It looks like the plugin can not talk to CF system. Maybe a dependency is not met or something else is wrong, but I've searched everywhere for clues and can't find any. Would it be possible to expose some extended data for troubleshooting?

    Also, in the "CDN Provider" area "Container" input has seems like an incorrect hint message, possibly resulted from copy-and-paste of the "Username" input php code.

  2. Backie
    Member
    Plugin Contributor

    Posted 3 years ago #

    Hmm, this error shouldn't have occured and I've added another check to ensure it doesn't. What has happened is you've not given a proper container name so when the plugin goes to create the container object it returns boolean. So on like 76 when a container object is expected it freaks out when it's given a boolean.

    The cause of the problem is you're container name is incorrect.

    Thanks for the heads up on the container hint text, I'll change that.

  3. Sergei
    Member
    Posted 3 years ago #

    Where do I get the latest code? Git head somewhere?

  4. Backie
    Member
    Plugin Contributor

    Posted 3 years ago #

    It's generally avaible on WordPress svn. However I haven't uploaded the latest development code due to testing the cron schedule.

  5. Sergei
    Member
    Posted 3 years ago #

    I will wait for you to update the repo and give it another try. As I said, both messages indicated troubles connecting to CF servers, but I don't know what is causing it because I have already triple checked the credentials and I can access CF using them with a difference (Ruby) API.

  6. Sergei
    Member
    Posted 3 years ago #

    As I could connect using Ruby API, I've decided to try to localize the issue by using PHP API at a lower level. I have found one hidden dependency was not installed on the Ubuntu server: here is the fix:

    sudo aptitude install ca-certificates

    You may want to update your documentation to show that.

  7. Backie
    Member
    Plugin Contributor

    Posted 3 years ago #

    Ah, cheers for the heads up. There is method you can call to use the ssl certs provided with the CloudFiles sdk. I'll look into auto enabling that.

  8. lantrix
    Member
    Posted 3 years ago #

    I'm also on an Ubuntu 10.04 server, and am getting the "Details aren't valid" message upon clicking the "Check Details" button.
    Using Cloudfiles as well.

    WP3.1.3, wp-supercache 0.9.9.9 and CDN Sync 1.12 are installed.

    I DO have the ca-certificates installed:

    $ sudo dpkg-query -Wf  '${Installed-Size}\t${Package}\n' | sort -n |grep ca-cert
    736	ca-certificates

    Should the URL of the CDN in Sync tools be the URL from the container, or can it be my CNAME I've setup (and works):

    $ host cdn.50up.com.au
    cdn.50up.com.au is an alias for c621487.r87.cf2.rackcdn.com.
    c621487.r87.cf2.rackcdn.com is an alias for a87.rackcdn.com.
    a87.rackcdn.com is an alias for a87.rackcdn.com.mdc.edgesuite.net.
    a87.rackcdn.com.mdc.edgesuite.net is an alias for a89.cf.akamai.net.
    a89.cf.akamai.net has address 61.9.129.232
    a89.cf.akamai.net has address 61.9.129.241
  9. lantrix
    Member
    Posted 3 years ago #

    I've done some more digging, and had a look at the Cloudfiles PHP API (which is about three versions ahead of the one in the plugin), and found the following occur on my MAMP dev instance (with XDebug and MacGDBp):

    • the plugins lib/Cdn/Cf.php calls Cdn_Cf->login
    • This calls the API cloudfiles.php
    • During Function call CF_Authentication->authenticate $status is NULL
    • an exception is caught, and the message in $e is "Unexpected response ():"
  10. lantrix
    Member
    Posted 3 years ago #

    Using the current PHP API from Cloudfiles on the same server, this successfully authenticates (user/api removed):

    <?php
    ini_set('display_errors', 1);
    error_reporting(E_ALL);
    require 'cloudfiles.php';
    
    $auth = new CF_Authentication(
    "myusername",
    "myapikey",
    NULL,
    US_AUTHURL);
    
    if ( $auth->authenticate() ) {
    	$cloudfiles = new CF_Connection($auth);
    	$container = $cloudfiles->get_container('50up');
    	if ( !is_a($container,'CF_Container') ){
    		print "fail";
    	}
    	print "pass";
    } else {
    	print "fail";
    }
    ?>

    Running the same file against the API version included in the plugin also successfully works, so not sure why the detail check from the admin page is getting an Unexpected Response.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic