Install pspell on Windows

Notes on configuring aspell/pspell with Windows PHP

Created by: Lester Caine, Last modification: 21 Oct 2006 (16:16 UTC)
Since the notes in the PHP manual seem a little lacking I though I'd include a note here on configuring the pspell functions in Windows PHP. This module is required in order to access the bnspell AJAX package from within bitweaver.

Download and Install ASpell Win32

It would be interesting to know if there is a later windows build of aspell, since this seems to be some 4 years old.
aspell win32
This gets iinstalled by running the installer, and puts the program in Program Files\Aspell\ by default. The aspell-15.dll needs copying to the windows execution path. The PHP directory is probably the tidiest place, but \system32 may be required. ( Need to check this now that I'm running )

Install a Dictionary / Dictionaries

Windows Dictionaries has a number of dictionaries for use with the package. I downloaded the English one, but need to check if I have British rather than American.
Running the dictionary installer copies all the files to the place that aspell was installed.

Enable the pspell extension

Getting the spelling right

<?php
extension
=php_pspell.dll
?>

needs adding to the php.ini directory to enable the package, and Apache needs restalling to pick it up.
This should give an single line entry in the phpinfo report for pspell that PSpell Support is enabled.

Test the installation

Copy the following code to a php page that you can run.

<?php
echo "Check Spelling Installation";
$pspell_link pspell_new("en");
print_r($pspell_link);
if (
pspell_check($pspell_link"colour"))
{ echo 
"This is a valid spelling"; }
else
{ echo 
"Sorry, wrong spelling"; }
?>

This confirms that the GB spellings are being used by my setup. Change the en to your selected language, and use an appropriate test word in the pspell_check statement.

PHP Functions

This allows the access to pspell fuctions in PHP

Related Items

Documentation » Tutorials

Tutorials to help you work out how something in bitweaver is done

  •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •  Anonymous  •  Array  •  Array  •  Array

Comments

by Arnaud HERVE, 13 Feb 2007 (14:59 UTC)
I wonder if this page could not be moved to another list, for more advanced users.

Maybe this documentation set should be kept for those who just want to use the GUI, and another set should be created for those who will manage the server software. That would also be useful concerning other features of PHP...

Good point of reference

by separatrix, 10 Jul 2007 (15:24 UTC)
Very useful information on setting up pspell for windows. Sometimes people just need to know where to download it, where to put the files and how to load it up.

thanx lot above instruction works nicely

by Flash, 10 Sep 2007 (06:36 UTC)
thanx lot above instruction works nicely

by El Conde, 18 Mar 2010 (21:14 UTC)
Thanks a lot. With this help I've got it working...

No updates to windows version of aspell

by Lester Caine, 23 Mar 2010 (09:13 UTC)
I have just been looking to upgrade the notes on installing aspell, having added it as an option in CKEditor package, but I find that these notes still apply and all the links work.

I will add some additional notes on using aspell with ckeditor later.