spellcheck....

Started by _complex, December 09, 2004, 07:56:59 PM

Previous topic - Next topic

Ben_S

Liverpool FC Forum with 14 million+ posts.

_complex

I emailed them and they got back with me
QuoteAspell has been upgraded on bee. Please do verify the same from your end.

but i still get the blank screen... and when i view page source all i see is

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title></title></head><body></body></html>


am i missing somthing.... weird ???

[Unknown]

Try a test page.  With this alone in a file:

<?php

error_reporting
(E_ALL);

pspell_new('en');
$test = pspell_new('en');

var_dump(pspell_check($test, 'missspelling'));

?>


If that works, then it might be a problem with SMF.  If that does not work, it is certainly the fault of your server.

Here's a link to a working version and the expected output:
http://support.simplemachines.org/pspell_test.php
(false means that the word is spelled wrong - change it to misspelling and it will say true.)

-[Unknown]

_complex

unfortunately that code did not work as i thought it would. [ http://so-thuggish.net/smf1/pspell.php ] but my host had gave me this link  [ http://so-thuggish.net/cgi-bin/k.php ] and that had work.. but the code may be different.. heres what was in that file


#!/usr/bin/php
<?php
$pspell_link
= pspell_new("en");

if (
pspell_check($pspell_link, "testt")) {
  echo
"This is a valid spelling";
} else {
  echo
"Sorry, wrong spelling";
}
?>

[Unknown]

Well, if you add the shebang (that's the #!/usr/bin/php) line to the test script I gave you and put it in cgi-bin, does it work?

Sounds like they recompiled PHP, but not mod_php...

-[Unknown]

_complex

I get an http 500 Internal server error.

_complex

And my host had resolved this error a while back :)

thanks you guys

repete

When I click on spell check I get a popup box that reads:

Warning: PSPELL couldn't open the dictionary. reason: I'm sorry I can't
find any suitable word lists for the language-tag "en". in
/var/www/html/smf/Sources/Subs-Post.php on line 844

I contacted my webhost and they replied:

"PSPELL is installed on the server, though you will have to supply your own
dictionary files on the server if you wish to use it. Just install them
somewhere on your account and tell your forum where they are located."

After reading this topic I'm under the impression my webhost is the one who takes care of installing what's needed, or do I have to set things up, and exactly how?

_complex

Well it depends on.. do you have access to an WHM panel?..

if not then your host have to be the one who install aspell and it's components..

and also ask them what version of pspell they are using..

but i may be wrong.. but still ask them what version they are running..

repete

I asked what version of aspell my host was using:

"PSPELL is installed. ASPELL is not not installed and cannot be installed at
this time."

I suppose this means no spell check for me.  :(

[Unknown]

#30
Okay, stupid hosts annoy me sometimes.  Say this:

QuoteDear myhost,

I have recently been trying to use the spell checking functionality of some forum software written in PHP.  This software utilizes the pspell library which has to be compiled into PHP.  I have not been able to get this to work currently, and when I contacted them for help they gave me more information about why it's not working.

According to them, even though the feature is called "pspell", it really is meant to use Aspell.  Typically, this means Aspell .50 or higher, although Aspell .33 can be made to work.  They tell me that pspell (which is an antiquated library no longer in development) was replaced by Aspell, and the functions simply have retained their old name for compatibility.

If you use rpms to install Aspell, they say, you have to install both aspell and aspell-devel, and then recompile Apache and PHP with the --with-pspell flag in the configure line.  Language packages should be downloaded and installed from http://aspell.net/.  If you have trouble finding the newer rpms, some are available at http://rpm.pbone.net/index.php3.

According to them, the functionality can be made to work with Windows, Linux, or Unix based servers.  However, they also say that most servers are not currently properly configured for it, because many use Aspell .33 or do not install the English language packages after compiling Aspell manually.

They also gave me this test page to use to see if it's working:

<?php

error_reporting(E_ALL);
@ini_set('display_errors', 1);

// Call it once first because of a bug in Windows' Aspell.
pspell_new('en');

$test = pspell_new('en');

echo '
   Testing pspell.... ', pspell_check($test, 'thisisnotawordandyouknowit') ? 'failure' : 'pass', '.<br />
   If no error messages were displayed, Aspell is installed and working properly.';

?>

Or summat like that.  Note that it works here, and I've installed it on a test debian server and two windows servers, easily, using the guidelines I just repeated...

-[Unknown]

_complex

#31
???
i may have a problem.. my host just upgraded my php im now on .10.. and now spellcheck isen't working..

is they gone have to set this up again?..

--

if so ill just email them and ask them to redo it...

but im just checking to see if im going to have to email them..

Just in case your wondering.. When i click on Spell check i get a blank pop up. as i was gettng before. ..




or will i have to do what unknown said to do in this thread....

http://www.simplemachines.org/community/index.php?topic=21787.msg173822#msg173822

thank,
Troy..

[Unknown]

How about the example?

<?php

error_reporting
(E_ALL);
@
ini_set('display_errors', 1);

// Call it once first because of a bug in Windows' Aspell.
pspell_new('en');

$test = pspell_new('en');

echo
'
  Testing pspell.... '
, pspell_check($test, 'thisisnotawordandyouknowit') ? 'failure' : 'pass', '.<br />
  If no error messages were displayed, Aspell is installed and working properly.'
;

?>


-[Unknown]

_complex

#33
Erm.. ???.

Weird..

http://so-thuggish.net/cgi-bin/k.php
http://so-thuggish.net/cgi-bin/pspell.php

when i go to

it doesn't work.. so i may have to get it setup again.. :-/..

_complex

AH! nevermind my host resolved this problem :D

Anubis

Ok, I tried back in RC1 to gget the spell check to work and ended up giving up but now I am really hoping to get it working because it has been giving me grief in the back of my mind for a while. First off

1) I am using a Windows server
2) I am not using Apache
3) I am the server host
3) I have already downladed aspell and installed it using a binary installer so it is in the program files dir
4) I am using PHP 4 and it works fine
5) I am using Aspell .50
6) I configured Aspell in PHP as per it's instructions (this really only consisted of making sure php_pspell.dll was in the \ext dir and making sure it was enabled in the php's ini file)
7) I do have the the library files and they are located in the C:\Program Files\Aspell\dict as per aspell's direction and when tested in the command prompt it all works fine

These are the most often replies given when ppl say they can't get it to work in the last 3 threads opened on this issue and the only things i can think of that are of any significants. The only thing I can think of is I believe I had to move the aspell files into the c:\php dir to get it to work right but it was a good while back and frankly I am not sure of that. I did try copying the dict dir into the php dir with no luck now the error I recieve is:

QuoteError 500

Internal Server Error

There is nothing that appears in my error logs on this issue. Any thoughts or info I left out?

[Unknown]

Are you using PHP as CGI or ISAPI?

Can I see a phpinfo?  What is phpinfo.php?

I run Windows, and was running IIS for a spell, and I got it working fine ;).

-[Unknown]

Anubis

I am running PHP as a CGI. I will pm you the link as I know phpinfo gives a little more info than I would like ppl to see. You can finish helping me here as when a resolution is found I want it to be were it can be used as a point of referance to anyone else with this issue.

[Unknown]

Hmm... first, I'd recommend you upgrade to the latest version of PHP.  You're running a slightly older version.

Are you willing to try setting it up to use ISAPI?

-[Unknown]

Anubis

I have never tried that before so i am unsure of how to go about doing that.

Advertisement: