Installing CakePHP on Cloud Sites


NOTE: This article refers to the Cloud Sites Control Panel. You can access this interface from the Cloud Control Panel by clicking your username in the upper-right corner of the control panel and selecting Cloud Sites Control Panel.

This article will show you how to install CakePHP 1.2.x onto your site with Cloud Sites.

Prerequisites

This article assumes you have already done the following:

  • Selected PHP as your default technology
  • Set up a MySQL database in the Classic Control Panel
  • Uploaded the CakePHP application files to your site in the content directory

For information on how to do this, see the following articles:

 

CakePHP installation

    1. Locate the .htaccess file in the content directory. After RewriteEngine on, add a new line with RewriteBase /" to the .htaccess file and save the file back to the site. You will need to repeat this step for the rewrite rules in the .htaccess files in the app and app/webroot directories.

 

    1. Load the site in your browser. You will notice several warnings concerning the installation. The first warning will be the following:

      Notice (1024): Please change the value of Security.salt in app/config/core.php to a salt value specific to your application [CORE/cake/libs/debugger.php, line 556].

 

    1. Open the app/config/core.php file and search for Security.salt. Change its value to the characters or string you prefer, then save and close the file.

 

    1. In the app/config/directory in FTP, rename the database.php.default file to be database.php.

 

    1. Open app/config/database.php and scroll down to the bottom of the page to find the database connection information. Enter your database host name, user name, password and hostname, then save and close the file.

 

  1. Reload your site in your browser. The CakePHP installation is complete

If you have problems getting CakePHP to work in a subdirectory, read the information in the following article: http://cookingwithcakephp.blogspot.com/2008/04/installing-cakephp-into-subdirectory.html

 

How do I change my site's default technology?

You can change the default technology of your site any time after it is added to the Classic Control Panel. You can switch between IIS/.NET and Apache/PHP5, or you can use both.

  1. Log in to your Classic Control Panel at http://manage.rackspacecloud.com.
  2. On the left navigation menu, click Hosting > Cloud Sites.
  3. Click the domain name you would like to change the technology for.
  4. Click the Features tab and then click the Customize button under the Technologies section.
  5. Select the technology you would like to switch to from the drop-down menu and click the Save Settings button.

Note that when you change your site's default technology, this changes the IP address for the site. If we are managing your DNS, the changes will update automatically, but can take up to two hours to take effect. If you are managing your own DNS, please update the IP for your site. You can get the new IP on the Domain tab.

How do I add a MySQL database to my site?

MySQL databases are free of charge and are included with all The Rackspace Cloud accounts. To be able to use them, you must first set up a site to allow databases to be created.

  1. Log in to your Cloud Sites Control Panel at https://manage.rackspacecloud.com.
  2. On the left navigation menu, click Hosting > Cloud Sites.
  3. Click the domain you want to add a MySQL database to.
  4. Next to Current Hosting Plan click the hosting plan.
  5. Skip the Select A Hosting Plan page by scrolling to the bottom and clicking on the Next Step button.
  6. On the Additional Features page in the Additional Databases section, select the number of databases you would like to be available.
  7. Click on the Next Step button.
  8. Review your selections and when ready, click on the Next Step button.

Now that you have added the number of available databases to have for the site, you can now add databases.

  1. Log into your Cloud Sites Control Panel at https://manage.rackspacecloud.com.
  2. On the left navigation menu, click Hosting > Cloud Sites.
  3. Click the domain you want to add a MySQL database to.
  4. Click the Features tab.
  5. Click the Add button in the Databases section.
  6. Enter the name of your database in the text field and select MySQL 5 from the Database Type drop-down menu, then click on the Continue button.
  7. Enter the database user name and password you would like to assign, then click the Finish button.

 

 

How do I add content to my website?

File Transfer Protocol (FTP) is a method for adding content to your website. As its name indicates, FTP is a means for transferring files from one computer to another, or from a local computer to a remote server.

To get started, you will need to use an FTP client. Some HTML editors, such as FrontPage or Dreamweaver, have FTP access built in. You can also download free FTP clients or purchase and download a commercial one. See What FTP software should I use? for more information.

For any website you set up, we will automatically create an FTP address (ftp.yourdomain.com). However, due to the nature of DNS propagation, your custom FTP address may not work during the initial 48 hour period after DNS for the site has been set up. If you experience any issues using your custom FTP address (ftp.yourdomain.com) during this time, you should use the universal FTP address, ftp1.ftptoyoursite.com. This universal FTP address will allow you to add content to your site before DNS has fully propagated to The Rackspace Cloud.

When setting up your FTP client, you will need to know your FTP settings. See Where should I put my web content? for the location you need to FTP your files.

See our NOTE: This article is written for our Cloud Sites Control Panel. You can access this interface from the Cloud Control Panel by clicking your username in the upper-right of the control panel and selecting "Classic Control Panel".

This article will show you how to install CakePHP 1.2.x onto your site with Cloud Sites.

Prerequisites

This article assumes you have already done the following:

  • Selected PHP as your default technology
  • Set up a MySQL database in the Classic Control Panel
  • Uploaded the CakePHP application files to your site in the content directory

For information on how to do this, see the following articles:

Steps

  1. Locate the .htaccess file in the content directory. After "RewriteEngine on", add a new line with "RewriteBase /" to the .htaccess file and save the file back to the site. You will need to repeat this step for the rewrite rules in the .htaccess files in the app and app/webroot directories.
  2. Load the site in your browser. You will notice several warnings concerning the installation. The first warning will be the following: Notice (1024): Please change the value of Security.salt in app/config/core.php to a salt value specific to your application [CORE/cake/libs/debugger.php, line 556].
  3. Open app/config/core.php file and search for Security.salt. Change its value to whatever characters or string you would like, then save and close the file.
  4. In the app/config/directory in FTP, rename the database.php.default file to be database.php.
  5. Open app/config/database.php and scroll down to the bottom of the page to find the database connection information. Enter your database host name, user name, password and hostname, then save and close the file.
  6. Reload your site in your browser.

The installation for CakePHP will now be completed.

If you're having issues getting CakePHP to work in a subdirectory, head on over to this great post: http://cookingwithcakephp.blogspot.com/2008/04/installing-cakephp-into-subdirectory.html

How do I change my site's default technology?

You have the ability to change the default technology a site uses at any time after it has been added to the Classic Control Panel. This allows you to switch between IIS/.NET and Apache/PHP5 or use both.

  1. Log in to your Cloud Sites Control Panel at http://manage.rackspacecloud.com.
  2. On the left navigation menu, click Hosting > Cloud Sites.
  3. Click the domain name you would like to change the technology for.
  4. Click the Features tab and then click the Customize button under the Technologies section.
  5. Select the technology you would like to switch to from the drop-down menu and click the Save Settings button.

Note that when you change your site's default technology, this changes the IP address for the site. If we are managing your DNS, the changes will update automatically, but can take up to two hours to take effect. If you are managing your own DNS, please update the IP for your site. You can get the new IP on the Domain tab.

How do I add a MySQL database to my site?

MySQL databases are free of charge and are included with all The Rackspace Cloud accounts. To be able to use them, you must first set up a site to allow databases to be created.

  1. Log in to your Cloud Sites Control Panel at https://manage.rackspacecloud.com.
  2. On the left navigation menu, click Hosting > Cloud Sites.
  3. Click the domain you want to add a MySQL database to.
  4. Next to Current Hosting Plan click the hosting plan.
  5. Skip the Select A Hosting Plan page by scrolling to the bottom and clicking on the Next Step button.
  6. On the Additional Features page in the Additional Databases section, select the number of databases you would like to be available.
  7. Click on the Next Step button.
  8. Review your selections and when ready, click on the Next Step button.

Now that you have added the number of available databases to have for the site, you can now add databases.

  1. Log into your Classic Control Panel at https://manage.rackspacecloud.com.
  2. On the left navigation menu, click Hosting > Cloud Sites.
  3. Click the domain you want to add a MySQL database to.
  4. Click the Features tab.
  5. Click the Add button in the Databases section.
  6. Enter the name of your database in the text field and select MySQL 5 from the Database Type drop-down menu, then click on the Continue button.
  7. Enter the database user name and password you would like to assign, then click the Finish button.

 

 

How do I add content to my website?

File Transfer Protocol (FTP) is a method for adding content to your website. As its name indicates, FTP is a means for transferring files from one computer to another, or from a local computer to a remote server.

To get started, you will need to use an FTP client. Some HTML editors, such as FrontPage or Dreamweaver, have FTP access built in. You can also download free FTP clients or purchase and download a commercial one. See What FTP software should I use? for more information.

For any website you set up, we will automatically create an FTP address (ftp.yourdomain.com). However, due to the nature of DNS propagation, your custom FTP address may not work during the initial 48 hour period after DNS for the site has been set up. If you experience any issues using your custom FTP address (ftp.yourdomain.com) during this time, you should use the universal FTP address, ftp1.ftptoyoursite.com. This universal FTP address will allow you to add content to your site before DNS has fully propagated to The Rackspace Cloud.

When setting up your FTP client, you will need to know your FTP settings. See Where should I put my web content? for the location you need to FTP your files.

See our Video Tutorial on adding content.<">Video Tutorial on adding content.

 



Was this content helpful?




© 2014 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License


See license specifics and DISCLAIMER