The PHP GD module is required by many HTTP-driven services in order to render, convert and generally process image files.
The Cydia package phpgd
provides the libgd.so
extension and enabled it in the /usr/lib/php.ini
configuration file.
After installing the phpgd
package, make sure that the extension is enabled. The file /usr/lib/php.ini
must contain a line:
extension=gd.so
that tells PHP to load the gd.so
extension.
The next step would be to restart lighttpd
in order to make sure that php-cgi
is restarted.
In order to test that gd support is enabled, you can create a php
file in your web-root called phpinfo.php
with the following contents:
<?php phpinfo(); ?>
Then, by pointing your browser to your iOS device, for example http://192.168.1.10/phpinfo.php
, you should see a page containing the various PHP parameters as well as all enabled modules.
To check that the PHP gd
module is working, search the document for gd
section. If the gd
module is working, it should look like this:
The alternative to using the PHP gd
module is to use Imagemagick. However, Imagemagick chews a lot of memory that is barely noticeable under a desktop system but unsuitable for a VPS or mobile device.