RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Support / Error: Unable to save settings in database. Check database credentials
Posted:  12 Jan 2012 01:52   Last Edited By: Gork
I just tried twice to upgrade my v253 calendar to v260 and have been unable to do so.  I first received an error that the program couldn't write the lcaldbc.dat file to the root, so I chmod root to 777 and started over.  Now lcaldbc.dat is created correctly, but I receive the the following -- Error: Unable to save settings in database. Check database credentials.

v253 was working fine, and had the needed access to both the MySQL database and the config.php file.  For installation I chmod 777 config.php just to make sure that wouldn't be an issue.  I also visually verified the correct un/pw is in the config.php file.

If I refresh the page after receiving the above error the calendar opens up, but it doesn't look right.  For instance, the colors for the categories aren't there; the window to add an event is too small so all options, to include the button to add the event, aren't available.  I tried changing lcaldbc.dat to chmod 777 after receiving the above error and refreshed but there was no change.

EDIT
Same results if I chmod -R 777 the luxcal root directory after uploading v260...  And yes, I have made sure to leave the config.php in the directory from the v253 install while deleting all other files before uploading the v260 files.
Posted:  12 Jan 2012 05:22
I tried one other thing that didn't work.  I put the MySQL root un/pw in config.php to give LuxCal full access to all commands in all databases and tried the install "routine."  This didn't change anything.
Posted:  12 Jan 2012 08:44   Last Edited By: Gork
I can confirm the "settings" table in the database is created, but is not populated with data.  The script ends after the check subsequent to the "//Save calendar settings in databse" section.  I end up with the name, value and description columns in the settings table, but no data.

I guess this confirms upgrade script IS actually able to connect to the database, but after several hours of tinkering I can't figure out why the data isn't populated.  Not that it taking ME a long time means anything, mind you.  I just know enough to break things.  ;)
Posted:  12 Jan 2012 10:29
Hi Gork,
So you were close! The "//Save calendar settings in database" section is almost at the end of the script ;-)

I don't understand why it fails at that point. If the upgrade script comes that far it means that it has already accessed the new settings table in the database (e.g. on line 218) and then it fails to empty the table on line 275 with a simple SQL statement "DELETE FROM settings".

If you send me your email address (via the Contact Us page) I will send you a tool to analyse your database and server settings.
Roel
Posted:  12 Jan 2012 11:07
I should clarify that the script passes the check on line 276 and stops at the check on line 317.

I sent you an email...
Posted:  13 Jan 2012 04:43
@Roel
As per your guess in your reply email to me, this was caused by "an apostrophe or quotes" in a calendar setting in the config.php file.  The name of my calendar is "Gork's Calendar".  When I renamed it to "Gorks Calendar" the upgrade from v253 to v260 went off without a hitch.