Categories
FreePBX Knowledge Base

FreePBX EPM Whoopsing

We have seen on some installations of FreePBX with EPM that when you upload a photo it Whoops when trying to rebulid the config.

The clue to whats happening is that it cant call function imagecreatefromjpeg or imagecreatefrompng depending on your file format

The most common cause of this is php-gd isnt installed. To Check this is simple, create a simple PHP file in the web root called phpcheck.php add the following to it:

phpcheck.php

<?php
if (extension_loaded('gd') && function_exists('gd_info')) {
    echo "PHP GD library is installed on your web server";
}
else {
    echo "PHP GD library is NOT installed on your web server";
}
?>
<?php phpinfo(); ?>

Now browse in your favourite browser to this and it will show at the top if gd is installed or not.

If its not and php was installed via yum then :

yum search php-gd
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirrors.clouvider.net
 * extras: mirrors.clouvider.net
 * updates: mirror.sov.uk.goscomb.net
=============================================================== N/S Matched: php-gd ================================================================
php-gd.x86_64 : A module for PHP applications for using the gd graphics library

Will show if its avalible. (your version of PHP may mean this is different for you) then to install yum install php-gd and restart the httpd service

You should now be able to go to phpcheck.php again and it should show as installed. if it does you are good to go installing screen images for phones