Yii 2 giving an exception when clicking on the default contact tab

As suggested in the comments.

The contact form contains a .png picture in the form of a captcha image. The captcha image is used there to prevent spam being send via the contact form.

  • You can edit the view page and remove the captcha
  • You can install php-gd or php-imagick extension

For solve problem, first install php-gd module on your system. After that open php.ini on your editor and search for ;extension=gd.so and remove the heading ; sign. Then restart your apache service ;).

For Arch Linux you can do followings (Lines that begins with # are command of terminal):

  • # pacman -S php-gd
  • # vim /etc/php/php.ini
  • Press / and type gd then press Enter
  • Find ;extension=gd.so and convert it into extension=gd.so by moving cursor on ; sign and press x
  • Press Esc and type :wq and press Enter
  • # systemctl restart httpd.service

With this two lines it is okeyokay:

sudo apt install php-gd

sudo service apache2 restart

Tags:

Php

Yii

Yii2