Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: TurkVolki on April 07, 2007, 04:36:38 PM

Title: Database Error [Post.php]
Post by: TurkVolki on April 07, 2007, 04:36:38 PM
When i want to add pitcure into the topic, i get this error. I research for five day but i couldnt find any solituon :\\

Someone can help me?

sorry for my English mistakes

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
Folder: /home/kibrscom/domains/kibrisabakis.com/public_html/forum/Sources/Post.php
Line: 585
Title: Re: Database Error [Post.php]
Post by: xenovanis on April 07, 2007, 05:12:48 PM
Is this if you add an attachment or if you're using the [img][/img] tags?

Version of SMF?
Do you have any mods installed?
Are you using a custom theme?
Title: Re: Database Error [Post.php]
Post by: TurkVolki on April 08, 2007, 03:41:50 AM
i am using hot editor

i dont have to use img code for add photo (only in fast reply i use img code)

my version is  1.1.2

i have 18 mod

i am using default theme


I entered admin panel and i used this future "Find the error and correct" can it be therefore?

thank you for interested
Title: Re: Database Error [Post.php]
Post by: xenovanis on April 08, 2007, 08:42:31 PM
Okay, we're looking into this as you are not the only one having this problem. Can you post a phpinfo please?

What is phpinfo.php? (http://www.simplemachines.org/community/index.php?topic=18250.0)

Also, can you post the content of lines 570-590 of the file Post.php?
Title: Re: Database Error [Post.php]
Post by: TurkVolki on April 09, 2007, 11:23:44 AM
http://www.kibrisabakis.com/forum/phpinfo.php

and i found this line from exel. i dont sure is it true.


'name' => $row['filename'],
'id' => $row['ID_ATTACH']
);
}
mysql_free_result($request);
}

// Allow moderators to change names....
if (allowedTo('moderate_forum'))
{
$request = db_query("
SELECT ID_MEMBER, posterName, posterEmail
FROM {$db_prefix}messages
WHERE ID_MSG = " . (int) $_REQUEST['msg'] . "
AND ID_TOPIC = $topic
LIMIT 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($request);
mysql_free_result($request);

if (empty($row['ID_MEMBER']))
{


Title: Re: Database Error [Post.php]
Post by: nitins60 on April 09, 2007, 12:21:17 PM
I already reported (long time back) this error in my clean smf 1.1.2 forum, tried replacing all files! But no help/solution from SMF! It's definatly a bug of 1.1.2 (occured after upgrading from 1.1.1) :( 
Title: Re: Database Error [Post.php]
Post by: nitins60 on April 09, 2007, 12:27:20 PM
http://www.simplemachines.org/community/index.php?topic=154322.0 got link :)
Title: Re: Database Error [Post.php]
Post by: SleePy on April 09, 2007, 08:37:19 PM
TurkVolki,

That error doesn't help much to the cause.

Open Settings.php and add in the database section
$db_show_debug = true;

Then try to redo this again.  Your error should be greatly bigger.
Title: Re: Database Error [Post.php]
Post by: TurkVolki on April 10, 2007, 04:45:49 AM
http://www.kibrisabakis.com/forum/index.php

Quote from: SleePy on April 09, 2007, 08:37:19 PM
TurkVolki,

That error doesn't help much to the cause.

Open Settings.php and add in the database section
$db_show_debug = true;

Then try to redo this again.  Your error should be greatly bigger.

Ok. i got backup and i did.

at this link

http://www.kibrisabakis.com/forum/index.php
Title: Re: Database Error [Post.php]
Post by: SleePy on April 10, 2007, 10:56:48 PM
Well as a guest to your site I can't do anything.

Just try to do what you have tried and gotten the error. The error you get this time should be bigger with more information. Which will help us help you.
Title: Re: Database Error [Post.php]
Post by: TurkVolki on April 13, 2007, 04:13:06 AM
ok. thanks for helps. i will delete forum and i will install again.
Title: Re: Database Error [Post.php]
Post by: xenovanis on April 13, 2007, 05:09:35 AM
I doubt that will fix it. What SleePy means is you should add this

$db_show_debug = true;

to your Settings.php and post an image again. A slightly different error should show up, please post that error back again.
Title: Re: Database Error [Post.php]
Post by: TurkVolki on April 14, 2007, 03:49:19 PM
Quote from: xenovanis on April 13, 2007, 05:09:35 AM
I doubt that will fix it. What SleePy means is you should add this

$db_show_debug = true;

to your Settings.php and post an image again. A slightly different error should show up, please post that error back again.


Interesting, i can post image now. How happened this i didnt understand :D . I dont have to reinstall forum. When i delete "$db_show_debug = true;" this code, it is still working!

Maybe my  forums another stuff corrected error. when i learn how did he do, i will write here.

Thank you for your helps.
Title: Re: Database Error [Post.php]
Post by: xenovanis on April 14, 2007, 03:50:16 PM
Well, it's definately not due to that line, but it's great to hear. Please let us know if you find out what changed.  ;)
Title: Re: Database Error [Post.php]
Post by: TurkVolki on April 17, 2007, 05:05:30 AM
I remembered. I was backup all forum files. I took old post.php. I think it corrected therefor.

Thank you