Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

RESOLVED - CDbException error with latest version of Limesurvey

  • linuxhooligan
  • linuxhooligan's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 months 3 days ago #251438 by linuxhooligan
Please help us help you and fill where relevant:
Your LimeSurvey version: limesurvey6.3.1+231023
Own server or LimeSurvey hosting: Self hosted VPS (Cpanel / WHM)
Survey theme/template: default
==================
Hi guys.

I just wanted to check with everyone here in order to identify if this is a bug that needs to be filed.  Details:

1) I have a VPS with a hosting company and an absolutely default install with Cpanel and WHM.  The hosting company is responsible for managing the VPS, I do not fiddle with the config.

2) Example of successful installation - I also have shared hosting accounts with the same company and can install Limesurvey wither with Softaculous provided by Cpanel or by using the CE edition of the Limesurvey installer.  I tested successful installations on the hosting environment, there were no issues.

3) Example of problem installation - On the VPS instance, I went through the installation process many many times just to make sure I am familiar enough with it and the results are always the same:

a) The installation process completes perfectly and I can log into the Limesurvey admin / control panel.

b) Once I am logged in, everything "seems" to work for the most part, I don't see any particular issues staring at me.  The admin panel looks the same as in all other installs that I have tested.

c) However, the following links generate the CDbException error:

* Themes link on main dashboard.  Error:  CDbExceptionCDbCommand failed to execute the SQL statement: 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 '-01_templates AS template ON `t`.`template_name` = template.name WHERE ((t.sid I' at line 1

* Global settings on the main dashboard. Error: CDbException CDbCommand failed to execute the SQL statement: 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 '-01_templates AS template ON `t`.`template_name` = template.name WHERE ((t.sid I' at line 1

* List surveys on main dashboard.  Error: CDbException CDbCommand failed to execute the SQL statement: 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 '-01_templates AS template ON `t`.`template_name` = template.name WHERE ((t.sid I' at line 1

Strangely, create survey, manage survey administrators and label sets seem to work / render just fine.  I did not go very deep into testing every single link as these are curious enough to start the conversation here.

4) Details about VPS:

Mysql: Server version: 8.0.34
Php: 8.0.30
Memory: 1024mb
Pre-installation check for limesurvey 6.3.1: We have everything exept the PHP LDAP library as we don't need that feature.

5) Questions

Any thoughts on what might be causing this issue?  I am surprised to see an sql statement syntax error given that the latest version of Mysql seems to be 8.1.0 and we aren't there yet on our VPS. 

Thanks.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 months 2 days ago #251460 by holch
To me this sounds like an issue with mod security rules being too restrictive on the VPS (but take this with a grain of salt, as I am not a expert in terms of server configuration).

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

  • linuxhooligan
  • linuxhooligan's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 months 2 days ago #251464 by linuxhooligan
Replied by linuxhooligan on topic CDbException error with latest version of Limesurvey
Oh, interesting. Right, I will now check with the hosting provider. Thank you for the insight, that helps.

Please Log in to join the conversation.

  • linuxhooligan
  • linuxhooligan's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 months 15 hours ago #251567 by linuxhooligan
Just following up with this thread so other users benefit:

* The issue was not modsecurity, turning it off did not resolve the issue but it did start the troubleshooting process.

* The issue turned out to be me setting the db prefix to something non-standard. Reinstalling with default db prefix resolved the issue.

Thanks Holch for the kickstart on troubleshooting.
The following user(s) said Thank You: holch

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 months 14 hours ago #251570 by holch
Thank you for the feedback on how you managed to solve this. This might help others in the future who have the same or similar issues.

However, changing the prefix shouldn't cause any issues, as long as the prefix isn't some reserved word. If Limesurvey allows to change the prefix, it should not cause any issues.

Maybe you can open a bug report for this and describe the issue?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

  • linuxhooligan
  • linuxhooligan's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 months 8 hours ago #251585 by linuxhooligan
Aha, this was my thought as well. Okay, I will do that. Thank you.

Please Log in to join the conversation.

More
5 months 4 weeks ago #251592 by mfavetti

Please Log in to join the conversation.

More
5 months 4 weeks ago #251595 by mfavetti
nm

clear tmp/runtime/cache when changing db prefix
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose