Vista devel setup

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

User avatar
mattcooper
Forum Contributor
Posts: 210
Joined: Thu Mar 17, 2005 5:51 am
Location: London, UK

Vista devel setup

Post by mattcooper »

Hi guys,

I just replaced my old, broken machine with a shiny new machine that is running Vista, and I am not really enjoying the experience. Before I give up and revert to XP, I'd like to ask if anyone has, or knows anyone who has successfully set up a WAMP (on Zend Core) development environment? I can't seem to get name-based multiple hosts working with Apache VHosts; I get DNS errors that I didn't get when doing the very same things I did on XP (including the Hosts file setup).

Any tips people?
fairyprincess18
Forum Newbie
Posts: 21
Joined: Sun Dec 07, 2008 8:54 pm

Re: Vista devel setup

Post by fairyprincess18 »

I installed WAMP on Vista fine. The one issue I had and resolved was that WAMP wouldn't run properly while I had Skype running at the same time. If this a problem you're having, then check out the following link:

http://www.petri.co.il/install_wamp_server_on_vista.htm

You could also partake in a Google search regarding whatever issues you are having.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Vista devel setup

Post by VladSun »

fairyprincess18 wrote:The one issue I had and resolved was that WAMP wouldn't run properly while I had Skype running at the same time.
It's because Skype will use port 80 if it's still unused on its startup. Starting Apache prior starting Skype solves the problem, and you can "happily" use Apache and Skype at the same time.
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
mattcooper
Forum Contributor
Posts: 210
Joined: Thu Mar 17, 2005 5:51 am
Location: London, UK

Re: Vista devel setup

Post by mattcooper »

Thanks for this input. However, I don't have Skype running on port 80 - I'm aware of the conflict there. What is happening is very odd: I have the following setup in my vhosts file:

Code: Select all

 
# - Hangar18 VHosts
<VirtualHost *:80>
    ServerName mosh.matt
    ServerAdmin matt@<myemail>.co.uk
    DocumentRoot "c:/PROGRA~1/Zend/apache2/html/mosh/app"
</VirtualHost>
 
# - H18 VHosts
<VirtualHost *:80>
    ServerAlias h18.matt
    ServerAdmin matt@<myemail>.co.uk
    DocumentRoot "c:/PROGRA~1/Zend/apache2/html/h18/www"
</VirtualHost>
 
and my hosts file looks like this:

Code: Select all

 
127.0.0.1       localhost
 
127.0.0.1   h18.matt
127.0.0.1   mosh.matt
 
If I navigate to h18.matt or localhost I am served the files from the h18/www directory. However, if I try mosh.matt, the browser hangs and then tries to serve http://www.mosh.matt.

I'm sure this is the configuration I had on my old, now broken, laptop... have I missed something?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Vista devel setup

Post by VladSun »

Why are you using ServerAlias?
You should use ServerName again.
http://httpd.apache.org/docs/2.0/mod/co ... erveralias
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
mattcooper
Forum Contributor
Posts: 210
Joined: Thu Mar 17, 2005 5:51 am
Location: London, UK

Re: Vista devel setup

Post by mattcooper »

Yeah, well spotted, however that particular site was working. I've changed that setting and still I have the same issue. However, if I browse to hangar-18.matt, the mosh.matt pages aree served :?

Any further thoughts before I uninstall Core and try Wamp?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Vista devel setup

Post by VladSun »

What is the output of:

Code: Select all

ping mosh.matt
?

Did you read the Apache error log file?
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
mattcooper
Forum Contributor
Posts: 210
Joined: Thu Mar 17, 2005 5:51 am
Location: London, UK

Re: Vista devel setup

Post by mattcooper »

The log file has nothing helpful in it at all, there do not appear to be any httpd errors. Ping returned:

Code: Select all

 
C:\Users\Matt>ping mosh.matt
Ping request could not find host mosh.matt. Please check the name and try again.
 
suggesting a DNS problem, however, the entry for mosh.matt is clearly in the hosts file.

I've now installed WampServer and still cannot get this working. Hosts file is the same, I set up a VHost for mosh.matt, still no luck:

Code: Select all

 
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.localhost/mosh/app/webroot"
    ServerName mosh.matt
    ErrorLog "logs/mosh.localhost-error.log"
    CustomLog "logs/mosh.localhost-access.log" common
</VirtualHost>
 
Using http://localhost/domain works, but I've been using domain.matt for so long now it feels odd to change :(
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Vista devel setup

Post by VladSun »

mattcooper wrote:Ping returned:

Code: Select all

 
C:\Users\Matt>ping mosh.matt
Ping request could not find host mosh.matt. Please check the name and try again.
 
suggesting a DNS problem, however, the entry for mosh.matt is clearly in the hosts file.
Clearly, it's a DNS problem. So, for now consider your virtual host config correct and search somewhere else.
Try adding a new empty line after the last line in your hosts file... I can't think out anything else...
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
mattcooper
Forum Contributor
Posts: 210
Joined: Thu Mar 17, 2005 5:51 am
Location: London, UK

Re: Vista devel setup

Post by mattcooper »

OK, clearly I'm going to have to go back to the board on this, I don't know why my XP conf won't run on Vista, but I can't say I'm surprised, nothing about this OS has impressed me so far.

Thanks for you time anyway :)
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Vista devel setup

Post by John Cartwright »

That's why I have dual boot Vista and Ubuntu on my laptop :)
Doug G
Forum Contributor
Posts: 282
Joined: Sun Sep 09, 2007 6:27 pm

Re: Vista devel setup

Post by Doug G »

fwiw, on my vista business with IIS7 I can put a bogus name for localhost in the hosts file, ping it and open a browser to a page that's on my local IIS without any problems. I don't have Apache on the computer. Maybe you have some firewall or security software causing your problem?.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Vista devel setup

Post by VladSun »

Doug G wrote:Maybe you have some firewall or security software causing your problem?.
Firewall rules are applied on IP basics, so a DNS problem is the one to search for in this case. Also, the browser behavour described above suggests that it's a DNS problem (unresovable DNS name), not an unreachable IP address.
There are 10 types of people in this world, those who understand binary and those who don't
Doug G
Forum Contributor
Posts: 282
Joined: Sun Sep 09, 2007 6:27 pm

Re: Vista devel setup

Post by Doug G »

Firewall rules are applied on IP basics, so a DNS problem is the one to search for in this case. Also, the browser behavour described above suggests that it's a DNS problem (unresovable DNS name), not an unreachable IP address.
Except localhost is a special DNS case handled by hosts file mapping and in some cases some hardcoded stuff.

If the firewall isn't the issue, you might try commenting out the ipv6 localhost entry in your hosts file.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Vista devel setup

Post by VladSun »

Doug G wrote:Except localhost is a special DNS case handled by hosts file mapping and in some cases some hardcoded stuff.
As you know "hosts" file was used for IP resolving before the DNS services have been used in Internet. So, nothing special about "localhost" - it's still a domain name ;)
As you said, simply some programs use internally "localhost", and not 127.0.0.1. And yes - this IP is considered a special case :)

In Linux you must bring lo (loopback) interace up with IP 127.0.0.1, and have localhost mapped to it in hosts file in order to use "localhost" the way you expect it.

Also, I'm pretty sure that "ping localhost" will work on mattcooper's machine, so his problem has nothing to do with "localhost" IP mapping. You said that:
bogus name for localhost in the hosts file
In fact, you put a bogus name mapped to 127.0.0.1 and not for the "localhost" name.

@mattcooper - do you still have this problem? Event after Vi$ta has been restarted ...
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply