ViPER Guestbook - syntax error
Though I didn't know it, because I'd foolishly taken my eye off the ball, my Guestbook started failing on December 4th 2013. Any attempt to use it produced this error message :-
select ID, NAME, FRCE, MAXVALUE from VGB_RATINGBOX
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 'MAXVALUE from VGB_RATINGBOX' at line 1
Looking around the 'net for some assistance, one of the first things I discovered was that MySQL was upgraded to version 5.5.35 on December 3rd 2013 .... the day before my problem started. Coincidence? No!! Though I struggled to understand a lot of the technical speak I was reading I eventually learned that MySQL uses a number of 'Reserved Words' and that seven new ones were introduced in version 5.5. One of the new 'Reserved Words' was 'MAXVALUE'. PING!! - the light comes on.
It seemed to me that the fix I was looking for involved changing the word 'MAXVALUE' to something else. First of all I used cPanel to access my Database and open the table VGB_RATINGBOX. I then edited Row 7 to change 'MAXVALUE' into 'MAXVL'.
The next step was to locate the file index.php in the folder Guestbook and open it for editing. I use Notepad2 as my text editor of choice, but Notepad will do if you don't have any other plain text editor. I used Search and Replace to find every instance of 'MAXVALUE' and change it to 'MAXVL'. There were only 8 instances so it's not a massive job to do manually if you don't have Search and Replace. Once saved, it was just a case of uploading index.php to the Guestbook folder of my web site. Job done!!
Actually, it's not completely "Job Done". That's enough to get the basic book working again for your visitors but to do a complete fix changing 'MAXVALUE' to 'MAXVL' now needs to be done in the following files as well :-
Since I'm not a programmer I can't say this is the best solution, but it worked for me. If you try it for yourself and have some success then let me know through my Guestbook.
Finally, I am publishing this information in the hope that it may help others. I in no way accept responsibility for anything that goes wrong if you try the same thing. Good luck.