2

I upgraded my php5 to php 7, after that i am getting following error while i am trying to install drupal 7.

enter image description here

I already tried to search and enable the "PHP Extension" findings are to install "apt-get install php5-gd" but mine is php7.

6
  • 1
    Run apt-cache search php7-* to find out the name of extension you need,something like php7.1-gd then apt-get install php7.1-gd Commented Feb 1, 2016 at 12:33
  • Thanks gd is installed successfully now. But still its showing the same error :( Commented Feb 1, 2016 at 13:03
  • sudo /etc/init.d/apache2 restart Commented Feb 1, 2016 at 13:09
  • oops, now its working. Thanks @Mihai Commented Feb 1, 2016 at 13:20
  • how does drupal 7 run with PHP7 ? what issues did you run into? Commented Apr 25, 2016 at 23:53

1 Answer 1

3

You must remove php7.1-gd and install php-7.0gd:

sudo apt-get remove php7.1-gd -y
sudo apt-get install php7.0-gd -y

Good luck! ;)

Sign up to request clarification or add additional context in comments.

2 Comments

For folks running PHP7.1 with D7, this answer is best! You must remove 7.1 and install 7.0 for the error to go away (restart apache also).
Same for PHP7.2. Removing php7.2-gd is not necessary. Just install php7.0-gd alongside it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.