Reputation: 331
I want to use enchant in my PHP code (I am running WAMP server). I have enabled enchant extension in php.ini and I also added PHP path to system variables. When I start the server it shows the following error
PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_enchant.dll - The specified procedure could not be found
but I have php_enchant.dll placed in this directory.
Each time when I run the code I get fatal error:
Fatal error: Call to undefined function enchant_broker_init()
So whats wrong with enchant, why it is not working?
Upvotes: 1
Views: 1331
Reputation: 55
I fixed like:
Using the wampmanager (the W icon in the system tray ) do
left click wampmanager -> Apache -> Version -> (and click on the version number)
This will cause wampmanager to rebuild all the SYMLINKS in the apache/bin folder, and restart Apache. This should fix the issue and stop the errors from appearing in the php error log.
IF NOT:
TO CORRECT THE SECOND ISSUE
Edit the \wamp\script\config.inc.php file and find the code that sets this variable $phpDllToCopy and replace it with this code.
$phpDllToCopy = array (
'icudt52.dll', //[modif oto] - Ajouts pour éviter unknown error PHP 5.6.a2
'icuin52.dll',
'icuio52.dll',
'icule52.dll',
'iculx52.dll',
'icutest52.dll',
'icutu52.dll',
'icuuc52.dll',
'icudt51.dll', //[modif oto] - Ajouts pour éviter unknown error PHP 5.5.6
'icuin51.dll',
'icuio51.dll',
'icule51.dll',
'iculx51.dll',
'icutest51.dll',
'icutu51.dll',
'icuuc51.dll',
'icudt50.dll', //[modif oto] - Ajouts pour éviter unknown error PHP 5.5
'icuin50.dll',
'icuio50.dll',
'icule50.dll',
'iculx50.dll',
'icutest50.dll',
'icutu50.dll',
'icuuc50.dll',
'icudt49.dll', //[modif oto] - Ajouts pour éviter unknown error PHP 5.3/5.4
'icuin49.dll',
'icuio49.dll',
'icule49.dll',
'iculx49.dll',
'icutest49.dll',
'icutu49.dll',
'icuuc49.dll',
'libeay32.dll',
'libsasl.dll', //[modif oto] - Ajout pour éviter unknown error
'libintl.dll',
'php5isapi.dll',
'php5nsapi.dll',
'ssleay32.dll',
'php5ts.dll',
'fribidi.dll', //[modif oto] - Ci-contre et dessous pour PHP 5.2.x
'fdftk.dll', // Peuvent être supprimés pour PHP 5.3.0 ou plus
'libmcrypt.dll',
'libmhash.dll',
'libmysql.dll',
'libmysqli.dll',
'msql.dll',
'ntwdblib.dll',
'php5activescript.dll',
);
Upvotes: 1