![]() |
Interesting Error - Any ideas...? Hey there, We've been getting reports of the following error. Any ideas of what might be causing this? > An error was encountered during execution of the query: > > SELECT id,cat FROM pp_photos WHERE approved=1 AND storecat=0 AND ((title > LIKE "% "carnival%" OR description LIKE "% "carnival%" OR keywords LIKE "% > "carnival%" OR bigimage LIKE "% "carnival%" > OR extra1 LIKE "% "carnival%" OR extra2 LIKE "% > "carnival%" OR extra3 LIKE "% "carnival%" OR extra4 LIKE "% "carnival%" OR > extra5 LIKE "% "carnival%" OR extra6 LIKE "% "carnival%") OR (title LIKE > ""carnival%" OR description LIKE ""carnival%" OR keywords LIKE > ""carnival%" OR bigimage LIKE ""carnival%" > OR extra1 LIKE "%"carnival%" OR extra2 LIKE > "%"carnival%" OR extra3 LIKE "%"carnival%" OR extra4 LIKE "%"carnival%" OR > extra5 LIKE "%"carnival%" OR extra6 LIKE "%"carnival%"))AND ((title LIKE > "% holiday"%" OR description LIKE "% holiday"%" OR keywords LIKE "% > holiday"%" OR bigimage LIKE "% holiday"%" > OR extra1 LIKE "% holiday"%" OR extra2 LIKE "% > holiday"%" OR extra3 LIKE "% holiday"%" OR extra4 LIKE "% holiday"%" OR > extra5 LIKE "% holiday"%" OR extra6 LIKE "% holiday"%") OR (title LIKE > "holiday"%" OR description LIKE "holiday"%" OR keywords LIKE "holiday"%" > OR bigimage LIKE "holiday"%" > OR extra1 LIKE "%holiday"%" OR extra2 LIKE > "%holiday"%" OR extra3 LIKE "%holiday"%" OR extra4 LIKE "%holiday"%" OR > extra5 LIKE "%holiday"%" OR extra6 LIKE "%holiday"%")) ORDER BY date DESC > LIMIT 50 > > The query returned with an errorcode of: > > 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 'carnival%" OR > description LIKE "% "carnival%" OR keywords LIKE " > > If you need assistence or feel this is a 'bug'; please report it to our > support forums at: http://www.photopost.com/members/forum/f66/index.html > > To turn off these emails, set $debug=0 in your config-inc.php file. > |
what are you using as a search term? carnival or "carnival |
Chuck - I'm asking the people who gave me the error. Stay tuned! |
Yeah you can also test by setting debug setting to display errors and as admin test some different combinations. |
Chuck, The problem is that the error message wasn't sent to us by a user, it was automatically generated and emailed to our photo admin by the "system" (Photopost or vBulletin) when a user ran what appears to be a weird search. There's no way of us knowing who the user is! Any further suggestions? |
yes as posted above you can try entering search terms like carnival or holiday after setting debug option to display errors not email errors. That way you can post what you find. I am testing on a few sites with no errors thus far thats why I was asking the exact search term I am looking at the error and trying to use what I see to create an error but am unable. |
Hey there Chuck, In speaking to my higher ups, the question came up: "Is it (meaning changing the debug option) going to give the same information as we got in the email delivery, and if so how does that help us?" Our fear is that the user will get the same exact message that we get, which leaves us no better (or worse) than we started with. |
yes debug option that I stated will allow you to test and try and get the error. I have been testing on my site with variations of what I see above as what might be the search terms and I get nothing. |
Okay Chuck! We figured out the issue and was able to re-create it. If you do a search for anyting with a quote - " - in it, it'll come back with an error. For example, I did a search for "carnival" and got back the following: We're sorry, but the system experienced an unrecoverable error. Please try again later. Script: Query: SELECT id,cat FROM pp_photos WHERE approved=1 AND storecat=0 AND ((title LIKE "% "carnival"%" OR description LIKE "% "carnival"%" OR keywords LIKE "% "carnival"%" OR bigimage LIKE "% "carnival"%" OR extra1 LIKE "% "carnival"%" OR extra2 LIKE "% "carnival"%" OR extra3 LIKE "% "carnival"%" OR extra4 LIKE "% "carnival"%" OR extra5 LIKE "% "carnival"%" OR extra6 LIKE "% "carnival"%") OR (title LIKE ""carnival"%" OR description LIKE ""carnival"%" OR keywords LIKE ""carnival"%" OR bigimage LIKE ""carnival"%" OR extra1 LIKE "%"carnival"%" OR extra2 LIKE "%"carnival"%" OR extra3 LIKE "%"carnival"%" OR extra4 LIKE "%"carnival"%" OR extra5 LIKE "%"carnival"%" OR extra6 LIKE "%"carnival"%")) ORDER BY date DESC LIMIT 50 Result: 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 'carnival"%" OR description LIKE "% "carnival"%" OR keywords LIKE Database handle: Resource id #25 Please advise. |
Okay well hmm dont get that error using quotes but try this line 414 of search.php try this Code: Content visible to verified customers only.Code: Content visible to verified customers only. |
Chuck, Thanks. I've added that to the search.php. I've tested it and the error is not coming up anymore. Hopefully that will solve it going forward. Thanks! |
Not a problem glad to help and let me know if there is anything else we can do to assist. |
| All times are GMT -5. The time now is 08:08 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0