tags:

views:

432

answers:

3

I am trying to install pspell for PHP 5 in Ubuntu. I have installed the aspell library which is required to run pspell as shown here

I am not sure if there are any settings I need to change, etc.

When I try to execute the below mentioned line of code

$pspell_link = pspell_new("en");

I get an error

Fatal error: Call to undefined function pspell_new()

Any idea on what could be wrong ?

Any help greatly appreciated.

A: 

"I have installed the aspell library which is required to run pspell as shown here"

  • that's if you compile your own PHP - did you recompile with pspell?

Note that this package just provides the API and data, you are getting an error becuase your PHP doesn't know how to interface with it.

If you're not into building your own code, the PHP extension is available as a package:

(NB this is JUST the PHP side of the service)

http://packages.ubuntu.com/source/dapper/php-pspell

C.

symcbean
A: 

Have you configured php.ini to load the extension?

Htbaa
+4  A: 

just do

sudo apt-get install libpspell-dev 
sudo apt-get install php5-pspell
sudo apt-get install aspell-en

then restart your apache2 server

sudo services apache2 restart

it will be added automatically to your php.ini

you can try this example

sohaibafifi
Got it working . Thanks a bunch guys.
Azy
Then please mark this as an answer.
Htbaa