• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 491
  • Last Modified:

PHP Warning Startup Error - Unable to load dynamic library

i just upgrade my php from 5.3 to 5.4. when i type php -v i get the following error:

[root@server extensions]# php -v
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.4.39 (cli) (built: Apr 16 2015 14:12:04)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

[root@server extensions]# php -m
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mcrypt
mhash
mysql
mysqli
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]


imagick.so is located in /usr/local/lib/php/extesions/no-debug-non-zts-20090626/ if i rename the directory to no-debug-non-zts-20100525 i get the following error or cp the .so file to that new folder name i get the following error:
[root@server admin]# php -v
PHP Warning:  PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0
PHP 5.4.39 (cli) (built: Apr 16 2015 14:12:04)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
0
AfternoonShift
Asked:
AfternoonShift
  • 4
  • 3
2 Solutions
 
AfternoonShiftAuthor Commented:
i reinstalled the extension, but now i get the error as above.

[root@server bin]# php -v
PHP Warning:  PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0
PHP 5.4.39 (cli) (built: Apr 16 2015 14:12:04)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
0
 
Dave BaldwinFixer of ProblemsCommented:
You have to remove the imagick extension from your 'php.ini' until you can find one that is compiled with the same compiler / API.
0
 
AfternoonShiftAuthor Commented:
i had to recompile imagick.

./configure --with-imagick=/usr/local>
make
make install

which fixed my error.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Dave BaldwinFixer of ProblemsCommented:
Good for you.
0
 
AfternoonShiftAuthor Commented:
Thanks for the help dave.
0
 
Dave BaldwinFixer of ProblemsCommented:
You're welcome!
0
 
AfternoonShiftAuthor Commented:
fixed the error which some troubleshooting.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now