|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64593 Enchant fails to load any backends.
Submitted: 2013-04-05 19:41 UTC Modified: 2013-04-09 16:46 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: wschalle at gmail dot com Assigned: ab (profile)
Status: Closed Package: Enchant related
PHP Version: 5.3.23 OS: Windows 7, Windows Server 2008R2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: wschalle at gmail dot com
New email:
PHP Version: OS:


 [2013-04-05 19:41 UTC] wschalle at gmail dot com
This bug was introduced in 5.3.23. It also exists in 5.4.13. Both the CLI and 
SAPIs are affected.

When the enchant broker is initialized, it seems to silently fail to load the 
backends. Enchant_broker_get_error returns false, and nothing is logged to the 
error log or the system event viewer. 

I tested this with the public win32 VC9 NTS zips of PHP. I verified that 5.3.22 
works as expected, with enchant_broker_describe listing both ISPELL and MYSPELL 

Looking at the diffs from 5.3.22 to 5.3.23, the most likely culprit seems to be 
either the win32 registry.c change, or maybe the directory changes. Either way, 
downgrading to 5.3.22 is currently still a viable workaround.

Test script:
$broker = enchant_broker_init();
enchant_broker_set_dict_path($broker, ENCHANT_MYSPELL, __DIR__);

Expected result:
array(2) {
  array(3) {
    string(6) "ispell"
    string(15) "Ispell Provider"
    string(35) "C:\PHP-5.3.x\libenchant_ispell.dll"
  array(3) {
    string(7) "myspell"
    string(16) "Myspell Provider"
    string(36) "C:\PHP-5.3.x\libenchant_myspell.dll"

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-04-09 13:07 UTC]
Put the plugin dlls should load if you put them into <php dir>\lib\enchant.
 [2013-04-09 13:07 UTC]
-Status: Open +Status: Feedback
 [2013-04-09 13:40 UTC] wschalle at gmail dot com
Putting the DLLs in <php_dir>\lib\enchant works.
 [2013-04-09 13:40 UTC] wschalle at gmail dot com
-Status: Feedback +Status: Open
 [2013-04-09 14:01 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: ab
 [2013-04-09 14:01 UTC]
Great, thanks for checking.

With the dicts you could also use the enchant_broker_set_dict_path() or just put the dicts into  <php dir>share\myspell\dicts.
 [2013-04-09 15:05 UTC] wschalle at gmail dot com
Any idea why this broke between 5.3.22 and 5.3.23?

We tend to put dict files in the app, because some instances use different 
 [2013-04-09 15:26 UTC]
libenchant loads all the *.dll it can find in the plugin dir and discards those being not a plugin. That's why one could see some startup warnings in previous versions, as it was <php dir>. Now it loads from a separate path where only the plugins should be. I'd see it more like an improvement. That should be documented though, mood for that? :)
 [2013-04-09 16:46 UTC] wschalle at gmail dot com
That makes sense, but where was this change even made? Public releases of PHP 
should have the libs in the right places when you unzip them...
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 22 23:01:31 2024 UTC