Documentation Buy Contact Blog
Blog

Installing Number Duck on WampServer

30 April 2015

WampServer makes it easy to quickly setup a PHP server for development on your own machine. It can be a little tricky to install PHP plugins especially if it's your first time, so here's a quick guide.

Firstly download and install WampServer from their website, www.wampserver.com. Then you'll need to grab the latest copy of Number Duck from our download page.

Now you need ot choose the correct Number Duck dll to use with PHP, depending on what version of PHP Wamp server includes, and if it is 32 or 64 bit, check this table below.

WampServer Version PHP Version Number Duck dll
2.5 32bit 5.5.12 Bin32/php/php_numberduck_ts_5513.dll
2.5 64bit 5.5.12 Bin64/php/php_numberduck_ts_5513.dll
2.4 32bit 5.4.16 Bin32/php/php_numberduck_ts_5412.dll
2.4 64bit 5.4.12 Bin64/php/php_numberduck_ts_5412.dll

This dll gets placed in the php/ext folder, which changes depending on whave version of PHP you have. It should be pretty easy to find, it will be full of .dlls with a "php_" prefix. Eg: C:/wamp/bin/php/php5.4.12/ext

Now that the dll is placed, you need to enable it in the PHP config. You'll find it inside the bin/apache/Apache[VERSION]/bin folder. Eg: C:/wamp/bin/apache/Apache2.4.4/bin/php.ini

Then add this line: extension=php_numberduck_ts_5412.dll

Remember to substitute the correct dll name forthe one you copied in earlier. There is a section for extensions where you can add that line, but anywhere in the file will work.

Save php.ini and restart WampServer (LEFT click on the icon in the tray) and hopefully Number Duck is up and running. You can check the Apache log file to see if there were any errors, they are all pretty obscure, but usually the mean you've selected the wrong dll. You can also check the default WampServer page at http://localhost/ and it should have "NumberDuck" listed in the plugins section.

Note that when running a PHP page in WampServer, the working directory is "C:\wamp\bin\apache\Apache[VERSION]" so if you use Number Duck to save files they will appear there. You can make Number Duck save relative to the PHP file like this:

$pWorkbook->Save(dirname(__FILE__) . "/out.xls");