Amazon EC2 - PHP GD image library

后端 未结 4 1896
南方客
南方客 2021-02-19 11:52

I\'ve got a brand new install of WordPress setup and activated a custom-built theme along with a good amount of plugins. In the posts, I have built it so the user can create a p

相关标签:
4条回答
  • 2021-02-19 12:15

    to avoid compatibility problems first do:

    php --version
    

    to know your php version

    the answer is something in the form PHP X.Y.Z

    so you have to take X, Y and do:

    sudo yum install phpXY-gd
    

    for instance if php --version says PHP 5.5.26

    you will do:

    sudo yum install php55-gd
    
    0 讨论(0)
  • 2021-02-19 12:20

    In my case, I was getting error like there is version conflict between different versions of php-common when I entered "yum install php-gd" so I checked my php version using "php -v" in shell and then installed the corresponding gd using "yum install php56-gd" because I had php 5.6 installed in my machine.

    Hope someone will get help from this.

    Cheers

    0 讨论(0)
  • 2021-02-19 12:22

    I'm guessing you have some type of Linux installed, probably Ubuntu or CentOS.

    Ubuntu: sudo apt-get install php5-gd CentOS: sudo yum install php-gd

    You probably have to restart Apache afterwards: service httpd restart or service apache2 restart -- the names differ from distribution to distribution.

    Let me know if this works!

    0 讨论(0)
  • 2021-02-19 12:32

    In my case of ec2 server running Amazon Linux 2 with php version 7.2.24, following was the sequence:

    sudo yum install php-gd
    

    But event after repeat server restart with

    sudo systemctl restart httpd
    

    it was not working unless I rebooted with

    sudo reboot
    
    0 讨论(0)
提交回复
热议问题