Hi guys , one of my clients is having a issue which you can see at: http://moneyclicker5.co.cc/image.php It contains the error: Fatal error: Call to undefined function imagecreate() . I've looked around for a fix with very little help, PHPGD has no download links and the php site that says to do --with comes back saying there is no command . I've put in each php.ini ;extension=php_gd2.dll I have no idea now how an earth to fix it , im running latest CentOS Thanks
I may be missing something but remove the semicolon in front of the line. Semicolons mean ignore this variable which means if it looks like you listed above the GD library is never loaded.
It still sounds like PHP GD is not properly being loaded. You should not get a fetal error like that for any other reason than when the function is undefined. EDIT: Oh, I believe mobileappdoctor is right. Remove the semi colon. The semi colon is telling that line to be ignored.
this is script error, not server this error means that the function imagecreate is not yet called in the page. to better check define functions in the page
Hiya, I've just checked and on line 47 is: $image = "imagecreate"($width, $height) or die('Cannot initialize new GD image stream'); Code (markup):
There are a couple problems. If that is the exact code you should not have double quotes around the function call to the method but that is not what is causing this specific error. Next you mentioned being on CentOS but the loading for extension above is looking for a DLL file which would be windows. I also use CentOS and PHP 5.x and my ini doesn't have the extension referenced in it but I use GD all the time. If your using PHP 5 run the following command yum install php-gd see if that tells you it is already installed.
Loaded plugins: fastestmirror Repository lxlabsupdate is listed more than once in the configuration Loading mirror speeds from cached hostfile * openvz-kernel-rhel5: openvz-mirror1.rapidvps.com * openvz-utils: openvz-mirror1.rapidvps.com addons | 951 B 00:00 base | 2.1 kB 00:00 extras | 2.1 kB 00:00 lxlabslxupdate | 951 B 00:00 lxlabsupdate | 951 B 00:00 lxlabsupdate/primary | 62 kB 00:00 lxlabsupdate 198/198 openvz-kernel-rhel5 | 951 B 00:00 openvz-utils | 951 B 00:00 openvz-utils/primary | 2.8 kB 00:00 openvz-utils 8/8 update | 1.9 kB 00:00 Excluding Packages in global exclude list Finished Excluding Packages from centos-5-5 - lxlabslxupdates Finished Excluding Packages from centos-5-5 - lxlabsupdates Finished Setting up Install Process No package php-gd available. Nothing to do Code (markup):