I just installed Aspell on my computer so I could run the pspell extension. The installation of Aspell and the english dictionary went fine. I also configured my php.ini so that pspell php dll would work. I copied the pspell and aspell dlls to my system 32 folder. Then I copied all the files from the dict directory into the system 32 folder. Then I copied the whole aspell directory into my system 32 folder. I then used this script to test:

<?php
$pspell_link = pspell_new("en");

if (pspell_check($pspell_link, "testt")) {
   echo "This is a valid spelling";
} else {
   echo "Sorry, wrong spelling<br />";
   $suggestions = pspell_suggest($pspell_link, "testt");

   foreach ($suggestions as $suggestion) {
       echo "Possible spelling: $suggestion<br />";
   }
}

?> 

This script worked the first time, but when I reloaded, it came up with this error:

Warning: PSPELL couldn't open the dictionary. reason: No word lists can be found for the language "en". in C:\xampp\htdocs\pspell_test.php on line 2

I checked the phpinfo() and Pspell is installed properly. What's more, when I restart Apache, the script works, but then fails on reload. This problem is in both Mozilla 1.6 and IE6.

I am on Windows 2000, running PHP 4.3.4, Apache 2.0.48, and the latest version of Aspell.

What do you think my problem is and how can I fix it?

    16 days later

    I tried adding this line to the code, at the top:

    dl('php_pspell.dll');

    It didn't work. In fact, I've tried a lot of things, most of them very stupid now that I think of it. I am now extremely puzzled and frustrated. Aspell is working fine. I can drop any text file over it and it works.

    Is this an installation problem or a coding problem? What is the problem?

    You help is very much appreciated.

    -Merve

      13 days later

      Okay, I'm marking this thread resolved. After installing the IMAP extension, Pspell started magically working, all the time, just like that! I'm confused, but I'll just let it be... any ideas as to what this could be?

      Maybe the solution to everybody's Pspell/Aspell installation woes is to install the IMAP extension (which also seems to be working fine for me....)

        Write a Reply...