Installation of PHP GD library before check the php version to install GD library.
Update the packages list available in the repositories by executing second command before that run the first command "php-v" to check which version currently running.
It may take small bit of time otherwise its depend or dependencies of library need to update.
Now, Verification of GD library installation, Restart apache web service by below command.
Create index2.php with the code <?php phpinfo(); ?>.
Update the packages list available in the repositories by executing second command before that run the first command "php-v" to check which version currently running.
$ php -v
For PHP 5:$ apt-get update
apt-get install php5-gd
For PHP7.0 use (php7.1-gd, php7.2-gd and php7.3-gd are also available):$ sudo apt-get install php7.0-gd
Now, Verification of GD library installation, Restart apache web service by below command.
$ sudo service apache2 restart
Now let's go to the server root directory, by default it is /var/www/html/. Create index2.php with the code <?php phpinfo(); ?>.
$ cd /var/www/html/
$ sudo nano index2.php
Add this code to the file
after CTRL+X for save the file and accept the YES.
<?php phpinfo(); ?>
Now, run the localhost in browser,
http:/localhost/index2.php
Now,can view the php and gd library installed the details.
No comments:
Post a Comment