From:             wschalle at gmail dot com
Operating system: Windows 7, Windows Server 2008R2
PHP version:      5.3.23
Package:          Enchant related
Bug Type:         Bug
Bug description:Enchant fails to load any backends.

Description:
------------
This bug was introduced in 5.3.23. It also exists in 5.4.13. Both the CLI
and 
CGI 
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 
php 
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 
backends.

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__);
var_dump(enchant_broker_describe($broker));
var_dump(enchant_broker_get_error($broker));

Expected result:
----------------
array(2) {
  [0]=>
  array(3) {
    ["name"]=>
    string(6) "ispell"
    ["desc"]=>
    string(15) "Ispell Provider"
    ["file"]=>
    string(35) "C:\PHP-5.3.x\libenchant_ispell.dll"
  }
  [1]=>
  array(3) {
    ["name"]=>
    string(7) "myspell"
    ["desc"]=>
    string(16) "Myspell Provider"
    ["file"]=>
    string(36) "C:\PHP-5.3.x\libenchant_myspell.dll"
  }
}
bool(false)

Actual result:
--------------
NULL
bool(false)

-- 
Edit bug report at https://bugs.php.net/bug.php?id=64593&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=64593&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=64593&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=64593&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=64593&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=64593&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=64593&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=64593&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=64593&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=64593&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=64593&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=64593&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=64593&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=64593&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64593&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=64593&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=64593&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=64593&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64593&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=64593&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=64593&r=mysqlcfg

Reply via email to