php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33780 Adding dictionaries to Aspell forces recompilation of PHP
Submitted: 2005-07-20 06:32 UTC Modified: 2005-07-20 10:16 UTC
From: phpbugs at w-wins dot com Assigned:
Status: Not a bug Package: Pspell related
PHP Version: 5.1.0b3 OS: GNU/Linux (Crux 2.1)
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: phpbugs at w-wins dot com
New email:
PHP Version: OS:

 

 [2005-07-20 06:32 UTC] phpbugs at w-wins dot com
Description:
------------
Using PHP 5.1.0b3 with the configure line

./configure --with-pear --with-pgsql --with-config-file-path=/etc --with-apxs2=/usr/apache2/bin/apxs --with-pspell --enable-ftp --enable-mbstring --enable-soap --with-gd --with-zlib --with-openssl --enable-gd-native-ttf --with-readline --with-gmp --with-ncurses

and GNU Aspell 0.60.3

When I install new dictionaries, Aspell picks them up at once, and can use them without any recompilation, but when I try to use the language in PHP I get a warning from the Pspell module. When I recompile PHP, the new dictionary becomes available without errors.

I assume the PHP Pspell module determines dictionaries at compile time, and I don't know whether this is intended behaviour, whether there is some good reason for it, or if it's simply a bug. Either way I would much like it if I was able to install (and uninstall) dictionaries without recompiling anything but the actual dictionaries.

Reproduce code:
---------------
<?php
$p=pspell_new('no');
$res=pspell_check($p,'sinnatag');
var_dump($res);
?>


Expected result:
----------------
bool(true)


Actual result:
--------------
Warning: pspell_new(): PSPELL couldn't open the dictionary. reason: No word lists can be found for the language "no".  in - on line 2

Warning: pspell_check(): 0 is not a PSPELL result index in - on line 3
bool(false)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-20 10:16 UTC] sniper@php.net
Try shutting down Apache after you install new dictionary.
OR instead of pspell_new() use this:

$pconfig = pspell_config_create("en");
$p = pspell_new_config($pconfig);

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC