0

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!

Boy
  • 1,182
  • 2
  • 11
  • 28
  • Is imagick installed? – hjpotter92 Nov 19 '15 at 10:48
  • @hjpotter92 Yes, I believe it is. I have uncommented this line: extension="imagick.so" in php.ini – Boy Nov 19 '15 at 10:51
  • @hjpotter92 Do you have anything in mind about how to fix this? Shell returns Out of memory for many commands that im trying to run... Please help :( – Boy Nov 19 '15 at 11:26
  • Don't think it's a permissions problem, the warning is okay with ldd. Have you tried this: [PHP Warning: PHP Startup: Unable to load dynamic library '…' failed to map segment from shared object: Cannot allocate memory in Unknown on line 0](http://stackoverflow.com/questions/16981347/php-warning-php-startup-unable-to-load-dynamic-library-failed-to-map-seg) – Gilly Nov 19 '15 at 12:29

0 Answers0