RSS

LuxCal Forum

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

User:   Password:   Remember Me?   
LuxCal Forum / General / Problems / SQL error. See 'logs/mysql.log'
Posted:  05 Jan 2014 15:20
Hi,

I am new to this forum since I just installed this nice calender.
Everthing is working fine in any browser, but I have a very strange issue.
Every browser has the issue except Firefox.
My calender directory is protected with a pasword and with the correct credentials the calender starts.
But without the protection the issue remains.
This is all correct the first time.
When closing the browser and then reopen an entering the calender I get the following on the screen:
SQL error. See 'logs/mysql.log'
Reloading the page opens the calender. This happens on "Google Chrome", "Safari", "Internet Explorer" but not on "Firefox".
On Firefox the calendar opens immediately.
When I check the mysql.log I see the following:

2014-01-05T13:51:35+01:00
Script name: /index.php
MySQL error: Table 'mywebsitename_LuxCal._settings' doesn't exist
Query string: SELECT name, value FROM [db]settings

But the database excists.

Maybe someone knows what the problem is.
__________________
Grtz,
on6bvk
Posted:  05 Jan 2014 23:50
Update,
Al the browsers on my android tablet have the same error, even firefox.
Very strange.

Grtz,
On6bvk
__________________
Grtz,
on6bvk
Posted:  06 Jan 2014 00:27   Last Edited By: Roel B.
Hi On6bvk,

I tried to reproduce this error, but couldn't.
From the posted MySQL error I can see that the database table prefix from the file lcconfig.php has not been read successfully. This file contains the database credentials and a variable, called $dbPfix, which is the prefix for the database tables and should be set to the text "mycal".

This full line should look like:
$dbPfix="mycal"; //db table name prefix (default calendar)

Please check if this line (number 14) is identical to the line above, and if not, change it accordingly.

Please let us know if this solves your problem.
Roel
Posted:  06 Jan 2014 08:13
Hi Roel,

Thanks for the quick reply.

I checked the file, and the variables are all correct.
I changed the directory (subdomain) after installation, could that be the reason?
Maybe a new installation will solve it?

On6bvk
__________________
Grtz,
on6bvk
Posted:  06 Jan 2014 11:18
Hi On6bvk,

Changing the directory (copying all LuxCal files and folders, including the lcconfig.php file to a an other directory) should normally make no difference. Just the calendar's URL should be updated on the admin's Settings page.
Of course a new install would never hurt.
There are a couple of other things you could do to see if all is correct:
- launch the file install320.php via your browser - all form fields should be filled automatically - and select the "test" button
- upload the file lctools.php (from the luxcal320-toolbox.zip file) - it should list your current calendar as the default - and select Test Configuration.

Hope this helps. Please let us know the outcome.
Roel
Posted:  06 Jan 2014 19:43
Hi Roel,

OK, It seems that I didn't do anything wrong wink
Reinstalling is the last thing for me to do, first try to find the bug (probably mine)

- I launched the file install320.php via my browser, and the fields were indeed filled in automatically.
I pushed the test button and all tests were passed.
BUT I see near Installed Calender(s): => NONE !!

When I open the calendar I get again the error, after a refresh the calendar becomes visible.
When I know run the instal230.php again, then the line with the
Installed Calender(s): shows my calender followed by (default)


- With lctools.php  I can see my current calendar. A push on the test button says:
Writing to the calendar's 'root' folder successful
Writing to the calendar's 'files' folder successful
PHP sessions enabled and working correctly
Browser cookies enabled and working correctly

I hope these tests are helpful for you

grtz
on6bvk
__________________
Grtz,
on6bvk
Posted:  06 Jan 2014 22:18
Update,

I reinstalled the calender from scratch in another directory following 100% the instructions and I have the same error, even after the first start of the calender without any changes in the settings.
My server uses PHP v 5.2.17 and MySQL v5.1.54.
Maybe it is a setting at the server side.

