php enable gd code example Example 1: Install or enable PHP's gd extension apt-get install php-gd Example 2: instal phpgd2 sudo apt-get install php5-gd