Centos – PHP Fatal error: Call to undefined function enchant_broker_init() – enchant not found

centosPHP

I have php 5.3.10 (and CentOS 6) and as I understand enchant automatically comes with it. When I try to run an example like

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

I get this php fatal error: PHP Fatal error: Call to undefined function enchant_broker_init()

I can also see this in my php configure command outputted with phpinfo

-with-enchant=shared,/usr' '–with-recode=shared,/usr'

Do I need to add sg perhaps to php.ini?

Best Answer

Ok, looks like I was naive when I read somewhere that enchant comes packaged with php above 5.3 I still had to

yum install php-enchant enchant hunspell

Related Topic