Nato Thorpe Nato Thorpe - 2 months ago 21
PHP Question

Where are the aspell libraries located on the server? How can I check for them?

I just switched to the cpanel servers with godaddy. I am completely integrated with pspell and it was working perfectly fine. now I get the following errors

Warning: pspell_new(): PSPELL couldn't open the dictionary. reason: No word lists can be found for the language "en".


This is my code

$pspell_config = pspell_config_create("en");
pspell_config_personal($pspell_config, "/home/user/public_html/custom.pws");
pspell_config_repl($pspell_config, "/home/user/public_html/custom.repl");
$pspell_link = pspell_new_config($pspell_config);

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.';


How can I located the language files on my servers or test for them? I called godaddy and they said that aspell is set up and I test my php and it says pspell is enabled .

Answer

After calling godaddy multiple time they finally told me that aspell hasn't been configured. But to answer the question. Your hosting company should know where to find the libraries. Further more you shouldn't even need to know where the directories are located. You should only need to call to the pspell with-in your php.ini file as follows:

extension=php_zip.dll
extension=aspell-15.dll
extension=php_pspell.dll

Most of the time you shouldn't even have to call these mods in your php.ini file, if the aspell and pspell is configured properly.