Sunday, July 17, 2011

Transferring cake baked code from windows to centos (linux)

First thing to do is to install cakephp in centos. Please refer to my previous blog on this(http://codebyte.blogspot.com/2011/07/installing-cakephp-in-centos.html) if you have not already installed cakphp.

Now, transfer your code to your document root (For e.g. /var/www/html in my case). Suppose, the name of your application is myapp, then
1. Open var/www/html/myapp/webroot/index.php

  • Search for if (!defined('CAKE_CORE_INCLUDE_PATH')).
  • You may find something like: define('CAKE_CORE_INCLUDE_PATH', 'C:' . DS. 'xampp' .DS. 'cake' if you used xampp in windows.
  • Change this to the location of your installed cakephp folder. For e.g. define('CAKE_CORE_INCLUDE_PATH', .DS . 'var' . DS. 'www' .DS. 'html' .DS. 'cake')

2. Open /var/www/html/myapp/config/database.php and provide appropriate database settings.

Finally, restart your apache server (/etc/init.d/httpd restart).

No comments:

Post a Comment