Given that this is the top search result on Google for zeromq dll problems with PHP on windows, i'm adding my two cents to it.
Proper Steps to setting up zeroMQ with PHP:
1) Download the correct DLL package for PHP
DLL Download Page for PHP ZeroMQ is now found at http://pecl.php.net/package/zmq (http://snapshot.zeromq.com is dead)
A tiny 'DLL' link will be present beside each 'available release'. That's your link. Click on it, and select your dll based on your PHP version and whether it's thread Safe (TS) or Non-thread Safe (NTS).
If you are coming from the XAMPP Package, your DLL should be TS & x86 version.
2) Make sure you have the correct Microsoft Visual C++ Redistributable Package installed.
As of this writing, the correct version is the 2012 one. Link to download Package: http://www.microsoft.com/en-us/download/details.aspx?id=30679
3) Copy the phpzmq.dll & libzmq.dll (from the dll package in step 1) to your PHP\Extensions Directory (Default XAMPP php ext path is: C:\xampp\php\ext)
4) Add the phpzmq.dll to your PHP.ini
5) Add the PHP\extensions directory to your PATH system environment variables (very important) & restart your machine
Upon restart, start your apache & pray to the PHP gods.
FAQ for common errors:
1) I have a popup saying "'libzmq.dll' is missing from my computer"
when starting apache.
Well darn, make sure you followed step 5 to the letter and verify that the directory path is correct and the dll is present in that directory.
2) Another popup saying "'php5.dll' is missing from my computer" when
starting apache.
Looks like you got the wrong dll for your php version. Download the correct one from step 1.
3) A random popup appeared saying "'phpzmq.dll' is not a valid win 32
application."
That DLL is still not correct. Make sure you got the right one (x86 or x64) and that it is either thread safe or non-thread safe. How would you know? Time to play DLL roulette.
Hoping this post actually helps the users who land here :)
The code should be correct with just the <?php phpinfo(); ?>
so I'm assuming the issue would be with a configuration setting.
Since it looks like you already named the file index.php, I would double check:
- That the files are in the proper web root directory, and
- The WAMP configuration is selecting that directory for web root.
However, if those two checks turn out clean and since you're on Windows, I would suggest that you still double check the file extension to ensure that it's a .php and not a text file by right clicking on the file and selecting properties (not by what it says in the file explorer). Depending on the program you are using, it still may default to saving as a .txt file even if you put .php at the end of your file name (Notepad can be bad about this).
Another option, if you're only doing some basic PHP development is MAMP. I've personally found it easier to use than WAMP, but that's just my experience and I'm sure there may be some that disagree with me.
Best Answer
A DLL normally cannot be loaded because it refers to modules that are missing on your computer.
The best way to find out which is to download the Dependency Walker and see what it says about it. It will indicate which DLLs are missing. The reason may be that they were not installed, or that the PATH system environment variable is missing this path.
If the missing DLL is msvcr90.dll, then the missing package is VC++ 2008 redistributable. Google for the right version (x86 or x64) and download it from Microsoft (only).