how can I install pspell in php5/ubuntu?

后端 未结 4 1408
无人共我
无人共我 2021-02-05 10:58

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 setti

相关标签:
4条回答
  • 2021-02-05 11:49

    "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.

    0 讨论(0)
  • 2021-02-05 11:52

    Have you configured php.ini to load the extension?

    0 讨论(0)
  • 2021-02-05 12:00

    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 with the following command

    sudo service apache2 restart 
    

    it will be added automatically to your php.ini

    you can try this example

    0 讨论(0)
  • 2021-02-05 12:01

    For those using PHP 7.2 / Ubuntu 18.10, here is what I did to get PSPELL working:

    sudo apt-get install php5-pspell
    sudo apt-get install php-pspell
    sudo apt-get install aspell-en
    sudo apt-get install aspell-fr
    sudo apt-get install aspell-de
    sudo apt-get install aspell-es
    sudo service apache2 restart 
    

    I use multiple languages, so included some of them in the example above. I believe EN is included by default.

    0 讨论(0)
提交回复
热议问题