John Davidson

spell checking - PHP 8 - Enchant not working - Broker returns an empty array

0 comments
Message:


I am using PHP 8 on Xampp (Windows)


Have added extension=php_enchant.dll to php.ini




  • php directory added to windows PATH

  • copied libenchant_hunspell.dll / libenchant_ispell.dll / libenchant_myspell.dll to [php]/lib/enchant

  • moved *.dic & *.aff to [php]/share/myspell/dicts


But still cannot get Enchant to detect Brokers


sample code


<?php
$broker = enchant_broker_init();
$tag = 'en_US';

$bprovides = enchant_broker_describe($broker);
echo "Current broker provides the following backend(s):\n";
print_r($bprovides);

Output


Current broker provides the following backend(s): Array ( ) Current broker provides the following dictionaries: Array ( )


My Answer:
to [php]/lib/enchant/dicts__Restarted Apache and checked phpinfo() to confirm Enchant is enabled__However, when I try to use Enchant in my code, the broker returns an empty array__I have tried different dictionaries and languages, but still no luck__Any suggestions on how to troubleshoot this issue?

Rate this post

3 of 5 based on 8509 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us