RSS

LuxCal Forum

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

User:   Password:   Remember Me?   
LuxCal Forum / LuxCal / Known Issues and Fixes / Upgrading from 2.7.3 to 4.5.1
Posted:  30 Dec 2016 23:07
Hi Roel,
After too long... I have finally found time to work on upgrading the calendar on my site!
I was surprised to find that the version I had was 2.7.3!

Anyway - Tried to upgrade and followed the comprehensive instructions but I am seeing an error:-

Fatal error: Uncaught Error: Call to undefined function validPar() in /home/vol4_5/byethost9.com/b9_2951756/htdocs/calendar/index.php:26 Stack trace: #0 {main} thrown in /home/vol4_5/byethost9.com/b9_2951756/htdocs/calendar/index.php on line 26

I mistakenly selected SQLite rather than the MySQL on my host... btu chaned the lconfig file to :-
$dbType="MySQL"; //db type (MySQL or SQLite)

That probably wasn't enough as running install451.php and the 'test' shows:-

Tests passed:
PHP version 7.0.8 Ok
PHP PDO-SQLite extension Ok
PHP sessions Ok
Form fields OK
Writing to the database folder 'db/'
Writing to the calendar's root folder
Writing to the 'files' folder
Writing an empty sql.log file to the 'logs' folder
Writing an empty luxcal.log file to the 'logs' folder

Can you give me some pointers - or is it best to start again?

Thanks in anticipation,
Allan Thompson
Posted:  31 Dec 2016 18:52   Last Edited By: Roel B.
Hi Allen,

Good to see you back!

The error message (error on line 26 of the file index.php) is coming from the v2.7.3 index.php file !? So I don't know what you've exactly done, but apparently your v2.7.3 index.php file has not been replaced by the v4.5.1 index.php file.
What you should do is . . .
- backup your v2.7.3 MySQL calendar database (just in case)
- delete all calendar tables from the calendar database
- delete all files, EXCEPT THE FILE "lcconfig.php" IN THE CALENDAR ROOT FOLDER
- download from the LuxSoft site the LuxCal 4.5.1M zip-file (so the MySQL version)
- upload all LuxCal 4.5.1M files and folders
- start the calendar with your browsers, which will automatically start the upgrade process

Regards,
Roel
Posted:  01 Jan 2017 06:10
Hi Roel,
Good to be back and thank you for maintaining this wonderful Calendar system!
Happy New Year!

Did as you said and everything went quite well.... I ran install451.php and saw the fields populated with the database entries etc.
Ran a test and everything was green. as below:

https://www.dropbox.com/s/1z959n5vuh61c4b/calendar20161231.jpg

Clicked the save/Install' button and then the heading on the page stayed the same and it showed (without the formatting:-

LuxCal Event Calendar
LuxCal version: 4.5.1MYour PHP version: 7.0.8Calendar Installation and Configuration
SQL error. See 'logs/sql.log'

I checked the sql.log file and saw:-

2017.01.01 03:57:57 Script: /calendar/install451.php - SQL execute error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ID' in 'field list'
Values string: 1,Public Access,,,3

Can you advise how I overcome this error?

Interestingly, when I enter:
.../calendar/index.php in the address window of my Chrome browser, it changes to :
/calendar/upgrade451.php
but the page stays the same ...

Thanks in anticipation,
Allan
Posted:  02 Jan 2017 00:53
Hi Allen,

I'm not sure, but it looks like your database tables have not been properly created.
Are you sure that in the installation form you've entered the correct database Server name? "sql106.byethost9.com" seems a bit strange to me for two reasons: 1) Most of the time the name should be "localhost" and 2) it contains the word byte, but wrongly spelled (I think). What was the Server name in the original V7.3.2 lcconfig.php file?

Another thing: You said you were running LuxCal 2.7.3, so I assumed you would like to upgrade and not install the new LuxCal 4.5.1 from scratch. But you said "I ran install451.php"; so why did you ran install? Why didn't you just start the calendar and let the calendar decide to start the update script?

