SZT
SZT

Reputation: 1966

How to run ASP.NET and PHP on same machine?

I already have asp.net running on PC now I have installed PHP (xampp) on my machine but it seems to be not working.

Is there any way to stop ASP.NET server (does it have a special name?) on my machine? I have windows xp right now.

Thank you.


EDIT: Thanks all of you guys. I was getting object not found error, but that was because I was putting my php files inside wwwroot folder instead of htdocs (you have to put your php files here when using xampp).

Upvotes: 1

Views: 5673

Answers (4)

Brad
Brad

Reputation: 163252

Separate the web server from what is running your code for a minute. What you have installed is not PHP, but a whole package containing Apache (the web server), PHP (runs your PHP code), and MySQL (database server).

On Windows, the common server used to serve web pages is IIS. You can use both ASP.NET and PHP with IIS at the same time. While there are some hacks to get ASP.NET working under Apache, I wouldn't recommend it, as it will likely cause you more headaches trying to get it working than its worth.

That means that you'll want to use IIS as your web server. All you need to do at this point is install PHP and configure IIS to use it as a CGI application for processing .php files.

Instructions are here: http://php.net/manual/en/install.windows.php

Upvotes: 2

wazz
wazz

Reputation: 5048

i found this helpful: http://www.sitepoint.com/run-apache-iis-same-pc-2/

Upvotes: 0

Mike
Mike

Reputation: 165

It's called Internet Information Services (IIS) and you can use the IIS Manager to stop the service, or you can remove IIS entirely by going to Add or Remove Programs and then Add/Remove Windows Components.

However I find it easier to install PHP for IIS instead of using XAMPP. Microsoft's Web Platform Installer makes it really easy (although I'm not sure if it works on older versions of IIS)

Upvotes: 0

SLaks
SLaks

Reputation: 887195

You should install PHP for IIS instead.

Upvotes: 4

Related Questions