Directory Name invalid
Posted by: Laxpat (---.hsd1.ca.comcast.net)
Date: February 27, 2013 12:06AM

Setting up a new Wampserver installation and have several problems. I can't get to localhost from the Wampserver panel. It tells me that the directory is invalid. The same happens with myphp. I can get to local host manually.

Options: ReplyQuote
Re: Directory Name invalid
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: February 27, 2013 12:39AM

Actual error messages would be more useful and a bit of information about which windows you are using, but it sounds like this may help you.






Right, Windows as of Windows7 comes with the ability to use the IPV4 network address range and the IPV6 network address range and by default they are both turned on.
IPV4 addresses look like this: 123.321.10.234
IPV6 addresses look like this: 2001:0db8:85a3:0042:1000:8a2e:0370:7334

The IPV4 address for localhost is 127.0.0.1
The IPV6 address for localhost is ::1


See
[en.wikipedia.org]
[en.wikipedia.org]
[en.wikipedia.org]


However, Wamp's security as of now ( Feb 2013 ) is only configured to expect the IPV4 address range, but the Apache that is delivered with WAMPServer is aware of both the IPV4 and IPV6 address ranges and is happy to use either or in fact both.
I am not sure how Windows/Browsers decide which range to use but it appears to be fairly arbitrary, so you can get either.

This is the route of your problem.

There are 2 ways you can go to solve this small anomily. You can either ignore the IPV6 address range or change the security to include the IPV6 address range.


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
KEEP COPIES OF ALL FILES CHANGED SO YOU CAN EASILY UNDO THESE CHANGES IF THEY DO NOT WORK FOR YOU

In fact copy c:\wamp to a backup location and then you can just replace
the whole folder if you have problems with your changes.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Option 1 is easier to do.
==============================================================

Option 1:
Ignore the IPV6 address range.


Use the wamp menus to edit these files where possible.

edit httpd.conf
change Listen 80 TO Listen 0.0.0.0:80
The 0.0.0.0 part tells Apache to only listen on IPV4 addresses.


edit c:\windows\system32\drivers\etc\hosts
If it exists, remove or comment out (comment is a # in colum 1) the line containing the IPV6 address for localhost >::1 localhost
(This makes the domain 'localhost' disappear from the IPV6 network, its existance is not hard coded anywhere it has to be mentioned in the hosts file to make it exists)
Make sure you have a line in the hosts file like this >127.0.0.1 localhost
(This makes the domain 'localhost' exists on the IPV4 network)

Wamps security should now work after a reboot. And
http://localhost
should now get you to wamps Apache installation. The exisiting security should also now work for phpMyAdmin,WebGrind and SQLBuddy


============================================================
Option 2:
Add the IPV6 address range to wamps security.


Again always use the wamp menus to edit these files where possible.

!!!! Make sure WAMP is set to 'Offline' before starting this part.


Now this is the dangerous bit!!!!! You must get these next 2 edits right. The text between the double quotes in C:\wamp\scripts\onlineOffline.php must match exactly that used in the httpd.conf file, so a copy and paste would be recommended. If you get this wrong the Online/Offline process will not work.

edit httpd.conf

Change
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1

TO
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 ::1

Note we have added the ::1 IPV6 localhost address to the security, make sure there is a space between 127.0.0.1 and ::1.


Edit C:\wamp\scripts\onlineOffline.php
Change

$offlineText = "# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1";

TO

$offlineText = "# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 ::1";

This makes sure that the Online/Offline process still works in WampServer. Make sure that this exactly matches your change above made to httpd.conf


Now edit each of the files
C:\wamp\alias\phpmyadmin.conf
C:\wamp\alias\sqlbuddy.conf
C:\wamp\alias\webgrind.conf

were ever you see >127.0.0.1 change it to >127.0.0.1 ::1
Ignore the lines that start with a #, as these are comment lines

This tells Wamp that whichever ip address from either address range you get for the domain localhost, is allowed to access the apache server.
Now whichever address range windows/browser picks for you when you use the
http://localhost
domain the security will allow you in.

edit c:\windows\system32\drivers\etc\hosts
In Windows8 you will probably see both domains in the file, but this is not guaranteed. When you are finished it should look like this.

127.0.0.1 localhost
::1 localhost

This makes the domain localhost appear on both the IPV4 and IPV6 address ranges.


When you get as far as accessing MySQL you will see that the 'root' user is configured so that it can be accesses from localhost and 127.0.0.1 and ::1 so that is all ready to go and needs no changes.

If you decide to change the password for the 'root' userid in mysql, make sure you use the same password for all the instances of root that exist in mysql. A complete MySQL userid is associated with a location, so it is not the same userid when you login from root@127.0.0.1 as when you login from root@::1. This is why there are 3 'root' userids in the default MySQL userid configiration.

Options: ReplyQuote
Re: Directory Name invalid
Posted by: Laxpat (---.hsd1.ca.comcast.net)
Date: February 27, 2013 01:15AM

I have done some of that but I will read the entire response before determining whether the problem is fixed. I am running Windows 7 The error message looks like this:
Could not execute menu item (internal error) [exception] Could not execute run actions: The directory name is invalid.




exactly the same error for my PHPadmin

Thanks for the response.

Options: ReplyQuote
Re: Directory Name invalid
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: February 27, 2013 01:30AM

Actually now I see the error message it looks like wampmanager is giving that error and not apache.


Have you read the STICKY [forum.wampserver.com] about which C runtimes are required for wamp amd apache to run

Options: ReplyQuote
Re: Directory Name invalid
Posted by: Laxpat (---.hsd1.ca.comcast.net)
Date: February 27, 2013 02:15AM

Not yet but I will.

Options: ReplyQuote
Re: Directory Name invalid
Posted by: Laxpat (---.hsd1.ca.comcast.net)
Date: February 27, 2013 02:17AM

I see only two stickies neither of which says anything about C

Options: ReplyQuote
Re: Directory Name invalid
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: February 27, 2013 11:14AM

I put a link in the previous post to the Sticky. Visual C++ is C, plus a bit. Excuse me!



WampServer menu uses libraries from ( VC++ 2008 x86 ) so it also must be installed.

It should be installed by default in most versions of Windows , just check Add/Remove programs to see if its listed)


It can be downloaded from here
[www.microsoft.com]

Options: ReplyQuote
Re: Directory Name invalid
Posted by: Laxpat (---.hsd1.ca.comcast.net)
Date: February 27, 2013 05:12PM

I checked the sticky and installed VC++ x86, rebooted and nothing was changed. I have followed the recommended steps above (option 1) with no change. Should I try option 2? Is there anything else you can suggest?

Options: ReplyQuote
Re: Directory Name invalid
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: February 27, 2013 05:29PM

No out of ideas.

If you install TeamViewer I can have a look at what is actually going on that would help.

TV is free for casual use. If you would like to try this then install it and then send me a Private Message with the ID and Password. Either myself or Steve will pick it up

Options: ReplyQuote
Re: Directory Name invalid
Posted by: Laxpat (---.hsd1.ca.comcast.net)
Date: February 27, 2013 05:33PM

I decided to try uninstalling and reinstalling Wampserver. Bingo. Now I can get to local host and myphp. Thanks for the help. I'm guessing that not having all the programs installed made the first installation bad but, no matter, it's working now.

Options: ReplyQuote


Sorry, only registered users may post in this forum.