Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

Is glib installed and working? I think there is a dependency in enchant for glib.

share|improve this answer
    
Thanks, glib was not installed. Just did now, but I am still getting this fatal error. –  giorgio79 Feb 8 '13 at 9:28
    
@scotru: This should be a comment, not an answer. –  Sven Feb 8 '13 at 12:53

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

 
discard

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.