Dec 07, 2019, 12:11 am

News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.


SQL error

Started by wzrd, Jan 11, 2009, 06:57 pm

previous topic - next topic

0 Members and 4 Guests are viewing this topic.

wzrd

Hi there, first of all it's just a great script, and i really love it.
Sow keep it up :)
Second, i'm using smf 1.1.7  :) with wordpress (different db)
sow
root dir /wordpress/
smf dir /wordpress/smf
pastebin dir /wordpress/pastebin
And i'm using a non default template but there is no problem with the paths and the settings file.. (i think)
When i go to the pastebin/index.php
It gives me the following error..
Code Select
Notice: Undefined variable: file in /fullpath/pastebin/index.php on line 487
And this is the sql error
Code Select

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 '}topics AS t
WHERE t.ID_BOARD = {int:paste_board}
ORDER BY id_last_msg DES' at line 2


PS, i'm not using english language, but i'v just modified the language/index.english.php file

Can we fix this error ?

SleePy

Give this one a try. I didn't add proper back support for 1.1 with the new replacement callbacks in 2.0 :)
No siggy! :D

wzrd

Jan 12, 2009, 03:44 am #2 Last Edit: Jan 12, 2009, 04:11 am by wzrd
Thank you for your reply
We are all most there
Now it's working (no more sql error) & it gives me the paste but now we have an error on
Code Select
Undefined variable: file in /fullpath/pastebin/index.php on line 491
I'v just make a paste but it gives me 404 not found the same when i click credits (but must be something with the .htaccess file) /yep it was the .htaccess file but what is the correct path, it gives me a 500 internal error.
PS
I see the paste on the board forum but i don't see it on the pastebin

wzrd

Hi,
Sorry for the second post .
I removed 2 lines (remove the smf 2.0 arrays) the line 491 & 508 (of your index.php) & now the pastebin is not displaying anymore warnings, or Notifications.
Seems to be fine , & the url-s after i edit my .htaccess file are working great.
I have just ONE problem to fix.
The pastebin it's fine when i post the code it post it on the forum (eg board 23) but when i click to the number of the paste it's display the following error message:
Code Select

You have attempted to pull a paste from a board which is not setup for pastes. Please check your Paste number and try again

The message of the incorrect_board
& it's not showing the pastes history.
Help me, i'm not a php geek.

SleePy

Try the attached file to remove the $file error.

As for posting straight in the board, you can not. The pastebin script doesn't go through some of the cleaning SMF normally does to posts. This is to help retain the returns and original text.

No siggy! :D

wzrd

Jan 13, 2009, 01:52 pm #5 Last Edit: Jan 13, 2009, 03:10 pm by wzrd
Yep, no more $errors..
But is the same thing, the pastes goes to the forum but not to the pastebin.
No recent posts
No output when i click to the number of the post that i made 1 sec a go.
Seems to don't want to work..
Well i'm gona wait for the SMF 2.0 final..
Thank you for your time :)
______________________________________
EDIT
-------------------------------------------------------------------
I'v just installed smf 2.0 beta 4 (just a fake forum) for supporting the pastebin
Work just fine now.
Thanks.

Browser ID: smf ()
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 3: index+Modifications.english (default), Post.english (default), Editor.english (default).
Style sheets: 3: index.css, jquery.sceditor.css, responsive.css.
Hooks called: 76 (show)
Files included: 28 - 1020KB. (show)
Memory used: 1139KB.
Tokens: post-login.
Cache hits: 25: 0.00290s for 31,551 bytes (show)
Cache misses: 6: (show)
Queries used: 18.

[Show Queries]