At first this seemed like a simple task, download and install PSPELL, the PHP version of the ASPELL spell checking library.
I followed the instructions, however when I tried a simple php script, I received a 500 error. Checking the event logs showed:
Faulting application php-cgi.exe, version 220.127.116.11, time stamp 0x481b8f5f, faulting module aspell-15.dll, version 0.0.0.0, time stamp 0x3e03aab7, exception code 0×40000015, fault offset 0x00039f3d, process id 0×508, application start time 0x01cba287ec1ee8cf.
Not very helpful! After hours of searching and head scratching, I wondered what would happen if I ran it from the command line? Here’s the resulting error:
Unhandled Error: C:\aspell\dict/en-only.rws: The file "C:\aspell\data/iso8859-1.dat" is not in the proper format.
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application’s support team for more information.
It turns out that the dictionary files were in DOS format and needed to be in UNIX format! A quick “dos2unix” on all of the dictionary files fixed the problem.