Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem upgrading #414

Closed
mpedant opened this issue Oct 5, 2017 · 6 comments
Closed

Problem upgrading #414

mpedant opened this issue Oct 5, 2017 · 6 comments

Comments

@mpedant
Copy link

mpedant commented Oct 5, 2017

Hi

I'm trying to upgrade from 2.14 (sorry!) to the latest version. I've followed the instructions, including running all of the SQL updates, but on trying to log-in to my new install I get the following:

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE symbol = 'NOTES,PHOTOS,DATES,ATTENDANCE,ROSTERS&SERVICES,SERVICEDETAILS,DO' at line 3' in /path/to/install/include/config_manager.class.php:139 Stack trace: #0 /path/to/install/include/config_manager.class.php(139): PDO->exec('UPDATE setting\r...') #1 /path/to/install/include/config_manager.class.php(54): Config_Manager::saveSetting('NOTES,PHOTOS,DA...', Array) #2 [internal function]: Config_Manager::migrateEnabledFeatures() #3 /path/to/install/include/config_manager.class.php(14): call_user_func(Array) #4 /path/to/install/include/init.php(57): Config_Manager::init() #5 /path/to/install/index.php(38): require_once(' in /path/to/install/include/config_manager.class.php on line 139

Not really sure where to start troubleshooting this. Any ideas?

Thanks.

@tbar0970
Copy link
Owner

tbar0970 commented Oct 6, 2017

hi @mpedant you've discovered a bug, which I just fixed in the commit above. If you download config_manager.class.php from https://raw.githubusercontent.com/tbar0970/jethro-pmm/9af17160c53137a808b886c6c812b61dcf5cc32c/include/config_manager.class.php and use it to replace the file in the include folder of your Jethro system, it should be resolved.

@tbar0970 tbar0970 reopened this Oct 6, 2017
@mpedant
Copy link
Author

mpedant commented Oct 6, 2017

Thanks Tom, I'll give that a try when I've summoned up the energy!

Mark.

@tbar0970 tbar0970 closed this as completed Nov 3, 2017
@Dav9000
Copy link

Dav9000 commented Jan 9, 2018

Tom,
I'm upgrading from v2.18.2 to v2.21.2, and I got the same error as mpendant.
I downloaded the config_manager.class.php file from your link, and now I'm getting the message -

Warning: PDO::quote() expects parameter 1 to be string, array given in /var/www/jethro/include/jethrodb.php on line 94

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE symbol = 'ENABLED_FEATURES'' at line 3' in /var/www/jethro/include/config_manager.class.php:139 Stack trace: #0 /var/www/jethro/include/config_manager.class.php(139): PDO->exec('UPDATE setting\r...') #1 /var/www/jethro/include/config_manager.class.php(54): Config_Manager::saveSetting('ENABLED_FEATURE...', Array) #2 [internal function]: Config_Manager::migrateEnabledFeatures() #3 /var/www/jethro/include/config_manager.class.php(14): call_user_func(Array) #4 /var/www/jethro/include/init.php(57): Config_Manager::init() #5 /var/www/jethro/index.php(38): require_once('/var/www/jethro...') #6 {main} thrown in /var/www/jethro/include/config_manager.class.php on line 139

The v2.21.2 version of config_manager.class.php that I used originally has these lines -

	self::saveSetting(ENABLED_FEATURES, $value);

	self::saveSetting(LOCK_LENGTH, $secs/60);

The version of config_manager.class.php that I downloaded from your link has these lines -

	self::saveSetting('ENABLED_FEATURES', $value);

	self::saveSetting('LOCK_LENGTH', $secs/60);

The single quotes around ENABLED_FEATURES and LOCK_LENGTH seem to be the only differences between the 2 versions.

Any help appreciated.

Dav9000

tbar0970 added a commit that referenced this issue Jan 10, 2018
@tbar0970
Copy link
Owner

Hi @Dav9000
I looked at this again and my previous fix was insufficient.
Can you try this new version of config manager: https://raw.githubusercontent.com/tbar0970/jethro-pmm/ae93206efb0d90e5ff6a7a44a1ef370def64c36e/include/config_manager.class.php

Let me know if the problem persists.

@tbar0970 tbar0970 reopened this Jan 10, 2018
@Dav9000
Copy link

Dav9000 commented Jan 11, 2018

Thanks Tom. That solved the problem.

Dav9000

@Dav9000
Copy link

Dav9000 commented Jan 11, 2018

Tom,
I'm ok with this issue being closed. I don't think I have permissions to close it because I'm not the originator.
Dav9000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants