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";

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?

  • Is glib installed and working? I think there is a dependency in enchant for glib. – scotru Feb 8 '13 at 9:21
  • Thanks, glib was not installed. Just did now, but I am still getting this fatal error. – giorgio79 Feb 8 '13 at 9:28

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.