Page 1 of 1

Please Help me out

Posted: Wed Apr 25, 2007 2:18 am
by dhaval_83
Hey All

i have installed Aspell-0-50-3-3-Setup.exe and Aspell-en-0.50-2-3.exe for Win32 system
i have done all configuration which are required for aspell-15.dll and php.ini extension = php_pspell.dll
i have set system variables for dictionary folder and bin folder
I have done written the code like this now i am getting error like this in you given code.

the code is:
<?php
function spell_check ( $string, $misspelled = array (), $return = array () )
{
$words = preg_split ( '/[\W]+?/', $string );

// we use the following (2) functions instead of pspell_new()
// reset the dictionary path, Aspell will look at the system environment Path
// anytime pspell_new_config() is called, over-riding the default hard-coded values

$config = pspell_config_create ( 'en_US', '', '', 'utf-8' );

$int = pspell_new_config ( $config );

foreach ( $words as $value )
{
if ( ! pspell_check ( $int, $value ) )
{
$misspelled[] = $value;
}
}

foreach ( $misspelled as $value )
{
$return[$value] = pspell_suggest ( $int, $value );
}

return $return;
}

print_r ( spell_check ( 'the hetel was raelly baad' ) );

?>


And The error is:



CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

abnormal program termination
Unhandled Error: C:\Program Files\Aspell\dict/en-only.rws: The file "C:\Program Files\Aspell\data/iso8859-1.dat" is not in the proper format.

Posted: Sat Apr 28, 2007 10:14 am
by feyd
duplicated post; non-use of tag highlighter. locked.