I have also a local server. In the following days I will install it on that one and see if I get the same result.

on6bvk
__________________
Grtz,
on6bvk
Posted:  06 Jan 2014 23:49
Yes, try it on your local server and let us know the result. I agree it could be something server side, since nobody else complained about this problem.
Grtz, Roel
Posted:  07 Jan 2014 21:17
Hi Roel,

I installed the calendar on my local server and guess what, I have the same error.
So this problem has to be related with me sad
And it is, I found the problem.

First I have to buy a set of glasses biggrin

I forgot to enter "/?cal=mycal" to access the calender.

Only the latest version of Firefox had no problem with it.

Maybe it is possible to program a redirect to the default calendar if someone like me forgets to enter "/?cal=mycal".
__________________
Grtz,
on6bvk
Posted:  14 Jan 2014 19:02
I have the exact same problem.  I upgraded from 3.1 to 3.2 and it completed successfully.  However, when I attempt to gain access via the url to my calendar, I get this error SQL error. See 'logs/mysql.log' .  If I hit refresh or reload the page it loads correctly 95% of the time only to replicate the error next time I refresh.  I attempted to restore to 3.1 but my calendar disappears.  I am currently stuck in this version with this error every time I visit.  Any solutions?
Posted:  14 Jan 2014 22:28
Hi there,

Did V3.1 work correctly?
Did you find any error message in the logs/mysql.log file?

I'm just finishing an upgrade on V3.2.0 with an improved log in, SSO, and save/restore user settings mechanism. There is a great chance this solves the MySQL problem.
I will publish this version very shortly (still this week). I suggest to try this out; it may solve your problem.
If you're interested I can send you a pre-copy directly, but then you will have to send me your email address (via the Contact Us page).

Roel
Posted:  14 Jan 2014 22:51
Thank you,

I had no problem with version 3.1.2. Upon upgrading to 3.2.0, I now encountered this problem.  It seems to happen almost every time I go to my site.  I will contact you via the contact page using my email as well as the url.  I would be happy to receive a pre copy and try it for you.  I hope it resolves the issue.  I would attach the mysql.log file, but I cannot find it.
Posted:  16 Jan 2014 04:06
Just upgraded tonight and getting same error.
E-mail Roel with log file.
I am using GoDaddy hosting (Linux)
Maybe it has something to do with the version of PHP or mySQL being used by different hosting companies.

Jim
Posted:  16 Jan 2014 20:13
I agree Jdell that it could be a conflict with the php version or mysql version.  I use Bluehost for my site.
Posted:  17 Jan 2014 04:14
My host is using PHP 5.3.24 according to phpinfo.php.

Jim
Posted:  22 Jan 2014 20:09   Last Edited By: Roel B.
This problem has been fixed.

The problem only occurs for calendars running on a server with a PHP version 5.3 or less.
If you urgently need a fix send me an email, and I will send you a new index.php file.

The problem has been solved in the new LuxCal 3.2.1.
Roel
Posted:  29 Jan 2014 18:16

Quote:


The problem will be solved in LuxCal 3.2.1, which will be released shortly.

I have downloaded the 3.2.1, try to upgrade form 2.7.3. It's still a nightmare.  I have other tables with a '_' in my database, so the line 233 in upgrade321.php (     if (substr($row[0],-9,1) == '_') { //has prefix_ ) gets the wrong tables!
If you change it to f.e.'lc_'not all data tables will be updated. Fields like a_datetime or m_datetime do not exist after the upgrade, so you will get SQL error after the upgrade.
Posted:  12 Feb 2014 23:17   Last Edited By: kdlklm
I'm having the exact same problem I'm using version 3.2.1
PHP: 5.5.6
MySQL:  5.6.14

When I go into phpMyAdmin it doesn't show the tables either, all the rest of my databases are fine. Something happened to them.

Any suggestions would be much appreciated.