Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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