[BlueOnyx:01106] Re: Problem with PHP not using GD
Michael Stauber
mstauber at blueonyx.it
Wed Apr 22 20:07:56 -05 2009
Hi Chuck,
> >From my research, the problem is that PHP isn't compiled to use GD
> > graphics library. When my customer's script calls GD functions - I get
> > these errors in /var/log/httpd/error_log:
>
> [Thu Apr 16 20:41:26 2009] [error] [client xxx] PHP Fatal error: Call to
> undefined function imagecolorallocate() in
> /home/.sites/143/site2/web/securimage/securimage.php on line 479, referer:
> http://www.xxx.com/request_quote.php [Thu Apr 16 20:28:46 2009] [error]
> [client xxx] PHP Fatal error: Call to undefined function
> imagecreatetruecolor() in
> /home/.sites/143/site2/web/securimage/securimage.php on line 478, referer:
> http://www.xxx.com/request_quote.php
Create a test page with this code in it:
<? phpinfo(); ?>
Then look at that page and you'll see that the PHP-5.1.6 on BlueOnyx is
compiled with the bundled GD (2.0.28 compatible).
There are two ways of building a GD aware PHP: Native GD or bundled GD.
Native means: PHP uses the GD that's installed on the server.
Bundled means: PHP brings its own version of GD, which is independent from a
GD that may or may not be present on the server.
Bundled is usually preferred, as it means lot less hassles during builds and
upgrades - hence RedHat and CentOS chose that way.
It could be that the PHP security settings for that site (or the server in
general) are interfering with your script. But the PHP-5.1.6 you have should -
by itself - allow you to use that function in general.
--
With best regards
Michael Stauber
More information about the Blueonyx
mailing list