To enable the GD extension in PHP, you will need to install the extension and then enable it in your PHP configuration file.
Here is an example of how you can add text to an image using the PHP GD library:
There could be a few reasons why the imagecreatefromjpeg function and similar functions are not working in your PHP script.
To install the php70-gd package on Ubuntu, you will need to have the package manager apt-get installed.