I have a feeling this question is an age long one. Please forgive me:D
I have IIS and Apache on my computer. Apache would refuse to run unless I stop IIS. I had tried changing the default port number of Apache from 80 to 8080 in the httpd.conf file but no dice. In fact Apache would still not run. What is it am I doing wrong? Below are examples of the edits I did to the conf. file.

# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName localhost:80

Changed the above to

ServerName localhost:8080

AND

# Change this to Listen on specific IP addresses as shown below #to prevent Apache from glomming onto all bound IP addresses #(0.0.0.0)
#
#Listen 12.34.56.78:80

Listen 80

TO

# Change this to Listen on specific IP addresses as shown below #to prevent Apache from glomming onto all bound IP addresses #(0.0.0.0)
#Listen 12.34.56.78:80

Listen 8080

And still no dice!
Even changing the port numbers from the IIS side would still not make apache run unless IIS is stopped all together! Any help would be appreciated!:sweat:

Which versions of IIS and Apache are you running?
And which version of Window$ ?

I'm currently running IIS7 and Apache2.2 on my Window$ 7 without problems, and I only edited those two fields... pretty much exactly how you did it.

Have you checked the error logs from Apache, to see exactly what vent wrong?
Default location for them is C:\Program Files\Apache Software Foundation\Apache2.2\logs\error.log .

You might also want to reboot your PC at least once.
If your on XP or (<insert religious character> forbids) W2k, then you might need to reboot your cities powergrid. (Joking, if that wasn't clear :P)
My point being, if you use Window$, when in doubt... reboot.

I used the current version of xampp installer(that makes it apache2.2) on XP. (i.e. IIS v5).

Hmmm.
Have you tried any other ports than 8080?
Maybe IIS has taken that one hostage to. (Despite what it tells you.)

I don't know XAMPP well enough to know if it messes stuff up like this.
One way to figure that out would be to disable the XAMPP Apache, and install an official version. (The two versions should coexists peacefully.)

If it behaves the same way, you can rule out XAMPP having anything to do with it. If not, then we at least know XAMPP is the bad guy here.

Why not just have one, I am running IIS6 on my Windows Server 2003 and I wouldn't really need an apache server. They both do the same thing but if you are running a windows server edition then you have no need for apache as you can install IIS and ASP.NET engines and front page extensions in one sweep.

Why is it that you need them both installed?

Why not just have one, [..]. They both do the same thing but if you are running a windows server edition then you have no need for apache as you can install IIS and ASP.NET engines and front page extensions in one sweep.

And we all know how important .Net and front page support is for PHP development ;-)
(This is the PHP forum, right?)

Given the choice, most PHP developers would probably choose to keep Apache rather then IIS.
Some of use would actually do pretty much anything to not get stuck with IIS.

Not to mention that some PHP applications rely on, or at least work better with, some of the Apache mods.
mod_rewrite being one of the more popular once.

I used other numbers like 8081, 8082 and still no dice. but I still retry what I did and reboot as you said. thanks for your prompt reply

Did you check the error logs?
The error Apache is generating when it fails to start would be extremely helpful in debugging this.

The file should be somewhere around /xampp/Apache/logs/error.log .

Did you check the error logs?
The error Apache is generating when it fails to start would be extremely helpful in debugging this.

The file should be somewhere around /xampp/Apache/logs/error.log .

I found that while I initially switch off the IIS and apache runs well, on switching on the IIS with the apache still running things are still ok until I try to run an aspx file on localhost. A login/password page is displayed for me to fill which does not normally appear.

Ok. How about the Apache error log?
Were there any error messages in there that might help?

And we all know how important .Net and front page support is for PHP development ;-)
(This is the PHP forum, right?)

Given the choice, most PHP developers would probably choose to keep Apache rather then IIS.
Some of use would actually do pretty much anything to not get stuck with IIS.

Not to mention that some PHP applications rely on, or at least work better with, some of the Apache mods.
mod_rewrite being one of the more popular once.

I'm not debating that, what I'm trying to say is, why both?

Okay so you prefer Apache, then just run apache, not much use in having the two running it will be asking for trouble.

It's like how windows always manages to fuck up the linux partion. Same thing, windows hate everything that isn't windows :P.

No I am having trouble installing PHP on IIS actually :(. I woudl rather keep IIS though.

Yea, Darth Gates and his minions tend not to like Open Source... nor the internet (I mean, they did give the Internet cancer).

But yea, usually I don't bother setting both up at the same time (well, usually I run Ubuntu), but right now I'm in a situation where I'm developing a PHP application and an ASP.Net application.
I would have just used IIS for that, but I need mod_rewrite.

Sooo, I installed both. Wasn't a problem, really, although I never bother with the package things, like XAMPP.
Just installed a standalone Apache version and added PHP to that.
Actually using the same PHP installation for both IIS and Apache :-)

Have to say tho, the IIS that comes with Windows 7 is a WHOLE lot better than the previous versions.
Only took me a minute to set up PHP on it, whereas it took me like a day finding out how to do it on the Windows XP version, and another two until that damn thing understood what I was trying to make it to do.

Ok. How about the Apache error log?
Were there any error messages in there that might help?

I have to second this question.

When you change the apache configuration, restart apache. If it doesn't restart, check the error log file. it will tell you why it didn't - most probably that it could not bind to port :8080 for some reason etc. That should really clear up why it isn't working.

Also, make sure you're editing the right configuration. You may have a virtual host that is still listening on 80. Or there may be more then one config file.

I'm not debating that, what I'm trying to say is, why both?

One good reason is to test how your PHP runs on each.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.