Forum Replies Created

Viewing 15 replies - 1 through 15 (of 20 total)
  • Thread Starter LuxDelux

    (@luxdelux)

    Oh yes sorry to not post earlier

    [error] 27132#0: *14960 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0" while reading response header from upstream, client: 88.207.106.148, server: test.com, request: "POST /wp-admin/admin-ajax.php?action=ajax-checkclicks&nonce=666a6f9337 HTTP/1.1",
    Thread Starter LuxDelux

    (@luxdelux)

    Same error as above, but now it’s on line 604

    Cheers

    Thread Starter LuxDelux

    (@luxdelux)

    Thanks, still the same though a different error

    curl_getinfo(): 17 is not a valid cURL handle resource in /wp-content/plugins/rackspace-cloud-files-cdn/lib/functions.php on line 517

    Cheers

    Thread Starter LuxDelux

    (@luxdelux)

    New errors now

    curl_multi_info_read() expects parameter 1 to be reso urce, integer given in /wp-content/plugins/rackspac e-cloud-files-cdn/lib/php-opencloud-1.9.2/vendor/guzzle/guzzle/src/Guzzle/Http/C url/CurlMulti.php on line 245

    and

    curl_multi_exec() expects parameter 1 to be resource, integer given in /wp-content/plugins/rackspace-clo ud-files-cdn/lib/php-opencloud-1.9.2/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/C urlMulti.php on line 229

    When synchronizing

    Thread Starter LuxDelux

    (@luxdelux)

    I narrowed it down to also

    allow_url_fopen

    When set to On and the plugin is activated, website has extremely long load times.

    When set to Off, everything works fine.

    So basically it has something to do with fetching/sending files, though I don’t understand why that would happen if all the images are already synced and available.

    Forum: Plugins
    In reply to: [Rackspace CDN] Synchronize

    Ok I figured it out

    file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /blabla/wp-content/plugins/rackspace-cloud-files-cdn/lib/functions.php on line 316

    Previously it worked without fopen set to On. WP security practices advise on this being Off…

    I suggest implementing curl (faster too) in case it’s available on the server, use fopen if not.

    In other words, first try to use CURL, if that fails, use file_get_contents etc.

    Forum: Plugins
    In reply to: [Rackspace CDN] Synchronize

    Every time I open the CDN options it tells me I need to sync the files…

    I did this 3 times… my website is showing the files from the local wp-content folder… which means it’s not showing those that were previously uploaded just to CDN.

    So something broke

    Thread Starter LuxDelux

    (@luxdelux)

    Indeed some kind of temporary fixed version would be welcome.

    As for why the feature is important to work:

    Facebook sees long rackspace cdn links as some sort of spam or similar, so properly sharing web pages doesn’t work unless a shorter CDN uri is used.

    Cheers

    Thread Starter LuxDelux

    (@luxdelux)

    Perhaps this provides some clues

    FastCGI sent in stderr: "PHP message: PHP Warning:  Creating default object from empty value in /htdocs/wp-content/plugins/rackspace-cloud-files-cdn/admin/functions.php on line 39" while reading upstream
    Thread Starter LuxDelux

    (@luxdelux)

    Weird, that seems to be it ?? Ok works now except the CNAME.

    Any idea what might be causing the CNAME issue?

    I tried saving like

    https://images.tapebrain.com

    and without http. Just stays blank.

    Thread Starter LuxDelux

    (@luxdelux)

    Just noticed this in my servers error log

    2014/06/17 15:58:28 [error] 28712#0: *13662 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught exception 'Guzzle\Http\Exception\ClientErrorResponseException' with message 'Client error response
    [status code] 401
    [reason phrase] Unauthorized
    [url] https://identity.api.rackspacecloud.com/v2.0/tokens' in /var/www/example.com/htdocs/wp-content/plugins/rackspace-cloud-files-cdn/lib/php-opencloud-1.9.2/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/BadResponseException.php:43
    Stack trace:
    #0 /var/www/example.com/htdocs/wp-content/plugins/rackspace-cloud-files-cdn/lib/php-opencloud-1.9.2/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Request.php(145): Guzzle\Http\Exception\BadResponseException::factory(Object(Guzzle\Http\Message\EntityEnclosingRequest), Object(Guzzle\Http\Message\Response))
    #1 [internal function]: Guzzle\Http\Message\Request::onRequestError(Object(Guzzle\Common\Event), 'request.error', Object(Symfony\Component\EventDispatcher\EventDispatcher))
    #2 /var/www/example.com/htdocs/wp-content/plugins/rackspace-cloud-files-cdn/lib/php-opencloud-1.9.2/ven", client: 54.81.171.167, server: tapebrain.com, request: "GET /lists/classic-movies-weekly-1/ HTTP/1.1", host: "tapebrain.com"
    2014/06/17 16:01:24 [error] 28712#0: *13676 FastCGI sent in stderr: "PHP message: PHP Warning:  Creating default object from empty value in /var/www/example.com/htdocs/wp-content/plugins/rackspace-cloud-files-cdn/admin/functions.php on line 39" while reading upstream, client: 94.253.180.169, server: tapebrain.com, request: "POST /wp-admin/admin.php?page=rs-cdn-manage HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "tapebrain.com", referrer: "https://tapebrain.com/wp-admin/admin.php?page=rs-cdn-manage"
    Thread Starter LuxDelux

    (@luxdelux)

    Here’s the screenshot
    https://drive.google.com/file/d/0B2EsjStXMIFZdHNwRW1uQU9YN2s/edit?usp=sharing

    Still not working though.

    I uninstalled the old version, installed the new one, then uninstalled again… no luck.

    Just cleared my browser cache… actually I can’t seem to save new settings.. the error is there with a new install when the fields are empty.

    Thread Starter LuxDelux

    (@luxdelux)

    Seems to work, thanks for the update ??

    Thread Starter LuxDelux

    (@luxdelux)

    Doesn’t seem to work, I tried entering with

    http and without, images still point to default url

    How it works for me:

    if (current_filter() == 'wp_get_attachment_url') {
    		if (file_exists(str_replace($upload_data['baseurl'], $upload_data['basedir'], $attachment)) !== false) {
    			return $attachment;
    		} else {
    			return str_replace($upload_data['baseurl'], 'https://images.tapebrain.com', $attachment);
    		}
    	} else {
    		preg_match_all('/\"(http|https).*?\/wp\-content\/.*?\/\d{4}+\/\d{2}+\/.*?\"/i', $attachment, $attachments);
    
    		foreach ($attachments[0] as $cur_attachment) {
    			// If local file does not exist, replace local URL with CDN URL
    			$cur_attachment = trim($cur_attachment, '"');
    			if (file_exists(str_replace($upload_data['baseurl'], $upload_data['basedir'], $cur_attachment)) === false) {
    				$new_attachment = str_replace($upload_data['baseurl'], 'https://images.tapebrain.com', $cur_attachment);
    				$attachment = str_replace($cur_attachment, $new_attachment, $attachment);
    			}
    		}
    
    		return $attachment;
    	}

    not sure if the second one is needed though

    Thread Starter LuxDelux

    (@luxdelux)

    A temporary solution if you’re only uploading images, in

    rackspace-cloud-files-cdn/lib/class.rs_cdn.php

    after line 66, before the return, insert

    $file->content_type = 'image/jpeg';

    A better solution would be to update to latest php-opencloud, as I figured the automatic type detection should work there

    [Moderator Note: No bumping, thank you.]

Viewing 15 replies - 1 through 15 (of 20 total)