Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I install Zlib for PHP under Windows?

share|improve this question

migrated from May 20 '11 at 13:56

This question came from our site for professional and enthusiast programmers.

1 – cabaret May 20 '11 at 13:20
Yes, I read this, but I am essentially asking what "You will need to configure PHP --with-zlib[=DIR]" means and how it's done. – moteutsch May 20 '11 at 13:22
@moteutsch that part relates to building/compiling PHP from scratch only. If you are using the Windows binaries, there is nothing to do. – Pekka 웃 May 20 '11 at 13:24
So there is no way for me to install Zlib? – moteutsch May 20 '11 at 13:27
@moteutsch: Apparently you have not read that, otherwise you would have seen the huge box saying "Note: Built-in support for zlib on Windows is available with PHP 4.3.0." It could have been formulated "4.3.0 and newer", but aside from that, I don't see how it doesn't answer your question. [spoonfeeding]If you use PHP 4.3.0 or newer (this includes PHP 5) on Windows, zlib is already installed and you don't need to install it.[/spoonfeeding] Happy now? – Piskvor May 20 '11 at 13:30

Since it is included in PHP versions since 4.3.0, I would put a phpinfo.php page online with the following contents:




Save this file, upload it to a web-accessible directory and browse to it. I would then do a find (Ctrl+F in Firefox) and search for zlib. That'll show you information regarding zlib if it is detected - It should be.

Once you have your information, I would delete the phpinfo.php file from the server or at least move it out of the web-accessible directory to prevent snooping.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.