Installation error

Questions related to installing Zuluru 1: Locked now, all new installations should use Zuluru 3
Locked
enofman
Posts: 5
Joined: Wed Oct 05, 2011 5:29 pm

Installation error

Post by enofman »

I installed CakePhp and then install Zuluru I can make it to the submit form for the database but when it is submitted the following error is logged in Apache

[Wed Oct 05 16:26:55 2011] [error] [client 127.0.0.1] PHP Fatal error: Cannot redeclare class DATABASE_CONFIG in C:\\server\\www\\cake\\zuluru\\config\\database.php on line 74, referer: http://localhost/cake/zuluru/install/install/database. It appears to me to be a path problem, but I have looked at everything I can think of and reinstalled multiple time and continue to get the same error. Since I am green as grass on the whole CakePhp could you please point me in the right direction.
Apache 2.2.21 -- MySql 5.5.16 -- Php 5.3.8 -- Windows 7 32bit
Thanks in advance
Gary
GregS
Site Admin
Posts: 240
Joined: Thu Jan 06, 2011 4:58 pm

Re: Installation error

Post by GregS »

If you already have a config/database.php file, try deleting it (or renaming it, if you don't want to lose it). Make sure that the database.php.default file is still there. If that doesn't work, setting the debug level to 2 in config/core.php, should get you a more comprehensive error message from Cake, including the call stack, and hopefully information about when DATABASE_CONFIG was initially declared, which should help to narrow things down.
enofman
Posts: 5
Joined: Wed Oct 05, 2011 5:29 pm

Re: Installation error

Post by enofman »

Greg,
First thanks for the help, I really want to try this to see if it will work for our Pick (kind of like darts, but smaller board, also called American Darts) League. After I changed the debug value, I found that the port number is not optional, (maybe it is suppose to be, but not on my local machine) I put the port number in and viola it went through with the install, now to test the rest of the system.
Thanks for your efforts much appreciated,
Gary
GregS
Site Admin
Posts: 240
Joined: Thu Jan 06, 2011 4:58 pm

Re: Installation error

Post by GregS »

Can I ask what database you are using, and what is the port number?
vrehorst
Posts: 5
Joined: Fri Jan 31, 2014 11:43 pm
Location: Whitby, Ontario, Canada
Contact:

Re: Installation error

Post by vrehorst »

Sorry to resurrect this thread, but I figured out what was causing this issue last night while I was doing an install myself.

The problem is that the 'port' key in the DATABASE_CONFIG class cannot have an empty value. To use the driver defaults the 'port' key has to be omitted from the class.

This happened to me with both the mysql and mysqli drivers, and with CakePHP 1.3.15.

If I get free time in the near future I'll fork this on github and send a pull request.
GregS
Site Admin
Posts: 240
Joined: Thu Jan 06, 2011 4:58 pm

Re: Installation error

Post by GregS »

That is a later version of CakePHP 1.3 than I'm running Zuluru on, so maybe they've changed something in the interim, but it's working just fine with a blank port for me. A patch would be great!
sinadee
Posts: 2
Joined: Tue Dec 23, 2014 6:03 pm

Re: Installation error

Post by sinadee »

When I was using a blank database, I deleted any config/database.php file. Then I went into the config/database.php.default file and commented out/omitted the port line as enofman said. Reran the installation and it worked.
Locked