I tried my best to get my CakePHP website working on the Godaddy grid hosting account. My pie application is an installation hosted from a subdirectory in my account and accessed through a subdomain. I had to configure my .htaccess files to get this to work, and now I need the CakePHP console to work in this environment.
I have the same setup for cake apps on an Ubuntu server hosted on Amazon EC2. Essentially, this is a simple Ubuntu LAMP installation. The CakePHP console works as expected in this environment.
When I try to start the console on Godaddy, I get the following message:
CakePHP console: this file is loaded incorrectly and cannot continue.Please make sure / cake / console is on your system path and check the manual for the correct use of this ( http://manual.cakephp.org/ )
I started adding debugging code to cake / console / cake.php to find out what was going on. On godaddy, when I echo from print_r($this->args) on line 183, I find that the array is empty. When I do this on my Ubuntu EC2 instance, I get the following:
Array ( [0] => /var/www/www.directory.sdcweb.org/htdocs/cake/console/cake.php )
It seems that the godaddy PHP command line does not go through the bash shell command line arguments. Does anyone have any tips on how I can use the CakePHP console to work with Godaddy?
The bash script that invokes the Cake wrapper contains the following
LIB=${0/%cake/} APP=`pwd` exec php -q ${LIB}cake.php -working "${APP}" "$@" exit;
I think changing this script may solve the problem.
linux bash php cakephp
the0ther
source share