How do I go about enabling GD Support in a CentOS Installation?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
With CentOS 6.5+ and PHP 5.5:
If you get an error like:
cannot map zero-fill pages: Cannot allocate memory in Unknown on line 0
, it could be because you don't have a swap file. I suggest you take a look at the tutorial mentioned in this answer: https://stackoverflow.com/a/20275282/828366Tutorial: https://www.digitalocean.com/community/articles/how-to-add-swap-on-centos-6
sudo yum install php-gd
Put the command
and restart the server (httpd, nginx, etc)
For PHP7 on CentOS or EC2 Linux AMI:
CentOs 6.5+ & PHP 5.6:
The thing that did the trick for me eventually was:
and then restart apache: