Tag Archives: FAQ

Wamp-Developer Server FAQ

Howto Start MongoDB and Enable php_mongo in WAMP

Start MongoDB

WampDeveloper comes with MongoDB located in folder:

MongoDB can either be started:

A) Manually from the command-line:

mongod --config C:\WampDeveloper\Tools\mongodb\mongodb.conf

B) Or by double-clicking entry “MongoDB” in WampDeveloper’s Applications Tab, in which case, WampDeveloper will run file:

The MongoDB server will run as long as the command-line window is open.

Enable php_mongo

To connect and talk to the MongoDB server via PHP code, PHP extension php_mongo must be loaded.

1. Edit file:

2. Uncomment section:


(* uncomment by removing “;”, section is located near end of file)

3. Save file and restart Apache.

Connecting To and Using MongoDB

A REST interface to some MongoDB stats and information is provided on URL:

Example PHP code to test the operations of the MongoDB server is provided here:

Howto Start Memcached and Enable php_memcache in WAMP

Start Memcached

WampDeveloper comes with memcached located in folder:

Memcached can either be started:

A) Manually from the command-line:

memcached.exe -l -p 11211 -m 128 -t 4

B) Or by double-clicking entry “memcached” in WampDeveloper’s Applications Tab, in which case, WampDeveloper will run file:

The memcached server will run as long as the command-line window is open. The “-m” option specifies the size (in MB) of memory to use.

Enable php_memcache

To connect and talk to the memcached server via PHP code, PHP extension php_memcache must be loaded.

1. Edit file:

2. Uncomment section:


(* uncomment by removing “;”, section is located near end of file)

3. Save file and restart Apache.

Connecting To and Using memcached

Example PHP code to test the operation of the memcached server…


ini_set('display_errors', 1);

$memcache = memcache_connect('localhost', 11211);

// note - memcache_connect errors must be suppressed (@) for this code to be reached
if ($memcache === false)
	echo "Connection to memcached failed.";

// test string
$key_string = "string to store in memcached";

// test number
$key_number = 123;

// test array
$key_array  = Array(123, 345, 567);

// test object
$key_object = new StdClass;
$key_object->str_attr = 'test';
$key_object->int_attr = 123;

// store the values into memcached
$memcache->set("str_key", $key_string);
$memcache->set("num_key", $key_number);
$memcache->set("arr_key", $key_array);
$memcache->set("obj_key", $key_object);

// retrieve the values from memcached


Browser’s “Could Not Find” or “Could Not Display” Webpage Message

Oops! Google Chrome could not find domain-name

Server not found. Firefox can’t find the server at domain-name.

Internet Explorer cannot display the webpage

If, from the same system that the WAMP server is running on, your Browser (Chrome, Firefox, IE) is not able to locate your local website, the above messages will be displayed.

This happens when:

A) The Windows Hosts file does not have an entry resolving the website’s domain-name to the “loopback” address (

B) The Browser is still using its previous bad DNS resolve cache for this domain-name.

To fix this:

1. In WampDeveloper’s LocalDNS Tab, make sure this website is check-marked. If the check-mark disappears, then LocalDNS is not able to make changes to the Windows Hosts file because this file is being locked by another application.

2. Then click the Windows Hosts file button to open the file.

Make sure something similar to this line is present in the file: website.domain.name website.domain.alias1 website.domain.alias2

And that no other lines have your website.domain.name in them.

Save file if changes are made.

3. After making these changes, close your Browser so the older DNS caches are cleared.

*To unlock the Windows Hosts file see this howto:

*WampDeveloper’s LocalDNS works by resolving the domain-name to the local IP address via the Hosts file, so your local Browser (Chrome, Firefox, IE) knows where to find that website.

*Windows 8 users, see section “Enable IE Intranet Browsing” here: http://www.devside.net/wamp-server/installing-wamp-on-windows-8

Howto Switch WampDeveloper’s Apache PHP MySQL Branches

WampDeveloper provides 3 Apache, PHP, and MySQL channels:

  • Current: Apache 2.4, PHP 5.5, MySQL 5.6
  • Stable: Apache 2.2, PHP 5.3, MySQL 5.5
  • Legacy: Apache 2.0, PHP 4.4, MySQL 5.1

The WAMP server can be switched to use any channel at any time.

For example:

To switch to using WampDeveloper’s “Stable” channel, which is: Apache 2.2, PHP 5.3, and MySQL 5.5…

1. In WampDeveloper’s Components Tab, click the download links to the latest provided releases of Apache 2.2, PHP 5.3 (regular, not FCGI), and MySQL 5.5 – that are not on the system already.

2. Once downloaded, extract each into the appropriate Versions folder:

Apache versions are maintained in: C:\WampDeveloper\Versions\Apache\
PHP versions are maintained in: C:\WampDeveloper\Versions\Php\
MySQL versions are maintained in: C:\WampDeveloper\Versions\Mysql\

See this howto to make sure each packaged version is correctly extracted and placed:

3. After these versions are on system, close WampDeveloper and open it again to make sure it re-reads everything (*usually not necessary).

4. Select to use the new Apache, PHP, and MySQL versions:

In WampDeveloper’s Components Tab, in the top right corner, there is a group named “Select Subscription”.

Click on its “Channel” dropdown box, it will list items: Current, Stable, Legacy.

Select “Stable”, and all the Apache, MySQL, PHP branches on system in that channel will become selectable via their check-boxes. Select/check-mark the new Apache, PHP, and MySQL versions, then click: Update To Selected

*Channel “Current” will only work for OSs above XP and Server 2003.

*If you are using PHP-FCGI, using dropdown box “PHP Type”, switch selection from Regular to FCGI.

WAMP’s “Internal Server Error” Message

When Apache or PHP encounter a problem, sometimes this message is displayed…

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at admin@httpd.host to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Apache/2.4.9 (Win32) PHP/5.5.11 Server Port 80

This error is usually 99% of the time a result of an .htaccess file problem.

Check the specific website’s .htaccess file to make sure it’s not using old or incorrect paths and URLs, RewriteRules, nor a bad RewriteBase /path (try commenting it out with a #).

Also, a much more informative/helpful error message will be logged in the website’s HTTP and PHP error logs…

If you select this website in WampDeveloper’s Websites Tab, and click the (“Logs HTTP” group) ErrorLog and PhpLog buttons, the end of the files will tell what the real issue is. It might be something really easy to fix/correct.

If nothing relevant is shown, check the general Apache and PHP error logs files (in WampDeveloper’s Reliability Tab).

Moving Websites and Databases Between 2 WAMP Installs

This assumes you have the same WampDeveloper versions (ex: WampDeveloper 5.0) installed on each system, running the same MySQL branch (ex: MySQL 5.6), and that each WampDeveloper instance is installed on the same path (ex: C:\WampDeveloper).

First, make sure the receiving WampDeveloper installation has the same websites already created via the Websites Tab – so all the VirtualHosts, website folders, and other configuration files exist.

Then stop the Apache and MySQL Services on both systems.

Transferring Websites

Transfer (zip up and copy) to the other system the Websites folder. Select to overwrite everything, if prompted.

As an alternative, you can instead only move a specific website by transferring sub-folder:

Transfer Database

Delete the other system’s Database folder. Replace it completely (replace it, don’t copy-over to overwrite files).

MySQL Issues

If MySQL does not start/run after the \Database folder is replaced, and both machines are using the same MySQL version…

It’s possible that your ZIP program, FTP program, etc, (whatever you are using to package + transfer the files), or its options, does not preserve this NTFS Junction-Point folder link:
Database\mysql-data –> Database\mysql-data-56

You can re-create it (after transferring the \Database folder) by:

1. Deleting folder: Database\mysql-data

2. Opening the command-line w/administrative-permissions (System Tab button) and executing this command (*all on one line):
mklink /j C:\WampDeveloper\Database\mysql-data C:\WampDeveloper\Database\mysql-data-56

Note that the above example is for WampDeveloper v5.0 using MySQL 5.6.
For MySQL 5.5, the folder is: Database\mysql-data-55
For MySQL 5.1, the folder is: Database\mysql-data-51

And under WampDeveloper v4.x the Database folder is “as-is” (it does not have specific version sub-folders, nor NTFS Junction-Point links).

If this is not the issue, open this log file to see MySQL’s error messages:

VirtualHosts and other Website Specific Configuration Files

If you’ve made custom changes to the websites’ VirtualHost files, they exist in this folder and can be transferred:


If you’ve made custom changes to the websites’ AWStats files, they exist in this folder and can be transferred:


Custom DocumentRoot Locations

WampDeveloper expects all websites to be contained under folder C:\WampDeveloper\Websites\ (and it’s best to leave this as-is), but you can work around this by using NTFS “Junction Points” to make a link between an outside folder and either the website’s entire containing folder or the website’s \webroot (DocumentRoot) folder.

First, create a website via WampDeveloper, it will create a website DocumentRoot folder such as:

Then create an NTFS “Junction Point” from the website’s webroot folder to the real location…

1. Delete (or move to new location) the website’s existing DocumentRoot folder:

2. Then from the command line (WampDeveloper’s System Tab, Command Line button) execute (all on one line):
mklink /j C:\WampDeveloper\Websites\www.example.com\webroot C:\Users\YourName\Documents\Web\ProjectName\WebsiteRoot

*Note that C:\Users\YourName\Documents\Web\ProjectName\WebsiteRoot has to already exist.

This way you’ll have your real C:\Users\YourName\Documents\Web\ProjectName\WebsiteRoot folder (where the files reside) and a link to that folder from C:\WampDeveloper\Websites\www.example.com\webroot (which is what WampDeveloper will use).

Notes -

“Junction Points” only work between local drives of the system and OS (between local volumes), and will not link to networked drives or remote shares.

It is also not usually possible to directly link the folders of websites, nor the database folder, to a NAS device.

To use network shares, you would need to change Apache’s account from “LocalSystem” to an account that has network share access. Under Windows, while “LocalSystem” can access TCP/IP, it does not have permissions to access network shares.

Non-local file system access will significantly slow down Apache.

Upgrading WampDeveloper Versions

The cleanest and best way to do an upgrade between both minor (v4.2.0.1 to v4.2.0.3) and major versions (v4.2 to v5.0) of WampDeveloper Pro is to perform a clean re-installation followed by a website + database transfer procedure (if needed, to maintain all websites and databases)…

Clean Re-Installation of WampDeveloper

1. Click the Uninstall link at bottom of Components Tab. The un-installation process will not delete any files or databases.

2. Rename folder C:\WampDeveloper to C:\WampDeveloper.old. If Windows does not allow the folder to be renamed, then some files are still open or in-use. Reboot your system to close everything out.

3. Install the new version of WampDeveloper to the previous location (ex: C:\WampDeveloper). Then reboot/restart.

4. Use Websites Tab to re-create your websites, so that all new (and updated with newer template/format) Virtual Hosts files, other configuration files, and website folders are created.

5. If you have no previous websites and databases to preserve, nor any custom Apache, PHP, MySQL configuration changes to re-implement, you can safely delete the old C:\WampDeveloper.old folder. Otherwise, for the next websites and databases transfer processes, stop Apache and MySQL, and proceed…

Transfer Websites

If you need to preserve your previous websites…

1. Copy from C:\WampDeveloper.old your \Websites folder over the C:\WampDeveloper\Websites folder (copy-over, overwrite all).

* Do not just delete and replace the folder, instead, it should be copied-over the existing folder (to preserve newer DocumentRoot folders which might not have existed in the previous version).

Transfer MySQL Database Files

If you need to preserve your previous databases…

Note that:

WampDeveloper 4.1 used MySQL 5.1 with database location:

WampDeveloper 4.2 used MySQL 5.5 with database location:

WampDeveloper 5.0 uses MySQL 5.6 by default, but can also switch to using MySQL 5.5 and 5.1; with each major MySQL branch maintaining its own database files (because the data format/schema of the files is different for each MySQL branch):

  • MySQL 5.6 as \WampDeveloper\Database\mysql-data-56\
  • MySQL 5.5 as \WampDeveloper\Database\mysql-data-55\
  • MySQL 5.1 as \WampDeveloper\Database\mysql-data-51\

If: Upgrading WampDeveloper Versions (v4.2 to v5.0)

1. Place the previous database files in the new location…

Ex: Delete all files in folder \WampDeveloper\Database\mysql-data-56\, and copy all files from \WampDeveloper.old\Database\* back into this location.

2. The database files, when moved under a newer major MySQL branch, have to be updated for that branch by running (from System Tab, command-line button):


* MySQL needs to be started and running for mysql_upgrade.exe to work (also once it’s finished, make sure to restart MySQL).

If: Re-Installing The Same WampDeveloper Branch (v4.2 to v4.2)

1. Move back in your \Database folder (replace in entirety, don’t copy-over).

Nothing else needs to be done as your MySQL branch remains the same.

If: Upgrading WampDeveloper v4.1 to v4.2 (Special Case)

1. Download v4.2:

2. Replace the \Database folder.

3. Due to a my.ini configuration change (for logfile size) between WampDeveloper v4.1 and v4.2 (and the way MySQL 5.5 behaves), MySQL won’t start until these files are removed:
C:\WampDeveloper\Database\ib_logfile0, and ib_logfile1 (you might only have one)

* You can usually safely delete these files, but in some circumstances and edge-cases, they could contain data that is not yet part of some InnoDB tables.

4. Run MySQL’s datafiles upgrade program (from System Tab, command-line button):


* MySQL needs to be started and running for mysql_upgrade.exe to work (also once it’s finished, make sure to restart MySQL).

Re-Install phpMyAdmin’s Database

When phpMyAdmin is upgraded, its existing database should also be re-installed.

Make sure MySQL is running, open the command-line (from System Tab, command-line button), and execute the following commands:

Open the MySQL shell -

mysql -u root -p

Drop and recreate the phpMyAdmin database -

DROP DATABASE phpmyadmin
SOURCE C:/WampDeveloper/Tools/phpMyAdmin/examples/create_tables.sql

* If you have not set a password for MySQL account: root, leave the ‘-p’ part out.

* Make sure to update the path used in the above SOURCE line if WampDeveloper was installed on a different drive (the above example is for drive C:).

Migrate Custom Changes

If you had any custom changes made to the Apache, PHP, or MySQL configurations, the VirtualHost files, AWStats, etc, those changes would need to be re-implemented.

A quick way to see the difference between two configuration files (previous vs. new), or between all files in two directories (ex: between WD 4.1 and WD 4.2 \WampDeveloper\Config\ folders), is to use a tool such as WinMerge (or WinDiff if you have VS.NET installed).

Howto Update WampDeveloper’s Apache PHP MySQL Versions

WampDeveloper can switch between all provided versions of Apache, PHP, and MySQL automatically, while retaining all websites, configurations, databases, etc.

The process is exactly the same for Apache, PHP, and MySQL.

We will use PHP as an example here.

To switch or update to the latest provided PHP version…

1. Go into the Components Tab, PHP sub-tab.

2. Click on the download link for the version of PHP you’d like to use.

For example: php-

(*note that there are Standard and FCGI versions of PHP provided)

3. After downloading the PHP version, extract the contents of the zip directly into this folder:

Important -

If you’ve downloaded and unzipped the above PHP version (5.5.15) correctly and into the proper Versions folder, this file path should now be valid and exact:

Most of the issues happen here – everything gets unzipped into the wrong folder, into an deeper/extra sub-folder, or the inner files get extracted without their containing folder.

4. In the Components Tab, top right corner, there is a group named “Select Subscription”. Click on its “Channel” drop-down box, it will list items: Current, Stable, Legacy.

Select Channel “Current” – and all the Apache, MySQL, PHP branches on system and in that channel will become select-able via their check-boxes.

Then select Bits: “32″, and PHP Type: “Regular”.

(*this step is only for WampDeveloper v5; WampDeveloper v4 has only 1 channel)

5. Then check-mark the above PHP version (5.5.15) in Components Tab, PHP sub-tab.

If you can’t check-mark it, it’s been unzipped into the wrong place. Otherwise, try closing and opening again the WampDeveloper application.

6. Click “Update To Selected”. WampDeveloper will do the rest. All your websites, the MySQL Database, configurations, and everything else, will remain as-is.

The User-Interface will switch to the new versions in about 10 seconds.

Building Apache 2.2 on Windows

Building Apache 2.2 on/for Windows

Step by step instructions for building Apache 2.2.x with mod_deflate and mod_ssl on Windows using VS.NET 2008 (VC9 to match official PHP 5.3 builds).


1. Download Apache’s httpd-2.2.26 source code and extract as C:\build\httpd-2.2.26

2. Download zlib-1.2.8 source code and openssl-0.9.8y source code and extract into httpd-2.2.26\srclib

3. Rename httpd-2.2.26\srclib\zlib-1.2.8\ and httpd-2.2.26\srclib\openssl-0.9.8y\ to zlib\ and openssl\ (remove the version info from the directory name).

4. Download apr-iconv-1.2.1-win32-src-r2.zip source code and extract into httpd-2.2.26\srclib

5. Rename httpd-2.2.26\srclib\apr-iconv-1.2.1\ to apr-iconv\ (remove the version info from the directory name).

Build Environment

The build requires the following tools to be installed, and to be in your system’s %PATH% (environmental variable):

1. VS.NET 2008 and Windows SDK 6.1
2. perl – C:\build\Perl
3. nasm – C:\build\nasm
4. Specific GnuWin32 tools: awk (“gawk” renamed to “awk”), bison, flex, sed – C:\build\gnuwin32

Build Apache

1. Open Windows SDK 6.1 cmd.exe (*using 6.1 rather than 7.1 to match official PHP build)
2. SetEnv.cmd /Release /XP /X86
3. “C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat” (*not needed since we are using the SDK’s environment cmd.exe window)
4. set path=%path%;C:\build\gnuwin32;C:\build\nasm
5. + set path variable to include location to perl.exe

6. CD C:\build\httpd-2.2.26
7. perl srclib\apr\build\lineends.pl (convert line-endings from Linux to Windows style)
8. perl srclib\apr\build\cvtdsp.pl -2005 (convert DSP files from VC6 to VS2005 format)
9. Open Apache.dsw with VS.NET 2008 to convert ALL to current format (from 2005 to 2008) and to create some *.vcproj files. Then File > Save All. Exit.

10. CD C:\build\httpd-2.2.26\srclib\zlib

11. (*Note – taken from contrib\masmx86\bld_ml32.bat)
(*Note – builds ASM implementations of the functions longest_match() and inflate_fast())
ml /coff /Zi /c /Flmatch686.lst contrib\masmx86\match686.asm
ml /coff /Zi /c /Flinffas32.lst contrib\masmx86\inffas32.asm

12. (*Note – _CRT_SECURE_NO_DEPRECATE and /wd4996 will disable deprecation warnings)
NMAKE -f win32\Makefile.msc LOC=”-D_CRT_SECURE_NO_DEPRECATE /wd4996 -DASMV -DASMINF” OBJA=”match686.obj inffas32.obj”
MT -manifest zlib1.dll.manifest -outputresource:zlib1.dll;2

13. CD C:\build\httpd-2.2.26\srclib\openssl

14. (*Note – IDEA cipher in OpenSSL is patented for commercial use)
(*Note – NASM is preferred over MASM for building OpenSSL)
PERL Configure VC-WIN32 –openssldir=/Wamp/Apache/bin enable-camellia disable-idea
NMAKE -f ms\ntdll.mak

15. CD C:\build\httpd-2.2.26

16. NMAKE -f Makefile.win INSTDIR=C:\Wamp\Apache installr
(*make sure this folder does not exist – that nothing is not already installed there)

17. CD C:\WampDeveloper\Components

18. (*Note – to preserve all PDB files into another folder – 300+ files)
C:\Wamp>xcopy /S Apache\*.pdb Apache-2.2.26-pdb-files\

19. CD C:\Wamp\Apache

20. del /s *.pdb

21. move conf\openssl.cnf bin\


If you are going to run PHP via FCGI (NTS releases of PHP), build mod_fcgid against the above installed Apache package (against C:\Wamp\Apache; not C:\build\httpd-2.2.26).

1. set APACHE2_HOME=C:/Wamp/Apache
2. devenv /useenv mod_fcgid.dsw (*to generate VC6 to VS.NET sln file)
3. Convert ALL. Then File > Save All.
4. Build > Configuration Manager. Solution – Release. Build Solution.
5. Copy C:\build\mod_fcgid-2.3.7\modules\fcgid\Release\mod_fcgid.so into C:\Wamp\Apache\modules\ dir.
6. Copy C:\build\mod_fcgid-2.3.7\modules\fcgid\Release\mod_fcgid.pdb into C:\Wamp\Apache-2.2.26-pdb-files\modules\ dir.

Extra Database Drivers for Apache


The ODBC driver is included by default on Windows. To add additional database drivers, first ensure that your LIB and INCLUDE environment variables include the directories which contain the .lib and .h files for your database. Add a DBD_LIST to your NMAKE command, which should be be set to a space-separated list of the desired drivers. For example - if MySQL is in C:\MySQL and SQLite is in C:\SQLite: 

SET LIB=%LIB%;C:\MySQL\lib\opt;C:\SQLite
NMAKE -f Makefile.win  INSTDIR=C:\Wamp\Apache DBD_LIST="odbc mysql sqlite3"  installr