php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16002 imagecreatetruecolor not recognizing create version of GD library
Submitted: 2002-03-11 15:55 UTC Modified: 2002-05-11 00:00 UTC
Votes:6
Avg. Score:4.7 ± 0.7
Reproduced:5 of 5 (100.0%)
Same Version:1 (20.0%)
Same OS:2 (40.0%)
From: dlaur at dechow dot net Assigned:
Status: No Feedback Package: GD related
PHP Version: 4.1.1 OS: Red Hat Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dlaur at dechow dot net
New email:
PHP Version: OS:

 

 [2002-03-11 15:55 UTC] dlaur at dechow dot net
I rent my server from a virtual host so I do not have much control over the server.  This might not be a bug but a error in them compiling it but it should be reported just in case.

I had a script that was working that used imagecreatetruecolor with a older version of PHP, I think it was two versions back.
Anyway, my server updated to php 4.1.2 and it 2.01 of GD and after that my script would only return this error.


Fatal error: imagecreatetruecolor(): requires GD 2.0 or later in /home/member/public_html/website/admin/imgfunctions.php on line 39

As I said it is a virtual server but phpinfo produced this,

 './configure' '--with-mysql' '--with-apache=../apache_1.3.23' '--enable-track-vars' '--with-gd=/usr/gd-2.0.1' '--with-jpeg-dir=/usr' '--with-png-dir=/usr/local/lib' '--with-zlib-dir=/usr/local/include'

This might not be a bug but an error in my server compiling the latest version of PHP.

Please email me at dlaur@dechow.net if an error is obvious that you can see that I can't and I will contact my host and see if that is the problem and then this bug report can be closed.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-12 09:50 UTC] md5ander at hotmail dot com
i got the same errors with the precomiled win32 version of php 4.1.2.

Fatal error: imagecreatetruecolor(): requires GD 2.0 or later in c:\www\scripts\cddb_appl\crop.php on line 46

Is there a fault in the config file (i.e. should php.ini:extension=php_gd.dll read php_gd2.dll?) or what?
 [2002-03-12 10:02 UTC] dlaur at dechow dot net
Here is an update from my server.
Sorry guys that I do not have my own server but this is all I can do to track this down.
I am working on getting my own server up locally to test this but haven't had luck yet.

Here is the comments from my server host.

We have been attempting to correct this problem today by re-compiling PHP and GD, but to no avail at this point.  For some unknown reason the GD test programs won't even work because of the gdImageCreateTrueColor problems (yet GD compiles fine).
 [2002-03-12 11:56 UTC] dlaur at dechow dot net
Duplicated the error on a new dedicated server account that I have.

This one is running version 4.1.1.

Same error:
Fatal error: imagecreatetruecolor(): requires GD 2.0 or later in /www/apache/htdocs/starsguitars/admin/imgfunctions.php on line 39

Here is the configuration

 './configure' '--with-apxs=/www/apache/bin/apxs' '--with-config-file-path=/usr/local/apache/conf/' '--with-mysql=/usr/local/mysql' '--enable-debug=no' '--enable-track-vars' '--enable-magic-quotes' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr' '--with-png-dir=/usr/lib' '--with-pear' '--with-curl' '--with-zlib-dir=/usr/lib' '--with-ttf' '--enable-gd-native-ttf' '--with-xml' '--with-openssl'
 [2002-04-10 02:27 UTC] mark at ikend dot com
I have a dedicated box with full control over it, and I'm having essentially the same problem but with this and other GD functions.

I first encountered this problem when I was trying to get ImageFilledArc() to work, but just to check, I tried using ImageCreateTrueColor() and got the same error.  I'm thinking that whoever looks at this might want to look beyond just this function and perhaps at something related to version detection?  Either way, this problem seems to have it's roots deeper than just this function.

My system and problem stats are bascially the same as previous comments.  PHP version 4.1.2, GD 2.0.1, Red Hat Linux, a happy configure line with the right GD source, etc.

Interestingly, PHPInfo() says I'm using GD version "1.6.2 or higher" whatever that means.

I'm more than glad to help out if anyone has any unique ideas they'd like me to try.  I'd really love to get those nifty arc and elipse functions working!
 [2002-04-10 06:37 UTC] wez@php.net
That's due to a slight error in the GD library detection
in PHP.
Try PHP4.2RC2 www.php.net/~derick.
Also, I recommend applying this patch to the GD 2.0.1
sources if you want to do anything real with it:
http://thebrainroom.com/opensource/php/

 [2002-05-11 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2006-12-03 23:46 UTC] eip at seznam dot cz
Dedicated servers are single, high performance computers professionally configured to meet your needs. Hire of dedicated server is more flexible than any shared hosting solution as you have full control over the machine and nothing threatens the availibility of your data. As a result, <a href=http://www.dedicated4u.com>dedicated servers</a> offer larger return on investment.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 06:01:29 2024 UTC