i was working on getting gd 2.0.7 and php 4.2.3 to compile, undefined functions error, had to modify about 4 lines, 3 in php's source, ext/gd/gd.c and ext/gd/gd_ctx.c find anyline in those two files that matches
io_ctx->free
and make it
io_ctx->gd_free
and it should compile.