Setting Up WampServer
Posted on May 20, 2016.

Running your own server may be useful for many reasons. Currently, I run my own server to host my course databases and web applications. I recently updated to the latest version and ran into issues where I had to step through the whole setup process again. Since it took me way longer than I hoped, I documented the whole process in case I have to do it again. Here are the steps:

Downloading and Installing WAMPServer (WAMP)

  1. Download WAMP here: http://www.wampserver.com/en/ (Note: my instructions will be for installing WAMPServer 3 – 64 bit & PHP 5.6.15 & PHP 7)
  2. Install WAMP using the recently downloaded file. You may need to install the Visual C++ Distributable located here: https://www.microsoft.com/en-us/download/details.aspx?id=48145
  3. Restart your computer.
  4. Start WAMP.

Configuring Remote Connection to Your Server

  1. Be sure you have your server assigned a static IP address.
  2. Open your httpd.conf file by clicking on the WAMP icon in right side of your taskbar. Select Apache and then httpd.conf.
  3. Find and replace the following lines:
    <Directory />
    AllowOverride none
    Require all denied
    </Directory>

    With:
    <Directory />
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order deny,allow
    Allow from all
    </Directory>
  4. Find and replace the following lines:
    <Directory "C:/wamp64/www/">
    ...
    Require local
    </Directory>

    With:
    <Directory />
    ...
    Allow from all
    </Directory>
  5. Your server should now be accessible remotely using your static IP address.

Configuring Access to Your Database

  1. Open your my.ini file by clicking on the WAMP icon in the right side of your taskbar, select MySQL, and then my.ini.
  2. At the very end of the my.ini document add the following line (replace [server’s IP address] with your server’s static IP address):
    bind-address = [server's IP address]
  3. Click the WAMP icon in the right side of your taskbar and select phyMyAdmin.
  4. Login using root as the username and leave the password blank.
  5. Immediately change the root password by clicking the User Accounts tab.
  6. Locate the root account and click Edit privileges.
  7. Click Change password near where you clicked on the User Accounts tab.
  8. Type in your new password twice and then click Go. You will need to log back in after changing your password.
  9. Next, I recommend that you add an administrative user (leave the root user alone) by doing the following:
    1. Click the User Accounts tab again.
    2. Click Add user account.
    3. Type the new user in the User name and Password fields.
    4. Be sure to define where this user can connect from. If you want this user to access from any location, leave the % as default.
    5. Select whether you will create a database for this user (i.e. Create database with same name and grant all privileges).
    6. Determine what privileges this user will have (e.g. Grant all privileges on wildcard name (username\_%)).
    7. Decide whether the user will have global privileges or certain privileges as desired.
    8. Click Go when you are finished. Repeat for any other users.

Configuring Your Website

  1. Locate the www directory (by default it is found at C:wamp64www) and drop all your web files there.
  2. You should now be able to view your website by navigating to your server’s IP address in a browser.

Configuring SMTP for Sending Emails

  1. Download the php_smtp.dll here: http://www.topdll.com/download/php_smtp.dll
  2. Save this file to C:wamp64inphpphp5.6.16ext.
  3. Edit the php.ini file under the dynamic extensions to include the following:
    extension=php_smtp.dll
  4. Restart the server and your SMTP server should be ready to go.
  5. Additionally, you can download PHPmailer to help with sending emails.

Configuring the Server Timezone

  1. In the php.ini file, change the following line:
    date.timezone = "UTC"
    To:
    date.timezone = "US/Central"
  2. Note: be sure to change the timezone to the correct one unless you live in the central timezone.

Configuring File Upload Size and Total Uploads

  1. In the php.ini file, change the following line:
    upload_max_filesize = 2M
    To:
    upload_max_filesize = [desired max upload size]
  2. In the php.ini file, change the following line:
    max_file_uploads = 20
    To:
    max_file_uploads = [desired max uploads]

Configuring InnoDB

When I queried the information_schema metadata, I wanted to see how the foreign keys of one table are related to other tables. To do this, I made the following change:

  1. Open the my.ini file by clicking the WampServer icon, then MySQL, then my.ini.
  2. Find the following line:
    default-storage-engine=MYISAM
    Change it to:
    default-storage-engine=INNODB

Configuring Mongo

  1. Find and download the php_mongo.dll.
  2. Save this file to C:wamp64inphpphp5.6.16ext.
  3. Edit the php.ini file under the dynamic extensions to include the following:
    extension=php_mongo.dll
  4. Restart the server and you should now be able to use PHP with Mongo.

Configuring Oracle

  1. Find and download the php_oci8_11g.dll.
  2. Save this file to C:wamp64inphpphp5.6.16ext.
  3. Edit the php.ini file under the dynamic extensions to include the following:
    extension=php_oci8_11g.dll
  4. Enable the following extension too:
    extension=php_pdo_oci.dll
  5. Restart the server and you should now be able to use PHP with Oracle.