This is my extensions for the CDN to ignore (I only want video files being uploaded to the CDN): jpg,png,bmp,gif,doc,pdf,ico,txt,docx,jpeg
The image ones seem to work, but the .ico files are still getting passed through to the CDN.
My second question is how to setup the CNAME. The files are showing the CNAME correctly, but what do I need to point at DNS wise for it to work? The IP address where the site is hosted or to some RackSpace CDN specific thing?
]]>We have a server that is using the RackspaceCDN plugin without issue. When we migrate the site to another server, we see the errors:
Ruh-Roh!
Could not create instance of class RS_CDN.Ruh-Roh!
Container does not exist.
We have the same username, API Key, Container, file path and Region settings on both machines. The credentials are identical but the error shows up on the site in the new environment. I’ve also deactivated and reactivated the plugin, but to no avail.
Might anyone know how to resolve this issue if you sure you have the right credentials? I have deleted the session data file a few times, but it has not helped.
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>Does the plugin set the content-type header when uploading to Rackspace Cloud? I noticed svg files were not loading properly because they were type “application/x-www-form-urlencoded” instead of “image/svg+xml”. I can manually change a few, but clearly would be better if it was set when the files were processed. Is this something that can be added or is it a defect at Rackspace (I’m guessing both).
Thanks much.
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>I am following the this workflow:
1. Sync all files to CDN. (This works great.)
2. After syncing, removing all local files. (This runs and it definitely removes local files!)
I am getting a lot of broken images.
Is there some set of rules that this follows? Does this replace the links in the Media library only or does it go through and fix the links in pages and posts as well?
If a link is absolute path, will it still get replaced?
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>Hello –
Getting a message that everything has been sync’d however if I check the container on the actual CDN itself, there is nothing there. Am I missing something?
Thanks.
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>Hello –
Just installed this plugin and was successful at linking up to the CDN, however I am still seeing this message “Looks like the “object_cache” file is not writable” even though I have chmod the object_cache file in the plugin directory to 777. Not sure why I am still seeing this message?
Thanks.
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>Hi.
I read the instructions. All clear:
1. Install from WP plugin directory
2. Activate.
3. Use it.
I did as instructed. But my site was still slow. How to verify that the service is running?
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>I’ve synced a large portion of the site but the files are starting to fail. Any advice?
Screenshot: https://grab.by/J5eS
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>I uploaded all of my files, but regardless of whether I give the plugin my http or https URL from Rackspace, the plugin won’t let me use SSL (https) for links. The option cannot be checkmarked.
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>I have used this plugin for months. Occasionally when I upload a image, I got thumbnails(125×125, 150×150 etc.) uploaded successfully, but failed to upload the original file. It does create a file in my CDN with the same name but the size is 0B.
Now I am having this error almost every time I upload an image.
What might be causing this problem? Thank you in advance for your help!
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>I am able to sync all files however video files will not sync/upload to the CDN. Any ideas why?
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>After my first attempt to synchronize all files, it still shows that there are 37 files to sync. When I try to sync them I get the following error:
There was an error processing your request:
{“readyState”:4,”responseText”:””,”status”:500,”statusText”:”Internal Server Error”}
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>i have a site where user upload images from front end forms, will these images go to CDN, also what about the theme files do they also synchronise automatically of I need to change the URLs on the theme myself?
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>Hi,
In the past few days, our website crashes periodically because /tmp folder is 100% full. After troubleshooting, we found that this plugin creates 3-5 session files every second and these files are never deleted. The /tmp folder becomes full after less than 24 hours.
As a temporary solution, we changed our server gc_maxlifetime to 1 hour, so that server deletes all garbage files, but we would also like to fix the problem in the plugin as a longterm solution. Please look into the issue or provide some instructions how we can delete the session files.
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>Hi there,
I believe I’ve found and fixed a bug that is affecting this plugin.
‘lib/functions.php/’ line 538 and 543
The $upload_dir['basedir']
is not being expanded with realpath()
whilst the $cur_local_file
is. This makes the str_replace
call fail when the upload folder is symlinked.
Old code:
foreach ($files as $fileinfo) {
$the_file = $fileinfo->getRealPath();
$file_path = pathinfo($the_file);
if (!is_dir($the_file)) {
if (isset($_SESSION['cdn']->api_settings->files_to_ignore)) {
// File extensions ignored
$ignore_files = explode(",", $_SESSION['cdn']->api_settings->files_to_ignore);
if (!in_array($file_path['extension'], $ignore_files)) {
$cur_local_file = $fileinfo->getRealPath();
$local_files[$i++] = array('fn' => trim(str_replace($upload_dir['basedir'], '', $cur_local_file), '/'), 'fs' => filesize($cur_local_file));
}
} else {
// No file extensions ignored
$cur_local_file = $fileinfo->getRealPath();
$local_files[$i++] = array('fn' => trim(str_replace($upload_dir['basedir'], '', $cur_local_file), '/'), 'fs' => filesize($cur_local_file));
}
}
}
New code:
foreach ($files as $fileinfo) {
$the_file = $fileinfo->getRealPath();
$file_path = pathinfo($the_file);
if (!is_dir($the_file)) {
$upload_base_dir = realpath($upload_dir['basedir']);
if (isset($_SESSION['cdn']->api_settings->files_to_ignore)) {
// File extensions ignored
$ignore_files = explode(",", $_SESSION['cdn']->api_settings->files_to_ignore);
if (!in_array($file_path['extension'], $ignore_files)) {
$cur_local_file = $fileinfo->getRealPath();
$local_files[$i++] = array('fn' => trim(str_replace($upload_base_dir, '', $cur_local_file), '/'), 'fs' => filesize($cur_local_file));
}
} else {
// No file extensions ignored
$cur_local_file = $fileinfo->getRealPath();
$local_files[$i++] = array('fn' => trim(str_replace($upload_base_dir, '', $cur_local_file), '/'), 'fs' => filesize($cur_local_file));
}
}
}
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>Roots Bedrock uses a non-standard folder layout/config for WordPress. To get your plugin running, I needed to make a slight change, which should enable the plugin to run in both standard and non-standard setups:
On line 29 of rackspace-cdn.php, I replaced this:
define('RS_CDN_PATH', ABSPATH.PLUGINDIR.'/rackspace-cloud-files-cdn/');
with this:
define('RS_CDN_PATH', plugin_dir_path( __FILE__ ));
It would be great if you could roll this in to an upcoming version and, in the meantime, this might be helpful to other users.
Thanks for a great plugin.
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>I have uninsatall the plugins just for testing other things. And the links are not changed. it is still pointing to the CDN link. What should i do to make it orignal link. Do i have to change it manually? I want the links to be as it was before. please help…
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>I tried to install and activate this plugin, and when I click on the Rackspace CDN tab in the back end, nothing…. the screen is empty. And if I try to view the media library I cannot see my media.
After deactivating the plugin, all works again.
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>Thanks for this pretty nice plugin, I have a few suggestions for you based on some usage.
file_get_contents
with wp_remote_fopen
this will help w/ servers that don’t allow for allow_url_fopen
open to be set.preg_match_all('/'.$base_uploads_url.'\/.*?\.[a-z]{3}+/i', $attachment, $attachments);
the problem with this is that it excludes document types like docx, pptx, xlsx and jpeg which will invalidate the verify_exists()
check you have running on line 492 because pptx will then become ppt. So if just replace at a minimum the {3}
with a {3,4}
things should be golden again.get_available_content_types()
by applying it to a filter/hook. That way we can add other MIME types that you don’t currently have in the list.https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>Warning: require_once([…]/public/wp/wp-content/plugins/rackspace-cloud-files-cdn/admin/manage.php): failed to open stream: No such file or directory in […]/public/content/plugins/rackspace-cloud-files-cdn/admin/functions.php on line 6
I added a separate content directory outside of WP and put WP in its own subdirectory to keep things clean. The plugin looks for a hard-coded path of /wp-content instead of using content_url() if I’m not mistaken.
Is it possible to have this fixed?
My current folder structure inspired by Mark Jaquith’s Skeleton
public
- content
-- plugins
-- themes
- wp
-- wp-content
--- plugins
--- themes
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>After installing this plugin (which is great by the way!), the links in the media library have all broken. Everything works fine otherwise. What is happening is the plugin is adding the custom CNAME subdomain I have set in the program’s settings in addition to the old full URL to the images to make a non-existent full URL for each item in the library, i.e. https://img.example.com/https://www.example.com/wp-content/uploads/2015/01/file.jpg
The link should be https://img.example.com/2015/01/file.jpg to display the images properly in the library as per the new configuration under the plugin. As best I can tell, it appears that the function set_cdn_path inside of lib/functions.php is where the problem is coming from.
Any suggestions on how to fix this? If more information is needed please let me know.
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>I was having issues with the Synchronize always complaining about files needed to be sync’d up or down even though I forcefully (via turbolift script) pushed files up and then downloaded them back down so they should have been 100% sync’d.
After some investigation, it looks like the Rackspace Cloud Files API has a 10k object limit per request. If you are past that limit, this plugin will ignore everything after the first 10k and say you need to be sync’d. Even when you sync, it will tell you you need to resync them because again the 10k object limit.
Code I used to fix:
In lib/class.rs_cdn.php on line 199:
$cdn_objects = array();
Add:
$marker = '';
Replace line 205:
$objects = $this->container_object()->objectList();
With
//Counter for checking max
$count = 0;
//Looping through multiple requests. 50k hard stop incase something goes wrong.
while ($marker !== null && $count < 50000) {
$objects = $this->container_object()->objectList(array('marker' => $marker));
$total = count($objects);
foreach ($objects as $object) {
// Stock the array
$cdn_objects[] = array('fn' => $object['name'], 'fs' => $object['bytes']);
$count++;
$marker = ($count == $total) ? $object['name'] : null;
}
}
Comment out lines 211 – 213. They were moved in the above code.
$cdn_objects = array();
foreach ($objects as $object) {
$cdn_objects[] = array('fn' => $object['name'], 'fs' => $object['bytes']);
}
On a side note, the plug-in works now but causes huge lag issues when loading the admin page. Anyone know anyway around this? I’m not sure what exactly is causing this.
As an aside, I modified admin/manage.php to specifically show what needs to be uploaded and downloaded (it helped me debug the issue) rather than total number.
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>After successfully syncing my files, having in mind that I had not chosen the option of removing local files. So, I decided to manually remove the files from my server and update the folders with more images. However, the Synchronize button does nothing but the plugin still displays that there are files that still need to be synced.
Why does the synchronize button not respond? How can it be fixed?
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>Hi,
I found a small problem. When I upload the image, it works fine uploading to CDN, but when it is automatically saved as an attachment of the post, the guid of that attachment is still local path not CDN path.
Here is an example entry in my wp_post table:
ID: 84849
post_author: 1
post_date: 2015-01-08 15:55:21
post_date_gmt: 2015-01-08 23:55:21
post_content
post_title: OctoberfestGirls
post_excerpt
post_status: inherit
comment_status: open
ping_status: open
post_password
post_name: octoberfestgirls
to_ping
pinged
post_modified: 2015-01-08 15:55:21
post_modified_gmt: 2015-01-08 23:55:21
post_content_filtered
post_parent: 84848
guid: https://example.com/wp-content/uploads/2015/01/OctoberfestGirls.jpg
menu_order: 0
post_type: attachment
post_mime_type: image/jpeg
comment_count: 0
I prefer to have local files deleted when uploaded to CDN, so when I refer to the path of this attachment, I got a broken image.
Can you please let me know how I can change it to CDN whenever a new attachment is created?
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>Hi,
When I’m trying to visit plugin’s setting pege I get an error message:
Fatal error: Maximum execution time of 30 seconds exceeded in /blogfolder/wp-content/plugins/rackspace-cloud-files-cdn/lib/functions.php on line 284
WordPress database error: [Table ‘dbname.wp__wsd_plugin_scans' doesn't exist]
SELECT scanId FROM wa__wsd_plugin_scans ORDER BY scanId DESC;
How I can fix this?
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>Have installed this plugin and all my upload files are in my Rackspace files container. The plugin is configured correctly as far as I can tell and the sync is complete according to the plugin. However none of my images are appearing in the site although new media does appear to be uploading to my files container. Even on the admin side of my site uploaded file thumbs are not appearing and everything still seems to be referring to /wp-content/uploads/. What am I doing wrong?
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>Will there be an update to work with WP 4.1? would love to use this with my RS CDN. I’ve tripled checked the user/api key etc. but getting an error:
Ruh-Roh!
Could not create instance of class RS_CDN.
Ruh-Roh!
Container does not exist.
using version 1.3.1 with WP 4.1 on IIS 7.5 w/php 5.4
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>I have installed the plugin, and it has uploaded a few things to the cdn, but appears to be timing out.
I have increased php timeout to 5 min, until I can get it to sync everything one time.. Then in future it should be less work and make it.
It has 43,000ish files to sync.
Is there a way I can run this from ssh console?
Or any other method/suggestions.
Thanks
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>I keep getting the error below. I upped the memory to 256M and it worked great. Than I closed the page and came back later to finish, now I can’t get past this error – over and over. I have the latest and greatest version
There was an error processing your request:
{“readyState”:4,”responseText”:”\r\n\r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \”Unavailable\”\r\n
\r\n
\r\n
Site temporarily unavailable.
\r\n Connection timed out – please try again.
\r\n
\r\n \r\n\r\n”,”status”:500,”statusText”:”Internal Server Error”}
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>[I installed the plugin and the first sync went very well. I was at first confused why some of the images did not transfer and discovered it was the images with .jpeg extensions, so if I updated the URL’s to jpg I’m sure they would work.]
But on to my question: I was hoping this would sync audio files uploaded to the Media Library (wp-content/uploads) as well.
My goal was to set up a podcast and have the MP3 episodes stored on the CDN for publication. But in my initial testing, it appears that it actually uploaded the file to the CDN, but didn’t update the URL reference to it on the site (not in the Media Library or in the post)
Side Note:
My initial goal was simply a plugin to allow direct uploading to the CDN of those audio files from within WordPress, but syncing all of the images and audio would be fine in this case as well.
You might consider building a second plugin based off of what you currently have. Your same basic settings page, but then just have a media selector where the user would select the file to upload, and when it was successful it would show the new media URL on the CDN. I have a few podcast sites where I would love to use something like that (or this plugin if it will handle the audio files).
As it is now, I would need to use Cyberduck (or similar) to upload to the CDN, then copy the CDN URL from it, or use the Rackspace Cloud Files page itself to upload and copy the URL.
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
]]>