News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Spellchecker not working - SMF 1.1.16

Started by Artimidor, February 20, 2012, 02:43:20 PM

Previous topic - Next topic

Artimidor

I have a problem with my SMF Forum - this one to be precise.

For some reason the spellchecker function doesn't work anymore. The window opens and the message "Spellchecking complete" appears and closes immediately - despite the fact that there are very obvious mistakes. I actually have another SMF Forum on the same server, where the spellchecker works just fine.

As far as I can see language files and the spellchecker are in the Themes/default folder and respectively in the languages subfolder, so I tried copying all those files from the other board into the one with the problems - but no success there...

Any suggestions what I could do? Thanks in advance!
Artimidor

Night09

On the faulty forum have you tried using the default theme and see if the fault persists? It may be related to the themes template and not the spellcheck.js.  Just thinking out loud atm really but might be a clue if no one else knows for sure.

Artimidor

Just checked, but there's no change in behavior when I switch to the default theme...
Artimidor

JimM

Is the other SMF installation the same version?  Are there any errors in your forum error log when you try to use spell check?  Does you phpinfo sheet show that pspell is installed?

What is phpinfo.php?

Jim "JimM" Moore
Former Support Specialist

Artimidor

There's no error logged when I try to use the spellchecker...

But here's the PHPInfo. According to this PSpell is enabled...
Artimidor

Night09

3 ideas,

Are the character sets the same ? Are the files both x86 / x64 versions as a x86 wont work on a x64 for instance and also are the files readable after being moved ?  Might narrow it down a bit.

Artimidor

Well, the thing is this: Both of my boards (as mentioned above) are on the very same server. So I'd say the exact same files are used - though I have no idea what files I should check. There was a problem with a hack a few weeks ago, where the hacker managed to change some index files, which I've fixed by copying files from the other Forum - so it could be the hack affected another file as well of which I'm not aware of. But I don't really know where I should check exactly.
Artimidor

Night09

Its possible something minor could be changed as a result of being hacked that doesnt flag as an error. You could try making a test forum and check it works then once thats established start copying in a few files at a time until you get to where it stops working. Its hard to say what is at fault and with a hack involved it could literally be anything as a cause so it may be a slow elimination process.

If you can pin it his way then you may then also be able to see the change to the files once its been identified. Its unlikely the server imo since both run on the same one.

JimM

Also sometimes if there is extra space either at the beginning or the end of the php files, this can cause some issues.  You might want to download the script attached to this topic, and run it to check the files.  Fix any that it reports a problem with.

http://www.simplemachines.org/community/index.php?topic=300626.msg1989826#msg1989826

Be sure and let us know how it goes.
Jim "JimM" Moore
Former Support Specialist

Artimidor

Thanks for the tip, but I cannot report anything better.

Here's the current result. I've eliminated all the extra spaces at the other files which were suggested, and these are the ones that remained. Either they are empty or they end differently, but for good reason as far as I can see. One of these files is a spellchecker file apparently, but it doesn't look as if it is supposed to end the way the script you provided is looking for... So yeah, situation is still the same.
Artimidor

JimM

All PHP files should begin with "<?php" and end with "?>".  Make a backup and then fix the files that the file checker reported.  Be sure to use something like notepad++.  Don't use a standard text editor.

Is this the forum that was hacked or were both hacked?
Jim "JimM" Moore
Former Support Specialist

Artimidor

Yes, this is the Forum that was hacked.

The second one wasn't hacked and spellchecker works there. The spellchecker.php files look exactly the same on the both forums and they weren't changed since 2007. This php file ends with an additional HTML part which is by design as far as I can see. If that's not supposed to be that way why does the other Forum work with a file which is five years old?

Same applies to ssi_examples.php and whizzypic.php, they are identical on the other Forum - the rest of the files are empty.
Artimidor

JimM

It's ok if ssi_examples doesn't end with "?>"  It's just a file to show you how to use ssi.

Take a look at this page concerning the file without the ">?" end tag.

http://www.w3schools.com/PHP/php_syntax.asp

I can't explain why one works and one don't, however I can tell you that SMF does not include a spellchecker.php file.  That file is left over from something else or even possibly your hacker.  It's not part of SMF.
Jim "JimM" Moore
Former Support Specialist

Artimidor

I assume it's not part of SMF, probably the TinyPortal extension.
Artimidor

JimM

I don't use TinyPortal, however I remember a security vulnerability that keeping the FCKEditor file on your server created.  I do believe that it has been removed from current versions of TinyPortal.
Jim "JimM" Moore
Former Support Specialist

Advertisement: