Tag Archives: FAQ

Wamp-Developer Server FAQ

Fixing SSL / HTTPS connections not reaching correct website for Windows XP users

When someone on a Windows XP system, or even using an older version of IE, goes to the SSL/HTTPS URL of your Apache or WampDeveloper hosted website, they might get a warning by their browser that the SSL Certificate does not match the website and/or get the wrong website. And in some situations this might also happen on recent OS versions (Vista, 7, etc).

To fix this -

Bind your website to the server’s public IP address. Only the SSL VirtualHost needs binding, the regular HTTP VirtualHost does not…

Edit the website’s SSL/HTTPS VirtualHost file (select website in WampDeveloper’s Websites Tab, then click the SSL VirtualHost button).

Change -

<VirtualHost *:443>

To -

<VirtualHost server's.public.ip.address:443>

You can locate the Public IP address of your system in WampDeveloper’s System Tab.

For local-network only websites use the LAN IP address instead (see System Tab for IPv4 values).

Save file. Restart Apache.

If you only have 1 IP address assigned to your server, you can do the above without any issues as long as you’re okay with this website now answering *all* SSL/HTTPS requests that come in on that specific IP address, regardless of which website they are for. Otherwise, you’ll need to bind each website’s SSL VirtualHost to a separate and unique IP address.

This happens because -

The client OS and Browser must support SNI (Server Name Indication) for *multiple SSL websites running on the same 1 IP address* to work – vs. having to dedicate a separate IP address for each website.

If they don’t, you’ll just get back WampDeveloper’s “DefaultWebsite” (usually localhost) with it’s fake/bogus self-signed Certificate, which will always mis-match the correct website’s domain-name.

Unless the request is originating on XP, or an older version of IE, this isn’t usually an issue. But this problem can also arise with some IE settings being turned off on Vista, Windows 7, etc:

Make sure TLS (needed by SNI) is turned on for IE on the system the request is coming form (it is by default – but some programs like McAfee mess it up); have the client go to:

Control Panel > Internet Options/Settings > Advanced

In Security Group, make sure this is check-marked:

Use TLS (and SSL)

Then have the client restart IE.

Running Websites on Non-Standard Ports

These instructions will enable you to access your website externally via a port other than 80 (which might be blocked by your ISP).

Note that when using non-standard ports such as 8081 to host your website, to access your website you’ll need to specify the port number in the URL -


Edit VirtualHost

Select your website in WampDeveloper’s Websites Tab, click the HTTP VirtualHost button.

Replace this…

<VirtualHost *:80>

With this…

Listen 8081
NameVirtualHost *:8081
<VirtualHost *:8081>

Remove Redirect Rules

Then comment out (#) or remove the “Domain Alias to Primary Domain” redirect lines (if they are present), which are similar to these lines…

# Redirect all ServerAlias(es) to main domain
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule ^/*(.*)$ http://www.example.com/$1 [R=301,NC]

Save the VirtualHost file. Restart Apache.


1. If Apache won’t start, run from the command line (click Command Line button in System Tab):

httpd -t

2. From now on, you should not enable the ‘Forward To Primary Domain – All Aliases’ option for this website (in website’s Settings), as the above redirect lines might not work correctly for port specified URLs (*edit: now fixed in WampDeveloper v4.2.0.0 and above).

3. Also note that WampDeveloper has not been fully vetted for running websites on non-standard ports; this could cause a few minor issues.

*Edit: WampDeveloper v4.2.0.0 and above now contains new Domain Aliases to Primary Domain Redirect rules that preserve port numbers, and it should not be necessary to comment-out or remove those rules/lines.

Installing on Windows 8

Before installing WampDeveloper on Windows 8, you will need to do 2 things -

Exclude the Windows Hosts file in Windows Defender

See section “Excluding the Hosts File” here -

*If you are using Kaspersky instead of Windows Defender, you will still have to exclude the Hosts file path under Kaspersky.

Disable Services that Interfere with Apache

Stop and disable these Windows 8 Services. They prevent Apache from binding to port 80…

You can do this from either -
A) Services Manager – run services.msc
B) Command line – open command-line via WampDeveloper’s System Tab, OR locate cmd.exe, right click it, and select Run As Admin.

(the order you do this can be important)
(the space you see after “start=” is important)

From Services Manager

SQL Server Reporting Services (ReportServer)
Web Deployment Agent Service (MsDepSvc)
BranchCache (PeerDistSvc)
World Wide Web Publishing Service (W3SVC)

From Command-Line

Or from the command line execute these lines -

net stop ReportServer /y
sc config ReportServer start= disabled

net stop MsDepSvc /y
sc config MsDepSvc start= disabled

net stop PeerDistSvc /y
sc config PeerDistSvc start= disabled

net stop WAS /y
net stop W3SVC /y
sc config W3SVC start= disabled

net stop HTTP /y
sc config HTTP start= disabled

You might not have some of these Services installed or running, so some commands might error out.

Also check the Services Manager to see if you have “TeamViewer” running…
This service waits a couple of minutes after computer startup, and then takes port 80 if it’s available. You can stop it, and disable it too.

Enabling Internet Access of Websites

Apache under most WAMP setups does not block internet access to any websites, and does not require additional configuration to enable internet access of websites.

If your websites are not reachable from the internet, and the request times out in your Browser (and you get a blank screen) – those requests were not able to reach Apache…

Update DNS Records

Make sure your domain name resolves to the IP address that you see when you click the Public IP address button in System Tab.

You’ll need to use your Registrar’s (GoDaddy, Namecheap, etc) DNS system and set up an “A” record to resolve your domain name to your public IP address for both the “www” and “@” parts (“@” means base-domain).

Note that WampDeveloper’s “Local DNS” feature is purely for local use, and will not enable or affect outside DNS.

Also note that DNS changes can take a few hours to propagate.

Assign Domain Name or IP to Website

Make sure this WampDeveloper hosted website has the above DNS-resolved domain-name (www.example.com) set as it’s Primary Domain Name, and (if accessing this website directly via the IP address) the IP address set as one of it’s Domain Aliases (in Websites Tab).

Also, if you are accessing this website via a Domain Alias such as the IP address, make sure to de-select: Forward To Primary – All Aliases, or you’ll just get redirected back to the Primary Domain Name (which might not even be registered/real, nor have proper DNS set up).

Open Windows Firewall

Open incoming port 80 and 443 in the Firewall.

Your Windows Firewall (native, comes with OS) will block all incoming port 80 (HTTP) and 443 (HTTPS) requests (both TCP and UDP packets). You need to open port 80 and 443, for both TCP and UDP packets.

Click the “Firewall” button in WampDeveloper’s System Tab. Select “Inbound Rules”, then “New Rule…”, Port, and fill in the proper info.

Also delete any blocking “Apache HTTP Server” Inbound Rules that you see. These are automatically created by the Firewall when a new version of Apache is started for the first time.

Port Forward Port 80 and 443 of Router

Port-forward port 80 and 443 in Router (if you’re using one).

If your WAMP setup is behind a Router (under a typical wifi router/modem home setup), you’ll need to login into the Router (ex:, username or password: admin), and create a “port-forward” entry for port 80 and 443 to the LAN IP of the server.

The LAN IP is listed in WampDeveloper’s System Tab. It’s usually something similar to “″.

Otherwise, none of this will work as the Router must know what to do with incoming requests – to which LAN IP to forward them to.

Also, your Router might re-assign the local LAN IP (not to be confused with the Public IP) to another LAN device/system unless you configure it to keep assigning the same LAN IP to the same server device/system.

Check ISP Blocking of Incoming Port 80 Requests

Make sure your ISP (internet provider) does not block incoming ports 80 and 443.

Some ISPs might block incoming ports due to abuse, hacking, and spam issues on their networks. Sometimes you can call in and get them to open those ports for your account (sometimes for a fee, sometimes via a tech level-up, and almost always if switched to a business account).

Though most of the time when they say they are not blocking incoming port 80, in reality they are.

You can check port 80 and your website externally by using this proxy…

It’s a free anonymous browsing service that will proxy the request using different external servers throughout the world.

It’s a bit slow, but if you get the message “Error – Timeout” eventually, the request was not able to reach your server.

If your ISP is blocking port 80, run the website on a different port.


WampDeveloper is secured and ready for production deployment out-of-the-box.

There are just a couple of things to be aware of…

MySQL Accounts

While MySQL can only be access directly from the local system (it’s bound to, it can be accessed indirectly via any phpMyAdmin URL -


The indirect access is currently secured this way:

File: C:\WampDeveloper\Tools\phpMyAdmin\config.inc.php

$cfg['Servers'][$i]['AllowDeny']['order'] = 'deny,allow';
$cfg['Servers'][$i]['AllowDeny']['rules'] = array(
    'deny % from all',
    'allow % from',

    'allow root from localhost',
    'allow root from',
    'allow root from',
    'allow root from',
    'allow root from',

A) The user “root” has *no password set*, but this account is restricted and can *only* be accessed from the local system and the local network (as listed above). *If you do set the password for this account, do so for all root accounts (host: localhost, ::1, and update file WampDeveloper.xml with the new password.

B) All other users are also either restricted to local access only, or just denied access all-together (as above). *To open this up, you have to edit the above file and set the proper permissions in the above code (example: ‘allow user-name-here from′).

C) There is sometimes 1 MySQL account called “Any” which does allow anyone that can get to MySQL to see (but not modify) the databases. You can safely delete this account if it exists.

AWStats Website Analytics/Statistics

Website statistics can be accessed by anyone from the local network.

Current Settings…

(*substitute your domain name for www.example.com)


Directory Index

Each publicy accessable directory that does not contain an index.html or index.php file, will default to displaying an “Index” (auto generated file + directory listing) of that location. To remove “Indexes”…

Add into each website’s top-level .htaccess file, line -

Options -Indexes

VirtualHost, htaccess, and Other Templates

The C:\WampDeveloper\Resources folder contains templates that are used for each new website’s VH (HTTP and SSL) and .htaccess files when a website is created/added. You can edit these templates to meet your specifications.

Securing PHP against 99% of the attacks

Disable most commonly exploited PHP functions

php.ini -

disable_functions = exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source

This will stop most of the exploits that would try to execute something on the system, without preventing normal scripts and webapps from working.

Restrict opening of files in scripts

Website VirtualHost(s) -

php_admin_value open_basedir "C:/WampDeveloper/Temp;C:/WampDeveloper/Websites/domain.name/webroot/"

This will restrict the locations that can be opened by PHP’s include(), require(), fopen() and other similar functions – to the website’s specific DocumentRoot folder and the general Temporary directory.

By using php_admin_value you are also preventing open_basedir from being reset via .htaccess files and at runtime via ini_set().


Note that using open_basedir comes at a cost. You will not be able to modify php.ini realpath_cache_size value for performance gains.

(*using php_value/php_admin_value does not work under PHP-FCGI)

Running Perl Scripts

WampDeveloper is primarily a PHP web-server, but it does come with Perl (StrawberryPerl distribution), and is able to run perl scripts out-of-the-box.

Simple Perl Scripts

For simple perl scripts (not entire perl based applications), just place the perl scripts into the website’s \cgi-bin folder (up one level from \webroot) -


Then you can access those scripts via URL -


Entire Perl Applications

For more complicated perl applications -

Because of the size and complexity of some perl applications, it’s not going to be good enough to place those perl applications into the website’s default \cgi-bin folder… We’ll rather have to place the application into the website’s \webroot folder, and enable CGI execution in the application’s folder….

Edit the website’s VirtualHost file (select website in Websites Tab, click VirtualHost buttons), inside the <VirtualHost> block add in…

<Directory "C:/WampDeveloper/Websites/www.example.com/webroot/perl-application-folder-to-enable-cgi-for">
DefaultType text/html

Options -Indexes +ExecCGI
AllowOverride None

Order allow,deny
Allow from all

SetHandler cgi-script

Save file. Restart Apache.

If Apache won’t start, from the command-line (button in System Tab), run -

httpd -t
httpd -k start

This will tell you which lines in the VirtualHost file have errors in them.

Extra Perl Modules

Some perl applications might also require extra perl modules to be installed. To do so, open the command-line (button in System Tab) -

Then run something similar to this (substitute in package-names) -

perl -MCPAN -e shell;
install package::name1
install package::name2

This might, or might not, work out well – depending on the extra modules and what they require.

Apache + PHP Limits and Timeouts

Apache, PHP, and phpMyAdmin have settings that limit: memory allocation, script runtime, and uploading.

Upload Limits

For uploading large files there are Apache and PHP memory limits and timeout values set that you might need to update -


Edit file C:\WampDeveloper\Config\Php\php.ini

Find and change settings:

upload_max_filesize = 256M
post_max_size = 257M

This will increase upload limits to 256 MB.

post_max_size” is set 1 MB larger than “upload_max_filesize” to take into account for any additional meta-data sent.

Notes -

1. file_uploads

file_uploads = On

“file_uploads” has to be on. And usually is by default under most WAMP and LAMP setups.

2. memory_limit

memory_limit = 258M

While the PHP docs state that “memory_limit” should generally be set higher than the “post_max_size” value, is not absolutely required to be so, because file uploads are not stored/output *in their entirety* to memory. Instead, they are buffered part-by-part and written out to a file in the temporary directory (C:\WampDeveloper\Temp\) as the upload progresses.

3. upload_tmp_dir

upload_tmp_dir = "C:/WampDeveloper/Temp"

This is the directory where file uploads are temporarily placed. It has to exist, and has to not have special/restrictive permissions set on it. Also there must be enough free disk space on this partition, and no overly restrictive space quotas set on this directory.

If you are using your own coded scripts to do file uploads, note that the file will be deleted from the temporary directory automatically by PHP at the end of the request. Before the script exists, you must move or copy away the file.

4. max_imput_time and max_execution_time

max_input_time = 300

“max_input_time” is the amount of time a PHP script can spend receiving input (the time spent receiving the uploading file). The default is 60 seconds. This time (the input time) does not count towards the “max_execution_time” limit (…you don’t need to modify “max_execution_time” for file uploads).

5. max_file_uploads

max_file_uploads = 20

“max_file_uploads” sets the maximum number of files (default is 20) that can be uploaded by a single POST request (via form submit). If you are uploading more than 1 file at a time, you have to set “post_max_size” to a greater value than “upload_max_filesize” times “max_file_uploads”.



When using PHP-FCGI (a separate PHP process ran via Apache’s mod_fcgid), mod_fcgid caps uploads to 128KB by default in newer versions (v2.3.6 and above), and usually returns a “500 Server Error” when that limit is reached.

Edit file C:\WampDeveloper\Config\Apache\extra\wampd-php5-fcgi.conf

Inside the <IfModule fcgid_module> block, add in or edit setting:

FcgidMaxRequestLen 268435456

This will set the max upload value to 256 MB. Or for a 1GB (1024MB) upload limit, use value: 1073741824.

You should probably set this to match whatever max upload value you have in php.ini – though it does not have to be so.


Apache sets by default “LimitRequestBody” to 0, specifing an unlimited size limit on the request. But this directive can set in any .htaccess file to override this default.

Execution Timeout Limits

For processing requests there are Apache and PHP timeout values set that you might need to update -

The default is usually 300 seconds (5 minutes)…

Apache Wait Time for Input/Output

Edit file C:\WampDeveloper\Config\Apache\extra\httpd-default.conf

Timeout = 300


PHP Script Processing/Runtime Limits

Edit file C:\WampDeveloper\Config\Php\php.ini

max_execution_time = 300


PHP FastCGI Processing Timeout

When running PHP-FCGI, the FastCGI configuration sets a value on the time a FastCGI application has to respond to the I/O request (default is 40 seconds)…

Edit file C:\WampDeveloper\Config\Apache\extra\wampd-php5-fcgi.conf

FcgidIOTimeout 120

PHP Memory Limit

PHP has a limit set on the amount of memory a PHP script is allowed to allocate.

memory_limit = 258M

Generally you don’t want to set a value above 2000MB (slightly lower than 2GB / 2048MB) as it 1) begins to exhaust the memory space PHP can use running as a 32 bit process and 2) has been known to trigger PHP bugs. Though normally it shouldn’t need to be higher than 1024MB as anything above is usually indicative of bad memory management or memory leakage by the PHP script used.

.htaccess and PHP code that overrides php.ini settings

If you are experiencing an Apache or PHP error message:

Out of memory (allocated X) (tried to allocate Y bytes)

Try using Notepad++ (which has a nice Find-in-files search feature), or your own choice of an Editor, to search your website’s DocumentRoot (\webroot) folder -

…all files; for occurrences of this text/string:


…To see if it’s being set in any .htaccess files (via directive: “php_value”) or PHP files (via function: “ini_set()”). Then manually edit or comment out those lines.

A) An .htaccess file could override php.ini’s memory_limit:

php_value memory_limit 20MB

B) A PHP script could override php.ini’s memory_limit:


Also note that the website’s VirtualHost file can set a value that is not overridable via .htaccess files nor script code by using the “php_admin_value” directive:

php_admin_value memory_limit 258MB

phpMyAdmin Limits

phpMyAdmin has a default limit of 300 seconds set on the import and export of dump (SQL) files. This setting does not affect the run time of any other phpMyAdmin functions.

Edit file C:\WampDeveloper\Tools\phpMyAdmin\config.inc.php

$cfg['ExecTimeLimit'] = 300;

phpMyAdmin also has a $cfg['MemoryLimit'] setting that limits the amount of memory a script can allocate for importing and exporting SQL files (and on some other internal functions), but its default value is already set with no limit…

$cfg['MemoryLimit'] = '0';

*If you do set this value for some reason (instead of letting PHP handle this limit), to specify megabytes, append an “M” to the value.

Opening Up Port 80 For Apache to Use On Windows

If after installing WAMP’s Apache, rebooting, and trying to start Apache again, it’s not able to bind to port 80 and start, another application or service is already listening on this port.

For Apache to run, we need to figure out what’s using port 80 (and possibly 443) on your system, and stop and disable it.

Known Windows Services That Listen on Port 80

From Services Manager (run: services.msc), stop and disable these native Windows Services which are known to bind to port 80.

Double click Service, and change ‘Startup Type’ to ‘Disabled’.

  1. SQL Server Reporting Services (ReportServer)
  2. Web Deployment Agent Service (MsDepSvc)
  3. BranchCache (PeerDistSvc)
  4. World Wide Web Publishing Service (W3SVC)
  5. Internet Information Server (WAS, IISADMIN)

You might, or might not, have some of these Services installed and running.

HTTP (HTTP.SYS) Hidden Driver/Service

Windows Server 2003/2008/2012 and Windows XP(SP2)/Vista/7/8 come with an HTTP front-end proxy service who’s job is to parse and forward incoming HTTP requests to other Services.

Values in URL “http://hostname:port/virtual_url_or_dir” are registered with it, and when an HTTP request comes in that matches on those values, that request gets routed to the other application or service (which itself is running on a different port).

HTTP.SYS is usually started “on demand” by other services (Windows Remote Management, Print Spooler, etc), and is not usually listening on port 80 until some other application registers a HOST ( + PORT (80) + virtual URL/DIR with it. HTTP.SYS runs under PID 4 (NT Kernel).

On some Windows systems, oftentimes port 80 is already taken by HTTP.SYS for use.

Show Reserved URLs:

netsh http show urlacl

Show active Registered URLs:

netsh http show servicestate

To Disable HTTP.SYS:

Control Panel > Device Manager
In menu View, select: Show hidden devices
Open tree: Non-plug and Play Drivers
Double-click: HTTP
Tab Driver - Group Startup
Switch from: Demand to Disabled

Or run this from the administrative privledged command-line (right click cmd.exe, select – run as admin):

net stop http
sc config http start= disabled

Other Web-Server Applications

Make sure you’re not running:
A. Other instances of Apache
B. IIS and/or WebMatrix
C. Tomcat

IIS and Tomcat are web-server applications that also bind to port 80 by default.

IIS can be removed via Windows Features on Vista/7/8, or on Windows Server via Role and Components Removal.


Skype usually takes up ports 80 and 443.

You’d need to stop Skype and change its settings to not use these ports:

Tools > Options > Advanced > Connection
Uncheck "Use Port 80 and 443 for incoming connections"

Or set Apache’s Startup type as “Automatic”, this way Apache might start before Skype does, and will be able to bind to port 80 and 443 before any other application has a chance to take these ports.

*Skype for Windows 8 (Modern UI) is not able to change port numbers. Only “Skype for Desktop” can do this.


To disable TeamViewer from using port 80:

Extras > Options > Advanced
Enable option "Don't use incoming port 80"

VMware Host Agent service

The VMware Host Agent service uses TCP ports 80 and 443 by default.

Edit > Preferences > Shared VMs
Change the ports

VMware, Configure Virtual Machine Sharing and Remote Access

Use NETSTAT to Detect Port 80 Listeners

Open the command line (System tab, button: Command Line) and run:

netstat -o -n -a | findstr
netstat -o -n -a | findstr

Inspect the lines with a “Local Address” showing port 80 and/or 443 use. Note the PID number. Then open Task Manager (run: taskmgr.exe), go to it’s Processes Tab, see if you can find the application with that same PID number. It needs to be shut down. If you don’t see it, click “Show processes from all users” button.


On some systems you can also get the PID directly by using netstat’s ‘-b’ option:

-b    Displays the executable involved in creating each connection or
      listening port. In some cases well-known executables host
      multiple independent components, and in these cases the
      sequence of components involved in creating the connection
      or listening port is displayed. In this case the executable
      name is in [] at the bottom, on top is the component it called,
      and so forth until TCP/IP was reached. Note that this option
      can be time-consuming and will fail unless you have sufficient

Apache Startup and Running Issues

Apache Startup Issues

When Apache does not start after installation, or on a system reboot, most of the time this is an issue with something else on your system taking up ports 80 (the HTTP port) and 443 (the HTTPS / SSL port).

This can be -
a) Other web-server application such as Apache, IIS, Tomcat running.
b) Applications like Skype.
c) Windows Services such as BranchCache running.

Only one application is allowed to bind-to/take-up a specific port.

Execute this from the command line…

httpd -t
httpd -k start

(*run from an admin level command-line; right-click cmd.exe, select ‘run as admin’)

The first command will test Apache’s configuration, the second command will attempt to start Apache. Helpful error messages will be reported to you.

If the error message is similar to:

“An attempt was made to access a socket in a way forbidden by its access permissions. make_sock: could not bind to address no listening sockets available, shutting down.”

…then we know that another application has binded to (taken) port 80 and/or 443.

Stop and disable IIS if it’s running. Stop Skype. Stop the BranchCache Service.

See this guide for a larger list of port 80 listeners: Opening Up Port 80 For Apache to Use On Windows

Apache Configuration Issues

Otherwise, the issue is most likely a configuration problem (syntax issue), and running a syntax check will let us know which configuration files and lines are incorrect.

httpd -t

Note that only the first encountered issue is reported, and once corrected, there could be more issues shown.

Apache Running Issues

If Apache starts, but after some time stops responding to requests (does not properly load websites and serve pages), there is most likely an issue with the OS’s networking layer.

Disable Use Of Advanced Networking Functions

On some systems the networking layer is slightly broken due to 3rd-party software that manipulates it and/or attaches filters to it.

[Tue Oct 01 19:22:29 2013] [warn] (OS 995)The I/O operation has been aborted because of either a thread exit or an application request. winnt_accept: Asynchronous AcceptEx failed.

Edit file -

Disable Apache’s use of Windows’ more advanced (faster) networking functions -

EnableMMAP off
EnableSendfile off


If you are using Apache 2.4, instead of Win32DisableAcceptEx (which is only for Apache 2.0/2.2), use this -

AcceptFilter http none
AcceptFilter https none

Save file. Attempt to start Apache.

If this does not help, remove the changes made – as the above directives can cause their own problems later on.

Reset Networking Layer to Default State

Attempt to fix Winsock and the TCP/IP stack by reseting them. This will remove all the 3rd-party filters registered with it (from network, firewall, proxy, and anti-virus software installs).

From the command line run this and then reboot.

netsh winsock reset
netsh int ip reset c:\resetlog.txt

(*run from an admin level command-line; right-click cmd.exe, select ‘run as admin’)

You can see a current list of attached filters (LSPs) with this command -

netsh winsock show catalog

Required Microsoft VC++ Redistributable Packages

If Apache is not able to install or start, and there are no displayed or logged errors, or a Messagebox about a missing MSVCR90.dll or MSVCR110.dll file pops-up, your OS is missing the required Microsoft VC++ runtime DLLs.

For Apache 2.4 compiled under VS.NET 2012 (VC11) download and install Visual C++ Redistributable for Visual Studio 2012 Update 4.

For Apache 2.2 compiled under VS.NET 2008 (VC9) download and install Microsoft Visual C++ 2008 Service Pack 1 Redistributable Package.

Sending Mail

WampDeveloper is purely a web-server, and while PHP has a mail() function, it’s useless if not connected to a real mail server, and is not even capable of doing authentication (user/password login) to that mail server.

Running and setting up a mail server can be a complicated affair, here are some simpler options for you:

If you have access to a gmail, hotmail, or yahoo account; or even a SMTP server (mail server) that’s set up to handle your domain-name, you can get WampDeveloper to use any of these to send out emails…

Options -

Use “msmtp”

msmtp is a local SMTP application that pretends to be a real SMTP server for PHP, but which really just uses your gmail, hotmail, or yahoo account instead; or any SMTP server (mail server) you’ve configured it to use, that it can login to, and transmit everything to -


Notes -
Make sure to get version 1.4.31 or above, and not v1.4.30 due to a bug.
WampDeveloper v4.2 already comes with msmtp v1.4.31 (there is no need to download anything).

1. Download and unzip the above as C:\WampDeveloper\Tools\msmtp
(*C:\WampDeveloper\Tools\msmtp\msmtp.exe should be a valid path afterwards)

2. Create file C:\WampDeveloper\Tools\msmtp\msmtprc.ini and place this configuration inside -

# Default values to use for all accounts
tls_certcheck off
logfile C:/WampDeveloper/Tools/msmtp/msmtplog.txt

# Local Mail Server Account
# This is the simplest example - a mail server on the local network, standard port 25, with no encryption layer
account LocalMailServer
Host mail.domain.name
port 25
auth on
tls off
from user.name@domain.name
# the user name might be an account username, or your full email address
user user.name
password user.password

# ISP Mail Server Account
# Some ISPs provide you with access to a mail server
account MyISP
host smtp.myisp.server
#port 465
auth off
#tls on
#tls_starttls off
from user.name@myisp.com
# the user/password might or might not be required (some ISPs know your IP and give it access automatically)
# the user name might or might not be your ISP provided email address
user user.name
password user.password

# Gmail Account
account Gmail
host smtp.gmail.com
port 587
auth on
tls on
from my.email@gmail.com
user my.email@gmail.com
password mypassword

# Hotmail Account
account Hotmail
host smtp.live.com
port 587
auth on
tls on
from my.email@hotmail.com
user my.email@hotmail.com
password mypassword 

# Yahoo Account
account Yahoo
host smtp.mail.yahoo.com
port 465
auth on
tls on
tls_starttls off
from my.email@yahoo.com
user my.email@yahoo.com
password mypassword

# Default account to use
account default : LocalMailServer

You’ll need to -
a) Edit the above to update the drive letter WampDeveloper is installed on for the “logfile” line.
b) Update your account info for whichever gmail/hotmail/yahoo or SMTP/mail server/service you are using.

The above has been set up with a bunch of defaults for you, and in most cases you’ll just update a) your username/email and password, and b) the default account to use.

3. Edit file -

Uncomment (remove the “;”), and update the path (drive letter), on lines -

sendmail_path = "C:/WampDeveloper/Tools/msmtp/msmtp.exe -d -C C:/WampDeveloper/Tools/msmtp/msmtprc.ini -t --read-envelope-from"

mail.log = "C:/WampDeveloper/Logs/Php/maillog.txt"

Comment out “SMTP =” and “smtp_port =”. This way PHP’s mail() function is using the sendmail application, and not trying to establish it’s own mail server connection.

4. Save edited files. Restart Apache.

Make sure your webapps and/or scripts are configured to use PHP’s mail() function, and not some specific sendmail path or SMTP server. This is what msmtp is for – getting those mail() calls, matching the “From:” address to one of the above accounts, establishing a conection using the account’s settings, and sending your mail via that account’s mail server.

This might require some testing before it starts to work pefectly, as 1) proper mail server settings are needed and 2) the PHP scripts/code you are using must be also using PHP’s mail() function with the proper Headers (From: xxx) included.

Once an email is sent, you’ll be able to see it in the email service’s “Sent” folder.

Be careful not to specify a fake From: address (which does not match your email address for the service) or your emails are going to be tagged as spam.

You’ll also have two log files that you can check -

5. Send test email…

$to = 'someone.else@example.com';
$subject = 'Test Subject';
$message = 'Hello. Testing email.';
$headers = 'From: your.name@your.email.account' . "\r\n" .
'Reply-To: your.name@your.email.account' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);

Running own SMTP server (not recommended)

Some options for SMTP/mail server applications are: hmailserver, mailenable, smartermail, or the native Windows Server SMTP service (*with this one, be careful not to also install and run IIS – which can prevent Apache from binding to port 80 and 443).

You’ll need to first update with your Registrar (domain register – GoDaddy, Namcheap, etc) the DNS records of your mail-server’s domain-names (smtp.your.domain.name) and their IP addresses. Your IPs must be static (can’t change from time to time). Otherwise, set up a local SMTP relay.

Configure the SMTP server to do no-authentication localhost access (PHP’s mail() function does not support authentication – it can only access a SMTP server, but it can not login using a username/password).

Keep the default php.ini settings:

smtp_port = 25

Comment out “sendmail_path =”. This way PHP’s mail() function establishes it’s own mail server connection, and dosn’t attempt to use the sendmail application.

You might also need to specify a proper “sendmail_from” setting.

Use an external SMTP service

Set it up to provide service for mail of your domain name. Make sure your domain’s DNS records reflect this service’s mail server names and IP addresses.

Then do the same thing as is option A. Or if your SMTP service allows no-authentication login via a white-listing of your IP, then just fill in the php.ini settings as in option B except with the IP and Port this service provides.


PHPMailer is able to send mail via an SMTP host such as your local or external mail server (gmail), sendmail (and qmail), and PHP’s mail() function.

If using the mail() option, you can integrate it with MSMTP (*and also if using the sendmail option with some more work).

*This assumes your code/scripts are able to utilize something other than the PHP mail() function.

Examples can be found here:

Download and unzip PHPMailer as -

Then start using it:

$mail = new PHPMailer;

Other Alternatives

Fake Sendmail:

sendmail.exe is a simple windows console application that emulates sendmail's "-t" option to deliver emails piped via stdin.

It is intended to ease running unix code that has /usr/lib/sendmail hardcoded as an email delivery means.

It doesn't support deferred delivery, and requires an smtp server to perform the actual delivery of the messages.