Archive | Apache RSS feed for this section

Download phpssh2.dll extension for PHP 5.3 compatible with WAMP Server 2.1

6 Jun

A project that I am working on now requires shell access basically to dynamically create cron jobs. This took me a minute and will be the topic of an upcoming post but for now, in my local WAMP based dev environment, I need SSH2 set up and good to go. I quickly found out that the version downloaded from the official PHP site needs to be compiled in a DLL.  No time and not set up with MS Visual Studio for that. I was able to procure a version that worked with my local set up of WAMPServer V2.1 on Windows XP:

You can download it here.

Hope it helps!

WAMP Apache Error: “You don’t have permission to access / on this server”

25 Apr

Installing and setting up WAMP is a breeze on Windows, but you are bound to run into issues. I’ve encountered a peculiar one this weekend while trying to run a PHP application I am working on. I had XAMPP already running on my machine, and to avoid having both WAMP and XAMPP lauching by side, i decided to switch all my projects to running on the Apache server provided by WAMP. To do so, i needed to set up a Virtual Host to point to the directory previously holding the projects i had running under XAMPP. I modified my httpd.conf this way:


#Uncommented the line loading the Virtual Host configuration file

Include conf/extra/httpd-vhosts.conf

Then in the httpd-vhosts.conf file.

<pre>#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#

<Directory "C:\Dev\Workspace">
  Order Deny,Allow
  Allow from all
  AllowOverride all
</Directory>

<VirtualHost *:80>
    ServerAdmin aboukone@aboukone.com
    DocumentRoot "C:\Dev\Workspace"
    ServerName localhost.dev
</VirtualHost></pre>

With the configuration set up that way, I lost all access to my localhost when starting WAMP. I could access all the projects in the C:\Dev\Workspace folder, but not the ones in the C:\wamp\www standard folder. I could still access phpmyadmin web interface but nothing in the www folder, even a simple html file. Trying to access for example the WAMP index page (www/index.php) would get me:

<h1>Forbidden</h1>
You don't have permission to access / on this server.

I tried messing with the settings in the httpd.conf for the DocumentRoot at C:\www\wamp folder to Allow All, minding that this is unsafe on a live web server :

<pre><Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Allow all
</Directory></pre>

but got a:


The requested URL / was not found on this server.

error from Apache. A clue about going on to fix this came from commenting out the VirtualHost configuration line again in httpd.conf. That done, I was back in business with my www folder being visible again as well as all the projects within. It seemed that the VirtualHosts configurations were overriding the default Server configuration in httpd.conf. I then added the following code in httpd-vhosts.conf and both my C:\Dev\Workspace and C:\wamp\www folder were again “visible” and I was able to access projects in both locations:

<pre><Directory "C:\Dev\Workspace">
  Order Deny,Allow
  Allow from all
  AllowOverride all
</Directory>

<VirtualHost *:80>
    ServerAdmin aboukone@aboukone.com
    DocumentRoot "C:\Dev\Workspace"
    ServerName localhost.dev
</VirtualHost>
#Added this configuration for the WAMP www folder
<VirtualHost *:80>
    ServerAdmin aboukone@aboukone.com
    DocumentRoot "C:\wamp\www"
    ServerName localhost
</VirtualHost></pre>

Hope it helps!

Follow

Get every new post delivered to your Inbox.

Join 453 other followers