Ensure your php\extensions folder contains php_zlib.dll
Edit php.ini which resides in %Windir%
Locate the paths and directories section and make entries similar to below:
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
extension_dir=c:\php\EXTENSIONS
extension=php_gd.dll
extension=php_zlib.dll
restart your webserver
run phpinfo() to see if you have a GD section