I get this error after using simple commands like php -i or php -v.
PHP Warning: PHP Startup: Unable to load dynamic library '
/usr/local/lib/php/extensions/no-debug-non-zts-20100525/imagick.so
' -libtiff.so.3
: failed to map segment from shared object: Cannot allocate memory in Unknown on line 0
Shell returns: Out of memory, and then writes error to the error_log
.
PHP version: 5.4.36
Apache version: 2.2.29
I've seen questions about similar problem, but most of them have a problem with reading a file from the right path, but I think this is not the case...
Why it cannot alocate memory? How do I fix this? Preferably without server restart :). I have access to php.ini
.
UPDATE:
I have both imagick.so and libtiff.so.3 in the right path.
After running ldd imagick.so
I get this warning:
ldd: warning: you do not have execution permission for `./imagick.so'
...
libtiff.so.3 => /usr/lib64/libtiff.so.3 (0x00007f0b0a0af000)
...
So files are on the right place, but I guess there is a permission problem... How do I fix this?
Thank you!