PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Photopost Pro Bug Reports (http://www.photopost.com/forum/photopost-pro-bug-reports/)
-   -   SQL error after 7.0 upgrade (http://www.photopost.com/forum/photopost-pro-bug-reports/141403-sql-error-after-7-0-upgrade.html)

cdub December 18th, 2009 08:31 AM

SQL error after 7.0 upgrade
 
I just upgraded from 5.3 to 7.0. PP is sending me emails with the following:

Quote:

An error was encountered during execution of the query:

SELECT id,user,userid,cat,storecat,date,title,description,ismature,keywords,bigimage,width,height,filesize,views,medwidth,medheight,medsize,approved,rating,votes,allowprint,numcom,lastposter FROM pp_photos WHERE userid= AND storecat=0 ORDER BY disporder,date DESC

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 'AND storecat=0 ORDER BY disporder,date DESC' at line 1
It looks like the userid is missing causing the SQL error, but I can't figure out what page this is on as from my quick look over my gallery frontend I don't see anything obviously missing or erroring.

Chuck S December 18th, 2009 09:28 AM

well that url I would suspect is coming from a bot playing with urls. I dont see anywhere that we dont pass the userid called ppuser

You can post a url here and as well to diagnose this try turning your debug setting to display errors not email errors and click around your gallery and see if you can replicate where its happening.

cdub December 18th, 2009 10:02 AM

Can you explain how to do this:

Quote:

turning your debug setting to display errors
I don't see it in any documentation.

As for the URL its http://www.woodcarvingillustrated.com/gallery/

Chuck S December 18th, 2009 10:11 AM

it is in your photopost admin panel under global options ;)

cdub December 18th, 2009 01:14 PM

Aww the most obvious place...

I got that turned on, but I don't see any errors. Any way to easily change the debug routine to include some server vars?

$_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $_SERVER['HTTP_REFERER'] . $_SERVER['REQUEST_URI']

would be mighty helpful.

Chuck S December 18th, 2009 02:04 PM

no sorry none of those would be useful in any manner to our discussion.

Basically what I am saying is the only way this is going to happen is if a bot is playing with urls I would think. I dont see anywhere in the actual program we are passing an empty ppuser statement.

JacobG Gallery - Wood Carving Illustrated Photo Gallery

Thats a members gallery link in your program

- Wood Carving Illustrated Photo Gallery

I can do something like this and I dont see errors so the issue really is how is this error happening. The problem has to be generated someway through showgallery that much I know because that query is only issued one place and only if ppuser exists. Thats what I really mean by changing to display the error and not email it. You then can try and click links like that and see if you can replicate the issue.

I sure cant on your site.

cdub December 18th, 2009 02:42 PM

ok, show errors is enabled.

Chuck S December 18th, 2009 02:53 PM

Yep still dont see anywhere in the program clicking links to showgallery that one can get the error.

cdub December 21st, 2009 11:43 AM

I think I fixed this. It looks like the error was coming from an old renamed script that was never removed from a previous upgrade. Sorry for the fuzz.

Chuck S December 21st, 2009 11:44 AM

Thanks not a problem yeah no wonder we could not find the issue clicking through the normal files.

Infinite December 29th, 2009 03:01 PM

Quote:

Originally Posted by cdub (Post 1257294)
I think I fixed this. It looks like the error was coming from an old renamed script that was never removed from a previous upgrade. Sorry for the fuzz.

I'm having the same error. Could you let me know which script triggered the error?

Chuck S December 29th, 2009 09:32 PM

His issue seems to be from some old custom script he was using.


All times are GMT -5. The time now is 05:32 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97