Find the file called: php.ini on your server and follow below steps
With apache2 and php5 installed you need to make three changes in the php.ini file. First open the file for editing, e.g.:
sudo gedit /etc/php5/apache2/php.ini
Next, search for the post_max_size entry, and enter a larger number than the size of...
There's lots of info on the net on achieving that, but I found it a bit too scattered, and had to combine instructions from multiple sources.
I'm not certain it's the right way, but it worked?. So I'll share, and get your feedback in case I've done anything stupid:
Convert VMDKs...
How to access Ubuntu from Windows remotely
It sounds like you don't have the GD extension installed. I don't use Ubuntu any longer, but I think it may be named php5-gd, so you'd need to install that package and restart your webserver and it should then work.
Ubuntu 16.04 comes with PHP7 as the standard, so...