Could you try to install the original V7.3.2 lcconfig.php file in the calendar root and restore the original V7.3.2 database content and then just start the V4.5.1 calendar.
Roel
Posted:  04 Jan 2017 01:17
Hi Roel,
Erased everything except 'lcconfig.php' and reinstalled and uploaded to the server and called the calendar with '.../calendar/index.php'.
The URL changed to '...calendar/upgrade451.php' and then a page showing 'Calendar Upgrade to Version 4.5.1M', the PHP version which is 7.0.8 with the Luxcal version 4.5.1 on the left side is displayed. Below the banner is advice to go to 'logs/sql.php' and that shows:-
2017.01.03 22:45:40 Script: /calendar/upgrade451.php - SQL query error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'b9_2951756_GTC._settings' doesn't exist
Query string: SELECT `name`,`value` FROM `_settings

I checked the host MySQL information which is:-
https://www.dropbox.com/s/49pqxcqhywpctll/Calendar2.jpg?dl=0
and
https://www.dropbox.com/s/3j783crbes75npi/CalendarHostSQL.jpg?dl=0
I did run some of the inbuilt checks on the database and all seems well...
I notice that general 'collation' settings are 'UTF-8' but for some reason the table has 'collation' as 'latin1_Swedish_ci'! - don't know if this is a problem....

Still trying a few things- fishing in the dark ... and tried temporarily replacing, in 'icconfig.php':
$dbHost="sql106.byethost9.com" with
$dbHost="localhost"
and this produced the error:

Parse error: syntax error, unexpected '$dbUnam' (T_VARIABLE) in /home/vol4_5/byethost9.com/b9_2951756/htdocs/calendar/lcconfig.php on line 12

So I think the Host name is correct.

I did contact the host helpline and they replied saying:-

REF: Base table or view not found
This means that your database does not contain the structure that your script expects! You should install/reinstall your script to get this fixed.

So I tried renaming Icconfig.php to lcconfig.old and ran install.php
Now I see the error in the log:
2017.01.03 22:52:14 Script: /calendar/install451.php - SQL execute error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ID' in 'field list'
Values string: 1,Public Access,,,3

Reset lcconfig and ran index.php again and saw:-
2017.01.03 23:06:46 Script: /calendar/upgrade451.php - SQL query error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'b9_2951756_GTC._settings' doesn't exist
Query string: SELECT `name`,`value` FROM `_settings`

Hope all of that helps... Looks like the database is now connected.... but can you advise on how to overcome this error?
The Database Structurre is shown at:-
http://185.27.134.10/db_structure.php?db=b9_2951756_GTC

thanks
Allan
Posted:  04 Jan 2017 12:09   Last Edited By: Roel B.
Hi Allen,

Like I said in my previous post and like the host helpline said, it looks like the database tables have not been properly created.
I tried to look at your database structure via the link you posted, but the link doesn't work.

The parse error after you edited the lcconfig.php file doesn't mean the host name is correct, it means that there is a syntax error in the edited lcconfig.php file.

What makes you think that the database is now connected? It's still hard to believe that the database server name is "sql106.byethost9.com" (with byte spelled wrongly). I would try "localhost".

I'm pretty sure you are stuck with an incorrect database structure and I'm not convinced the database connection works.
You should delete all calendar tables from the database, if present. This is very important! and then rename the lcconfig.php file to lcconfig.bak and start the calendar with your browser. This will start the installation script. Now  fill in an exact copy of the database credentials you used for LuxCal version 2.7.3 and when in doubt use "localhost" for the server name.

If this doesn't work, send me the database structure (after the installation attempt) by email. I will then also send you a small utility to test the database connection.
Roel
Posted:  18 Apr 2017 05:43
Hi Roel,
Getting back to working on the Calendar addition to a website...

Upgrading and arrived at the point where I accessed the Calendar and saw an SQL error. Checking the SQL Log I see:
2017.04.18 04:24:08 Script: /calendar/upgrade452.php - SQL query error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'b9_2951756_GTC._settings' doesn't exist
Query string: SELECT `name`,`value` FROM `_settings

Hopefully I have attached an image which shows the database server name....
https://www.dropbox.com/s/6krruf4g75652yy/MySQLdatabase.jpg?dl=0
Is the problem caused by the prefix 'mycal'? How do I cope with or alter that?
Can you advise?

thanks
Allan
Posted:  18 Apr 2017 22:33
Hi Allen,
With the drop box link in your post above I can see the database table names.
But please give me more details . . .
What is your current calendar version?
Is this current version working correctly?
Did you make a back up of the calendar database of the current calendar version?
What is the new calendar version to which you tried to upgrade when the SQL error occurred?
When exactly does the SQL error occur?
Roel
Posted:  19 Apr 2017 18:57
Hi Roel,
Sorry to be short on the details!

I think the current calendar version is 2.7.3 or 3.2.3 and I am upgrading to 4.5.2

The version was working correctly until I started to upgrade.

I did make a backup of the calendar database.
The new calendar database is : b9_2951756_GTC

The SQL version appears when I try access in the calendar built into the webpage at:
http://thompa.byethost9.com/Members_Area/Calendar.htm

I can give you access to the account on the host if you would like to access the site ...

regards,
Allan
Posted:  26 Apr 2017 11:21
Hi Allen,

I'm afraid just access to your account will not be enough; I will probably need to be able to use phpMyAdmin to have direct access to your MySQL calendar database. What you could do, is make a database backup with for instance phpMyAdmin and send it to me. Thereafter i will repair/upgrade the database backup to LuxCal V4.5.2 and return it to you.
Roel
Posted:  28 Apr 2017 20:39
Hi Roel,
There appears to be 'Backup' available to me in phpAdmin... so I exported the file...
Hop this works!

Here is the link:
https://www.dropbox.com/s/wyrprkgtk4srziz/b9_2951756_GTC.php?dl=0

Allan
Posted:  03 May 2017 21:45   Last Edited By: Roel B.
Hi Allen,

I've got your file from dropbox. It is however a PHP file and I don't know what to do with this file, because in phpMyAdmin I can't import PHP files. Would it be possible to export an SQL file (extension .sql)?
Roel
Posted:  07 May 2017 19:17
Sorry Roel,

Here is the .sql file link....

https://www.dropbox.com/s/ip4ejod9zqcg2x6/b9_2951756_GTC.sql?dl=0

Allan
Posted:  08 May 2017 23:24
Okay Allen,

This time it worked fine.
I've successfully upgraded the database backup file to LuxCal version 4.5.2M.
Send me your email address (via the Contact Us page) so that I can send you the upgraded file with some further instructions.

Roel