News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

[BUG] Possible Database Error!

Started by nitins60, February 28, 2007, 06:20:27 PM

Previous topic - Next topic

nitins60

Unfortunatly, when i am trying to edit an old post, got this error! I can reproduce this error!

Database Error:
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 5
File: /home/s60forum/public_html/forum/Sources/Post.php
Line: 575

Note: it appears that you may require an upgrade. Your forum's files are currently at version SMF 1.1.2, while your database is at version 1.1, the above error might go away if you execute the latest  version of upgrade.php


I got this error for http://www.xxxxx.com/forum/index.php?action=post2;start=0;msg=3038;sesc;board=5 

by changing to msg=3039 also producing the same error! Presently don't have any mods (clean 1.1.2 files)! All my upgrades from 1.1 to 1.1.1 to 1.1.2 are gone smooth! Didn't have any problem so far! After a hard refresh, i tried to edit the same topic, and didn't get this error!   ::)

nitins60

What i observed is, when ever i try to modify post, there sesc= sum sort of numbers and alphabets (session ids)

but with about link, it's producing errors! Can any1 figure?   

SleePy

Open your Settings.php and enter this in your database section (can go anywhere but its best for cleanness)
$db_show_debug = 1;

View that page with the error and copy the full error out. It should be much bigger and have the mysql query used. This should help us know why you got the error.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

nitins60

I added it! Still it's showing same error! Nothing extra!

SleePy

Are you logged in as admin? It should appear right below what you posted with more information about the error.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

nitins60

Yeah, i logged in as admin, checked even error log also! No extra information available :(

SleePy

Is there at the bottom some more information like templates included queries used. etc with a show queries link?
If there isn't change the $db_show_debug = 1;
to
$db_show_debug = true;

Did you try to go to post again or what ever you did and see if the error occurs?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

nitins60


Database Error:
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 5
File: /home/s60forum/public_html/forum/Sources/Post.php
Line: 575

Note: it appears that you may require an upgrade. Your forum's files are currently at version SMF 1.1.2, while your database is at version 1.1, the above error might go away if you execute the latest  version of upgrade.php

SELECT ID_MEMBER, posterName, posterEmail FROM s60_smf_messages WHERE ID_MSG = 3038 AND ID_TOPIC = LIMIT 1

below footer

Templates: 2: index (default), Errors(default).
Sub templates: 4: init, main_above, fatal_error, main_below.
Language files: 6: index.English (default), Modification.English (default), post.english (default), errors.english (debatlt).

Files included: 10 - 483KB.
(show./index.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/LoadAds.php, ./Sources/Post.php, ./Sources/Sub-Post.php)

Queries used: 15.


surprisingly, after i added
$db_show_debug = true;
i can see this type of errors (template) in almost all pages n forum below footer

nitins60


Rudolf

SELECT ID_MEMBER, posterName, posterEmail FROM s60_smf_messages WHERE ID_MSG = 3038 AND ID_TOPIC = LIMIT 1
well, this query is not correct, reupload an original Post.php file (if you haven't done any modification to it).
Or paste here the code around line 575 (10 lines before and 10 lines after).
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

nitins60

I didn't do any modification to it. I only have admanagement mod, which doesn't change post.php
Here is the file :(

SleePy

Reupload The Post.php and Subs-Post.php from a fresh download of the version of SMF you are using.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

nitins60

I replaced with new files! For testing purpose, i installed brand new 1.1.2 testing forum, did the same thing by changing boardid, postid! Same error. But when you do this without removing sesc=session id, no error! I can clearly state that, no problem with my database, but with SMF

SleePy

Uninstall ad mod as a test to see if that fixes it.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

nitins60

Quote from: SleePy on March 07, 2007, 05:58:38 PM
Uninstall ad mod as a test to see if that fixes it.
as i already mentioned, tested same thing on test forum where ad management mod is not installed. Just fresh install! Still same error without sesc= :P

jerm


nitins60


redone

Send me a PM so I can set up a test install of SMF on your server. Please forward FTP info and host info etc and I will set up a test install.

Thanks!


nitins60

My problem not yet solved! Many other users are also reporting the same issue! So it's definatly a bug of 1.1.2 :(

nitins60


Advertisement: