php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20122 Error while compile PHP with GD 2.04
Submitted: 2002-10-27 11:50 UTC Modified: 2002-10-27 13:57 UTC
From: atz at atz dot msk dot ru Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.3.0-pre1 OS: FreeBSD 4.7-STABLE
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: atz at atz dot msk dot ru
New email:
PHP Version: OS:

 

 [2002-10-27 11:50 UTC] atz at atz dot msk dot ru
I have downloaded last PHP version: php4-STABLE-200210270600
My configure line is:
./configure  
--cache-file=/dev/null
--enable-sockets
--enable-gd-native-ttf
--with-gd=/usr/local
--with-jpeg-dir=/usr/local
--with-png-dir=/usr/local
--with-pgsql=/usr/local/pgsql
--with-freetype-dir=/usr/local
--with-t1lib=/usr/local
--with-zlib=/usr/local
--without-mysql
--with-apache=../apache_1.3.27
--enable-track-vars                                  

configure has passed successfully

When I try to "make", I have received the following error string

In file included from gd.c:83:                         
gd_ctx.c: In function `_php_image_output_ctx':         
gd_ctx.c:70: structure has no member named `free'      
gd_ctx.c:98: structure has no member named `free'      
gd.c: In function `_php_image_type':                   
gd.c:1014: structure has no member named `free'        
gd.c:1017: structure has no member named `free'        
gd.c: In function `_php_image_create_from':            
gd.c:1209: structure has no member named `free'        
*** Error code 1                                       
                                                       
Stop in /usr/distfiles/php4-STABLE-200210270600/ext/gd.
*** Error code 1                                       
                                                       
Stop in /usr/distfiles/php4-STABLE-200210270600/ext/gd.
*** Error code 1                                       
                                                       
Stop in /usr/distfiles/php4-STABLE-200210270600/ext.   
*** Error code 1                                       
                                                       
Stop in /usr/distfiles/php4-STABLE-200210270600.

My version og GD is latest - 2.04 !!! (pay your attention)
In gd.c in header "This source file is subject to version 2.02 of the PHP ..."

You know about latest release GD 2.04?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-27 11:52 UTC] derick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the original bug instead.

Thank you for your interest in PHP.
 [2002-10-27 12:55 UTC] neuman_peter at hotmail dot com
here is patch for the current CVS PHP:

Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.1 php4/ext/gd/gd.c:1.2
--- php4/ext/gd/gd.c:1.1	Sun Oct 27 19:27:59 2002
+++ php4/ext/gd/gd.c	Sun Oct 27 19:36:43 2002
@@ -1036,10 +1036,10 @@
   		io_ctx = gdNewDynamicCtx (8, data);
   		if (io_ctx) {
   			if (getmbi((int(*)(void*))gdGetC, io_ctx) == 0 && skipheader((int(*)(void*))gdGetC, io_ctx) == 0 ) {
-				io_ctx->free(io_ctx);
+				io_ctx->gd_free(io_ctx);
   				return PHP_GDIMG_TYPE_WBM;
   			} else
-				io_ctx->free(io_ctx);
+				io_ctx->gd_free(io_ctx);
   		}
   	}
   #endif
  @@ -1216,7 +1216,7 @@
   		} else {
   			im = (*ioctx_func_p)(io_ctx);
   		}
-		io_ctx->free(io_ctx);
+		io_ctx->gd_free(io_ctx);
   #endif		
   	}
   	else	{
  
  
  
Index: php4/ext/gd/gd_ctx.c
diff -u php4/ext/gd/gd_ctx.c:1.1 php4/ext/gd/gd_ctx.c:1.2
--- php4/ext/gd/gd_ctx.c:1.1	Sun Oct 27 19:27:59 2002
+++ php4/ext/gd/gd_ctx.c	Sun Oct 27 19:36:43 2002
@@ -67,7 +67,7 @@
   		ctx = emalloc(sizeof(gdIOCtx));
   		ctx->putC = _php_image_output_putc;
   		ctx->putBuf = _php_image_output_putbuf;
-		ctx->free = _php_image_output_ctxfree;
+		ctx->gd_free = _php_image_output_ctxfree;
   
   #if APACHE && defined(CHARSET_EBCDIC)
   		/* XXX this is unlikely to work any more thies@thieso.net */
  @@ -95,7 +95,7 @@
   			break;
   	}
   	
-	ctx->free(ctx);
+	ctx->gd_free(ctx);
   
   	if(fp) {
   		fflush(fp);

Please Added this to CVS...
(I patch this on my CVS...)
 [2002-10-27 13:57 UTC] sniper@php.net
FYI: Adding that patch would break it for all other versions of GD..

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 11:01:31 2024 UTC