Jump to content

PHP Spell Check Error


dhaval_83

Recommended Posts

hey guys,

 

i have one serious problem and cant find solution.

 

I have downloaded class for spell check. and while running the file i m getting error like:

 

Fatal error: Call to undefined function pspell_new()

HP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_pspell.dll' - The specified module could not be found. in Unknown on line 0

 

i looked in to ext folder and the dll is there, in php.ini dll is already open like ext = php_pspell.dll and still getting error.

 

Please give me solution...

 

Thanks

Dhaval

Link to comment
https://forums.phpfreaks.com/topic/47187-php-spell-check-error/
Share on other sites

How are you returning the function? (code wise)

 

$pspell_link = pspell_new("en");

$check = $_POST['words'];

$needle = "http";

$allWords = explode("~", $check);

$results;

foreach ($allWords as $word) {

if($word != strtoupper($word)){ //ignore all upper case words

if (!pspell_check($pspell_link, stripslashes($word))) {

$suggestions = pspell_suggest($pspell_link,$word);

$allSugs = implode("~",$suggestions);

$results .= $word."~" . $allSugs . "$$";

}

}

}

echo "results=".$results;

Link to comment
https://forums.phpfreaks.com/topic/47187-php-spell-check-error/#findComment-230132
Share on other sites

Hey guys

 

 

i am writing steps what i did to install...

 

System: Windows, Server: IIS

 

1. install aspell

2. download dictionary (English)

3. copy aspell-15.dll from /bin directory of aspell and paste it to C:\PHP and C:\WINNT\SYSTEM32\

4. php.ini add extension = php_pspell.dll

5. run Spellcheck.php with

$int = pspell_new("en", "", "", "",(PSPELL_FAST|PSPELL_RUN_TOGETHER));

if (!pspell_check($int, $value))

return true;

else

return false;

 

but this code is also not working, i am taking the words from textarea one by one and check with this but no result the pspell_new is also not working because if i print something below $int = pspell_new("en", "", "", "",(PSPELL_FAST|PSPELL_RUN_TOGETHER)); like echo "hi"; it doesnt show me "hi" while running page.

 

please let me know...

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/47187-php-spell-check-error/#findComment-235762
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.