SQL syntax error - SMF 1.0.1 with database from 1.00

Started by nokonium, January 15, 2005, 04:51:01 PM

Previous topic - Next topic

bluevoodu

lol... so what exactly did you try that made it work?

†B†V†
We want you to join:
Chicken Dinner Gaming Community

nokonium

I applied this

"Many people have run into that error... Try the solution posted here."

to this

"That's most likely what's causing the problem.

nokonium - try the attached file..."



[Unknown]

#42
Quote from: Oldiesmann on January 21, 2005, 12:03:53 PM
AND ID_MSG IN (" . implode(', ', array_keys($context['topics'])) . ')', __FILE__, __LINE__);

Should be
AND ID_MSG IN (" . implode(', ', array_keys($context['topics'])) . ")", __FILE__, __LINE__);

Either I'm very tired, or you're just changing single quotes to double.  That means nothing.

Attached is the corrected file with the actual fix, I found what it is now.  Other fixes will most likely miss results or only show one match per topic, etc.

-[Unknown]

nokonium

I'm sure that I'd tried both of them individually and no luck. Only pasting the code mod into your (now) last but one version of search.php did the trick. I tried several searches and they all worked.

I've now downloaded your latest version and I'll try that at the next convienient time, probably tomorrow morning (GMT) when no one else is on the boards.

Thanks



Nucleus

Quote from: [Unknown] on January 20, 2005, 11:46:33 PM
This one, then?

Darn it this is getting annoying :P.

-[Unknown]
Thanks [Unknown] this file fixed the problem on my board  :) The problem started with the 'cannot create temp. table' (not the exact words in the error message) error. This file is test version or it is the final version?

[Unknown]

That file should be the best one.  I think it fixes all the problems.

-[Unknown]

nokonium


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 ' (7, 454, 14, 4739, 4),, (7, 447, 12, 4738, 2),, (7, 458, 6, 47
File: /home/fhlinux198/k/keynshamweb.org.uk/user/htdocs/smf/Sources/Search.php
Line: 648


I tried the new one and got the above, put back in the previous one, that had worked, same error.



bluevoodu

Quote from: nokonium on January 23, 2005, 11:32:57 AM

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 ' (7, 454, 14, 4739, 4),, (7, 447, 12, 4738, 2),, (7, 458, 6, 47
File: /home/fhlinux198/k/keynshamweb.org.uk/user/htdocs/smf/Sources/Search.php
Line: 648


I tried the new one and got the above, put back in the previous one, that had worked, same error.

I am back at that error too:

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 ' (0, 1404, 3, 23429, 1),, (0, 1036, 3, 23387, 1),, (0, 1402, 3,
File: /home/www/egameaddiction/forums/Sources/Search.php
Line: 648
We want you to join:
Chicken Dinner Gaming Community

nokonium

I'm not just sitting on my butt thinking WTF. I'm trying things as well. I have installed, on the original server, using the original database i.e. not downloaded and uploaded, SMF 1.0. It wants to use the themes from my 1.0.1 install, but Jack Daniels is prettier than default, so let it. (yes I have a theme based on the colors seen in the bottle of Jack Daniels on their website, hic!)

I have run search, no problem, several searches, getting over 1 page (3 pages & 5 pages). Tried to install mods, no go, it chokes on ****Pdb.php files, they will not execute. They means I tried more than one mod.

I think the search.php problem is an effect and not a cause. The problem lies elsewhere.



[Unknown]

Okay... I don't know what happened, but I just checked the attachment and it doesn't have the fix in it.  I'm thinking conspiracy.  Anyway, find this:

foreach ($sort as $ID_MSG => $value)
$insertRows[$ID_MSG] = $tmp[$ID_MSG];
unset($tmp);


And change it to:

foreach ($sort as $ID_MSG => $value)
$insertRows[$ID_MSG] = substr($tmp[$ID_MSG], 0, -1);
unset($tmp);


I swear I made that change before attaching it, but perhaps I didn't save it or something?

-[Unknown]

nokonium

OK, done and search works Thank you [UNKNOWN] you must have been close to chewing the furniture.....

Now how do we fix mods?  :)



bluevoodu

bonus!  I think you got it there :)

Its working for me so far... I'll report otherwise if not.

but out of 8 searches... its good to go.

The other problem would MAYBE let me fire off 1 search... and then I'd get the error.

But hey, I do think you have it solved.

†B†V†
We want you to join:
Chicken Dinner Gaming Community

nokonium

#52
I was given an update option in the Package manager and applied the 1.0.1 update to the 1.0 install. Or rather I haven't.

"Installing this package will perform the following actions:"

I have 54 lines ending in success and no blanks or fails, but "Some of the files this package needs to modify are not writable. This needs to be changed by logging into FTP and chmoding the files."

There are no files to chmod and it hasn't updated.

Plan B

I downloaded and manually updated from 1.0 to 1.0.1 and this time success.

I will now try to apply mods again.

They will not install.

Plan C

I have installed a pristine SMF 1.0 on another server, upgraded it to 1.0.1 and installed 2 mods. Tomorrow I will uninstall the mods, upload a database and see what happens.




nokonium

OK some self inflicted problems, but now on server mk3. The .sql file would not upload to the old server, syntax problem. BUT....... the same D/B uploded to a different server, with a different and more recent version of MySql, and ........ woohoo yes no problems.  Some cookie and dns issues but it works.

So, question, are some of these so called 'syntax' problems caused by different versions of PHP/MySQL?



nokonium

Post script

I can install mods on the new server, with [UNKNOWN]'s new search.php file, search works and the last post icons have appeared in all default related themes.






Ravey76

Hello [Unknown] and all others,

I tried to fix the search.php-problem (yes, I still have this problem) the way you described above. Unfortunately it doesn't show any effect; still makes hundreds of error message (in my log file).

Original search-file (v.1.0.1) > no effect > error messages
Edited file (v1.0.1) > no effect > error messages
Edited file (v.1.0) > no effect > error messages
Original file (v.1.0)> works somehow, but makes an error message for every found matching entry in DB

Any Idea what could be done to get this running w/o error messages in log file?

Thanks a lot,
Ravey

[Unknown]

Hopefully this one has everything in it.

-[Unknown]

Ravey76

#57
Hello [Unknown],

thanks for this file - it removed the error messages ... err ... ALMOST removed them; one kind of error message still remains:

8: Undefined index: 373
Datei: [url]/htdocs/forum/Sources/Search.php
Zeile: 631

Works better but not perfekt  ;D

Keep up this good work  :)

Ravey

[Unknown]


Ravey76

Hello [Unknown],

yessss - THAT's the one that works perfect  :)
Thanks a lot for this file; I've never seen any other board with this much support from the developrs -   :-*

Kind regards,
Ravey

PS.: I am curious - what was the reason for all this error messages? The DB-version of my host? A bug in search.php? How did you fix this problem?

Advertisement: