Contents |
This tutorial will cover how to install the PHP API on your machine. We assume you have PHP installed on your local machine. Either with Apache or without. For more help installing PHP please take a look at php.net. We will cover both Windows and *nix installs (should be the same for OSX).
Note: The PHP bindings described here are no longer being developed by Rackspace. The newer PHP SDK is described on our API documentation site.
tar zxvf ~/Desktop/rackspace-php-cloudfiles-22fbbe643e20165f6307bf515c32106d74183de8.tar.gz
You may need to change the filename to reflect your copy of the API
cd ~/Desktop/rackspace-php-cloudfiles-22fbbe643e20165f6307bf515c32106d74183de8
Remember you might have to change the folder name to reflect your own copy of the API
For RedHat based distros
su
Enter your root password Then
mv cloudfiles* /usr/share/php/
Now lets make sure we have everything setup ok.
<?php
require('cloudfiles.php');
?>
php cfcheck.php
If you are returned to the prompt with no errors the PHP API is installed
If you get an error like this:
PHP Fatal error: require(): Failed opening required 'cloudfiles.php' (include_path='.;C:\php5\pear') in C:\Documents and Settings\jimbob\Desktop\cfcheck.php on line 1
Then you do not have the files located in the right place. This error should print out the include_path so make sure you have the files located there. Or you can change the include path in the php.ini but that is beyond the scope of this tutorial. If you have anymore questions please shoot an email to cloudfiles@rackspacecloud.com.
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

5 Comments
Help required
re: php not recognized
Composer
thank you!!
Files No Longer Maintained
re: Maintained
http://docs.rackspace.com/sdks/guide/content/php.html
Add new comment