Roshan Book

My Tech Notebook

Deploying cakephp on hostgator


I’m having trouble with uploading my cakePHP project on a shared hosting ( from hostgator ). Here is what I have done: I’ve organized my cake distribution like this:

  • home/user/app
  • home/user/cake/cake
  • home/user/cake/vendors
  • home/user/cake/.htaccess
  • home/user/cake/index.php

    I have taken the content of webroot directory from app and put it in

    • home/user/public_html

    I’ve modified this file home/user/public_html/index.php ( the one that was in app/webroot ) changing these lines like this:

    • define(‘ROOT’, DS.’home’.DS.’user’);
    • define(‘APP_DIR’, ‘app’);
    • define(‘CAKE_CORE_INCLUDE_PATH’, DS.’home’.DS.’user’.DS.’cake’);

    And that’s about it.

    MY PROBLEM IS THE FOLLOWING:

    I have managed to deal with all the problems involved in the default index.php cakePHP page and I have a green and fully functional so to say, project. So when I access my “/”, I get:

    “Your tmp directory is writable.

    The FileEngine is being used for caching. To change the config edit APP/config/core.php

    Your database configuration file is present.

    Cake is able to connect to the database.”

    Now, I’ve created a model-view-controller with a mysql database background (like in the 15 min Blog Tutorial ), but when I’m trying to access some views ( e.g. /posts )…it gives me a blank page ( this worked perfect on my local machine virtual server apache ).

    What configuration am I missing ?

    Thank you.

EDIT: Apparently I had problems with the hosting. My URL was something like:

http://gator111.hostgator.com/~username/

and all I had to do was add an extra line in the webroot .htaccess:

RewriteBase /~username/

Thanks for the support.

14 responses to “Deploying cakephp on hostgator

  1. SPHR November 22, 2011 at 12:49 am

    Great site and very useful information…. Thanks.

  2. Karl Elfenbein November 25, 2011 at 1:07 pm

    Oh my goodness! an incredible article dude. Thank you Nevertheless I am experiencing issue with ur rss . Don?t know why Unable to subscribe to it. Is there anybody getting similar rss drawback? Anybody who knows kindly respond. Thnkx

  3. wandtatto December 12, 2011 at 5:03 pm

    I haven’t checked in here for some time since I thought it was getting boring, but the last several posts are good quality so I guess I’ll add you back to my daily bloglist. You deserve it my friend🙂

  4. LA Weight Loss December 15, 2011 at 11:39 am

    An riveting communication is worth annotate. I imagine that you should create solon on this subject, it power not be a sacred topic but generally group are not enough to mouth on much topics. To the succeeding. Cheers like your Deploying cakephp on hostgator Roshan Book.

  5. Reseller Hosting December 15, 2011 at 10:14 pm

    I would like to see you write about web hosting and social network as they are very interesting topics as well.
    Continue!!!

  6. invest liberty reserve December 16, 2011 at 2:48 pm

    An intriguing treatment is designer report. I cogitate that you should write statesman on this substance, it strength not be a inhibition person but generally people are not sufficiency to speak on such topics. To the succeeding. Cheers like your Deploying cakephp on hostgator Roshan Book.

  7. invest liberty reserve December 17, 2011 at 9:25 am

    An interesting discussion is couturier notice. I expect that you should correspond many on this topic, it might not be a prejudice refer but generally people are not sufficiency to utter on specified topics. To the succeeding. Cheers like your Deploying cakephp on hostgator Roshan Book.

  8. Johnie Kimbell December 17, 2011 at 4:42 pm

    That will come soon enough. And it is soooo fun.

  9. LA Weight Loss December 18, 2011 at 5:29 am

    I got what you convey, thanks for putting up. Woh I am willing to grow this website through google. Thanks For Share Deploying cakephp on hostgator Roshan Book.

  10. invest liberty reserve December 23, 2011 at 5:09 pm

    Excellent goods from you, man. Deploying cakephp on hostgator Roshan Book I have understand your stuff previous to and you are just extremely wonderful. I actually like what you’ve acquired here, certainly like what you are stating and the way in which you say it. You make it enjoyable and you still care for to keep it smart. I cant wait to read far more from you. This is actually a terrific Deploying cakephp on hostgator Roshan Book informations.

  11. liberty reserve December 23, 2011 at 7:35 pm

    An stimulating language is worth comment. I consider that you should compose many on this theme, it strength not be a taboo message but mostly group are not enough to speak on such topics. To the succeeding. Cheers like your Deploying cakephp on hostgator Roshan Book.

  12. invest liberty reserve December 24, 2011 at 6:06 am

    I got what you destine, thanks for swing up. Woh I am cheerful to maturate this website through google. Thanks For Share Deploying cakephp on hostgator Roshan Book.

  13. invest liberty reserve January 2, 2012 at 4:46 pm

    Excellent goods from you, man. Deploying cakephp on hostgator Roshan Book I have understand your stuff previous to and you’re just too great. I really like what you have acquired here, really like what you are saying and the way in which you say it. You make it entertaining and you still care for to keep it sensible. I can not wait to read much more from you. This is actually a great Deploying cakephp on hostgator Roshan Book informations.

  14. invest liberty reserve February 12, 2012 at 5:50 am

    Wonderful goods from you, man. Deploying cakephp on hostgator Roshan Book I have understand your stuff previous to and you’re just extremely fantastic. I really like what you have acquired here, really like what you’re saying and the way in which you say it. You make it entertaining and you still care for to keep it smart. I cant wait to read far more from you. This is actually a wonderful Deploying cakephp on hostgator Roshan Book informations.

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: