Roshan Book

My Tech Notebook

Deploying cakephp on hostgator method 2


Source:http://www.balistupa.com/blog/2010/11/how-to-install-cakephp-on-hostgator-shared-hosting/

Another helpful link :http://bakery.cakephp.org/articles/gedm/2009/08/29/installing-cakephp-on-shared-hosting

I just buy new shared hosting account for my new domain on hostgator. I want to install cakephp web application into this hosting. However the local setting or common setting that i used on other hosting is not work on hostgator. After figure out the problem, i found that the hostgator hosting does not allow for changing DOCUMENT ROOT setting.

So after research on cakephp tutorial, which come to setting cakephp on shared hosting and i think this solution also good for production phase. I will mention how i set my cakephp on hostgator

  1. move app, cake, plugins, vendors folder into your hosting root folder. It is user root folder on your hosting
  2. delete .htaccess and index.php on cakephp root folder
  3. move /app/webroot/*.* to /public_html folder
  4. delete empty /app/webroot folder
  5. edit /public_html/index.php to point to the ‘cake’ and ‘app’ directories. For example my public_html path for my domain is /home/myhost/public_html, so i point
    – ROOT to look at /home/myhost
    – APP_DIR to look at /home/myhost/app
    – CAKE_CORE_INCLUDE_PATH to look at /home/myhost/cake
  6. edit this line on /public_html/index.php with your appropriate path
    if (!defined('ROOT')) {
    define('ROOT', DS.'home'.DS.'myhost');
    }

    if (!defined('APP_DIR')) {
    define('APP_DIR', 'app');
    }

    if (!defined('CAKE_CORE_INCLUDE_PATH')) {
    define('CAKE_CORE_INCLUDE_PATH', DS.'home'.DS.'myhost');
    }

  7. The only .htaccess i have on /home/myhost/public_html, the setting for .htaccess look like this
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
    </IfModule>
Advertisements

5 responses to “Deploying cakephp on hostgator method 2

  1. thspqpvnpt November 26, 2011 at 7:34 am

    jkvfcsptibocppl, ofhwfguraj , [url=http://www.afdyxpaymh.com]tbkbjpiyil[/url], http://www.fmeuggytwt.com ofhwfguraj

  2. Thomasena Virock December 23, 2011 at 11:30 pm

    I’ve been studying PERL very laborious all quarter, and it looks like every part on the Internet is written by individuals who either do not know what they are doing or are too sensible to explain it to somebody who is a beginner. I’m trying to make a database for a fictitious website for a college undertaking, where it keeps observe of customers’ orders. Right now I have it in order that a person can enter their order into the database, however I need to make a GUI where a webmaster could make alterations to the database and print up studies from searchs and invoices. I can be working on it all night tonight and all day tomorrow, but tomorrow evening my faculty project is due. Assist me in the event you can. I actually need to get into CGI, each PERL and PHP. Thank you…I’ve been struggling with it for nearly three months. You’ll be able to even electronic mail me your recommendations in case you are so inclined.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: