WAMP: Standard installation issues

I just installed a WAMP environment (Windows Apache Mysql PHP) on my computer as I haven’t really been writing any PHP-code recently and I felt like doing it again. I had forgotten the initial issues one might have when installing WAMP and so I though I’d just write down two typical problems you might have when installing your WAMP environment:

Forbidden You don’t have permission to access /phpmyadmin/ on this server.

This problem shows up when your phpmyadmin settings are set to deny all connections. Go to C:\wamp\alias and open phpmyadmin.conf and you’ll see the following section:

<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
</Directory>

change it to:

<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order Allow,Deny
    Allow from all
</Directory>

Restart WAMP.

You might also get the following problem:

Forbidden You don’t have permission to access / on this server.

If you get this problem you might’ve tried to access ‘localhost’ in your web browser. Try to access ‘127.0.0.1’ instead. If you can access 127.0.0.1 but not localhost you need to edit your httpd.conf in your Appache installtion.
Open the httpd.conf and find the following section:


#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

change it to:


#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 0.0.0.0:80

Restart WAMP.

PHP: Enable CURL in WAMP environment

So I needed to enable Curl to run a PHP script today and my WAMP installation didn’t have CURL enabled “out-of-the-box”. This was however easily fixed by following these steps:

  1. Close WAMP
  2. Go to your WAMP installation directory and enter bin\php\php[VERSION] (normally this will be C:\wamp\bin\php\php[VERSION])
  3. Open php.ini in your favorite editor
  4. Search for curl and you’ll find a line similar to “;extension=php_curl.dll“, uncomment it (remove the semi-colon)
  5. Save and close the file
  6. Go to your WAMP installation directory and enter bin\apache\apache[VERSION]\bin\ (normally this will be C:\wamp\bin\apache\apache[VERSION]\bin)
  7. Open php.ini in your favorite editor
  8. Search for curl and you’ll find a line similar to “;extension=php_curl.dll“, uncomment it (remove the semi-colon)
  9. Save and close the file
  10. Restart WAMP