rackspace

RackSpace Cloud Strips $_SESSION if URL Has Certain File Extensions

守給你的承諾、 提交于 2020-01-03 15:34:11
问题 The Situation I am creating a video training site for a client on the RackSpace Cloud using the traditional LAMP stack (RackSpace's cloud has both Windows and LAMP stacks). The videos and other media files I'm serving on this site need to be protected as my client charges money for access to them. There is no DRM or funny business like that, essentially we store the files outside of the web root and use PHP to authenticate user's before they are able to access the files by using mod_rewrite

RackSpace Cloud Strips $_SESSION if URL Has Certain File Extensions

风流意气都作罢 提交于 2020-01-03 15:34:08
问题 The Situation I am creating a video training site for a client on the RackSpace Cloud using the traditional LAMP stack (RackSpace's cloud has both Windows and LAMP stacks). The videos and other media files I'm serving on this site need to be protected as my client charges money for access to them. There is no DRM or funny business like that, essentially we store the files outside of the web root and use PHP to authenticate user's before they are able to access the files by using mod_rewrite

Ubuntu 11.04: `apt-get install rake` -> “E: Unable to locate package rake”

时光毁灭记忆、已成空白 提交于 2019-12-24 03:03:48
问题 This is probably a type of "is it plugged in?" question, but after getting a default Rackspace image of Ubuntu 11.04 up. Running command (as root) apt-get install rake Fails with error Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package rake I'm missing something simple I'm sure. 回答1: It appears that rake package is not in the 11.04 sources, but it is in 10.10 sources. To get apt-get install rake to work on 11.04: Add the

Confused by PHP session problem (Rackspace)

本小妞迷上赌 提交于 2019-12-24 02:50:22
问题 My PHP session fluctuates between different values for no apparent reason. here is my test code that proves it: <?php //test.php ini_set('display_errors',1); error_reporting(E_ALL|E_STRICT); session_start(); print_r($_SESSION); ?> When I refresh that test.php, the $_SESSION has different values (about 3 different arrays in total), as if I was browsing the site in between refreshing the page (I'm not). Echo'ing session_id() doesn't output anything. Any ideas? This is completely messing up my

Django upload image - From a form to Rackspace/S3 with no manipulation

瘦欲@ 提交于 2019-12-19 19:45:16
问题 I simply want to upload an image (JPG) using a form, then send that image to Rackspace 'Cloud Files' or Amazon 'S3'. No manipulating the file. No saving to disk, everything to memory (am hosted on a cloud server) Image size won't exceed 75kb Update (Two Caveats): One: It also needs to work when data is posted from a phone app. Two: It needs to be sent to Rackspace Cloud Files as well as S3 (starting with CF). The code below works but it is way WAY too heavy. import cloudfiles as cf def

django image storage cdn

心不动则不痛 提交于 2019-12-11 06:34:45
问题 I have been using rackspace CDN for the last few months with django-imagekit and django-cumulus. And I am not really happy with the results. I seem to get load of errors because of timeouts etc. File "/www/django_test1/omu2/src/python-cloudfiles/cloudfiles/connection.py", line 347, in get_container return Container(self, container_name, count, size) File "/www/django_test1/omu2/src/python-cloudfiles/cloudfiles/container.py", line 83, in __init__ self._fetch_cdn_data() File "/www/django_test1

OpenStack Rackspace Cloud Files .net SDK

被刻印的时光 ゝ 提交于 2019-12-08 02:51:05
问题 I am trying to save an XML file to a non CDN Container from Sydney: public void Save(XDocument document) { using (MemoryStream ms = new MemoryStream()) { document.Save(ms); ms.Position = 0; RackspaceCloudIdentity identity = new RackspaceCloudIdentity { Username = "username", APIKey = "xxxxxxxxxxx", CloudInstance = CloudInstance.Default }; CloudFilesProvider provider = new CloudFilesProvider(identity); provider.CreateObject("XMLFiles", ms, "xmlFile1.xml", region: "syd"); } } For a 1MB file, it

OpenStack Rackspace Cloud Files .net SDK

时光毁灭记忆、已成空白 提交于 2019-12-06 11:56:57
I am trying to save an XML file to a non CDN Container from Sydney: public void Save(XDocument document) { using (MemoryStream ms = new MemoryStream()) { document.Save(ms); ms.Position = 0; RackspaceCloudIdentity identity = new RackspaceCloudIdentity { Username = "username", APIKey = "xxxxxxxxxxx", CloudInstance = CloudInstance.Default }; CloudFilesProvider provider = new CloudFilesProvider(identity); provider.CreateObject("XMLFiles", ms, "xmlFile1.xml", region: "syd"); } } For a 1MB file, it takes about 50 seconds to upload (very long). And, trying to download the file back, returns an empty

Django upload image - From a form to Rackspace/S3 with no manipulation

爱⌒轻易说出口 提交于 2019-12-01 18:02:48
I simply want to upload an image (JPG) using a form, then send that image to Rackspace 'Cloud Files' or Amazon 'S3'. No manipulating the file. No saving to disk, everything to memory (am hosted on a cloud server) Image size won't exceed 75kb Update (Two Caveats): One: It also needs to work when data is posted from a phone app. Two: It needs to be sent to Rackspace Cloud Files as well as S3 (starting with CF). The code below works but it is way WAY too heavy. import cloudfiles as cf def uploadImage(request, id): cf_con = cf.get_connection(username='YYY', api_key='XXX', serviceNet=True)

Change outgoing mail address from root@servername - rackspace sendgrid postfix [closed]

泄露秘密 提交于 2019-11-29 00:05:17
问题 So I recently setup my Rackspace server (Ubuntu LAMP stack) to use Postfix and Sendgrid for outgoing email. It works great in that my test mail from the cmd line gets delivered via sendgrid smtp. However, when I receive the email it says its from root@rackspaceservername and I cannot reply to it. I created an alias as per this topic how to change default email address for postfix? which makes it say webmaster@mydomain.com by the sender name which still appears as root . What do I need to