Question

php 5.5.3 php-gd: Unable to load dynamic library '/usr/lib64/php/modules/gd.so'

  • Posted on August 27, 2013
  • reneAsked by rene

Hey there,

Ive got a droplet with 512MB ram and when i try to execute php, i get the following error:

PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/gd.so’ - libvpx.so.0: cannot map zero-fill pages: Cannot allocate memory in Unknown on line 0

When i upgrade to a 1.024mb droplet all is well, but its a bit weird that i need 1024mb just to use php-gd. I remember installing php on one of my first computers with just 128mb of internal ram. With php-gd (it was php4 so i imagine a bit smaller but this is just weird)

Does anyone have a suggestion? I am running on CentOS 6.4/64bit with a NGINX webserver and mysql, ive used this REPO http://www.if-not-true-then-false.com/2011/install-nginx-php-fpm-on-fedora-centos-red-hat-rhel/

My version: PHP 5.5.3 (cli) (built: Aug 21 2013 18:12:49) Copyright © 1997-2013 The PHP Group Zend Engine v2.5.0, Copyright © 1998-2013 Zend Technologies

anyone an idea?

Thanks!!!


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

You might be loading large images using the php5-gd module which is causing your system to run out of memory.

tnx, this worked! <br> <br>but still i have over 250mb internal free, why am i running out of memory :S

Your droplet is running out of memory, try adding swap: <br> <br>https://www.digitalocean.com/community/articles/how-to-add-swap-on-centos-6