1

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?

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

1 Answer 1

1

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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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