PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   ReviewPost How do I...? (http://www.photopost.com/forum/reviewpost-how-do-i/)
-   -   SQL Error (http://www.photopost.com/forum/reviewpost-how-do-i/148034-sql-error.html)

inspi2012 April 21st, 2012 10:18 AM

SQL Error
 
I received two times of the following error. Do you know why this is happening? How do we address this?



MySQL Error Report
> An error was encountered during execution of the query:
>
> SELECT bigimage,approved,cat,title,userid,date,rating,views,user FROM rp_products WHERE id= LIMIT 1
>
> 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 'LIMIT 1' at line 1
>
> If you need assistence or feel this is a 'bug'; please report it to our support forums at: ReviewPost PHP User Reviews Engine
>
> To turn off these emails, set $debug=0 in your config-inc.php file.

Chuck S April 21st, 2012 10:59 AM

I would suspect some type of spam bot. That query is from the revshow.php script which is only shown when you have reviews. Therefore put a robots.txt file in your reviewpost directory with the contents like this

Code:

Content visible to verified customers only.

inspi2012 April 23rd, 2012 01:10 AM

Thanks a lot Chuck. I think these will help a lot on other things also.

Do we need to disallow revshow.php and reviews.php also? These two pages have text review information which can help if search engine index them, right?

Chuck S April 23rd, 2012 07:59 AM

Well reviews.php is the actual review form when posting a review so that is never shown.

revshow is a sub script which is not shown when there are no reviews your error is because someone is trying to view it when there are no reviews so it has to be a bot.

inspi2012 May 8th, 2012 12:25 AM

Chuck,

The Robots.txt was already there.

I continue to get error message like this:

An error was encountered during execution of the query:

SELECT bigimage,approved,cat,title,userid,date,rating,views,user FROM rp_products WHERE id= LIMIT 1

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 'LIMIT 1' at line 1

If you need assistence or feel this is a 'bug'; please report it to our support forums at: ReviewPost PHP User Reviews Engine

To turn off these emails, set $debug=0 in your config-inc.php file.

Chuck S May 8th, 2012 07:11 AM

You need to actually edit the robots text file and make it what I posted as I would suspect your robots.txt is not what I posted.

Like I said if there are NO reviews we do not show a link to revshow.php and if there are reviews you would not get that error so I can only guess you have a bot hitting that script so without you altering your robots.txt file you are allowing bots to crawl that script.

inspi2012 May 8th, 2012 08:27 AM

We have a few dozens reviews already last week. And this error was generated last week.

I checked the existing robots file, it has everything you listed plus the cron php. So is it possible it's something else?

Chuck S May 8th, 2012 08:51 AM

No that query is only in one spot in the program unless this is something you have altered. There is no other response I can give.

You can check your revshow.php script for that query and see what I mean. That query is only ran when visiting the script and we do not show that script unless there are comments. You would only get an error is someone was trying to run that script and there are no comments.

inspi2012 June 4th, 2012 12:50 AM

I am getting some more SQL error. It does not give error code. Could you please help?


An error was encountered during execution of the query:

SELECT bigimage,approved,cat,title,userid,date,rating,views,user FROM rp_products WHERE id= LIMIT 1

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 'LIMIT 1' at line 1

Chuck S June 4th, 2012 08:05 AM

Please read my replies there is no revshow link showing on our program without there being actual reviews. This has to be a bot issue and if you disallow revshow.php in your actual robots.txt that should solve it.

You can try making sure line 73 of that file encapsulate the id variable

Code:

Content visible to verified customers only.


All times are GMT -5. The time now is 05:58 AM.

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