Re: IIS, ASP & PHP - is it possible?
From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 09/26/04
- Next message: David Wang [Msft]: "Re: IIS can't serve Asp page"
- Previous message: David Wang [Msft]: "Re: IIS Service on XP Pro SR2"
- In reply to: Matthew Brookes: "IIS, ASP & PHP - is it possible?"
- Next in thread: -Alex: "Re: IIS, ASP & PHP - is it possible?"
- Reply: -Alex: "Re: IIS, ASP & PHP - is it possible?"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 26 Sep 2004 01:40:41 -0700
Yes, IIS is perfectly able to run both ASP and PHP on the same server at the
same time.
In fact, IIS can run just about everything at the same time, assuming those
programs are written to work with each other. For example, it is very
possible to run HTML, ASP, ASP.Net, PHP, Perl at the same time because those
technologies are very well behaved and do not affect one another. Things
are a little more challenging when you try to run Cold Fusion, Websphere,
Tomcat, and JSP since those technologies take over the server a bit more and
can cause conflicts.
Here is a conceptual description of how IIS handles requests.
After parsing the request and determining the actual URL that is to be
executed, IIS determines whether it is static or dynamic and executes it
appropriately.
A static request is one that doesn't need any processing on the server (i.e.
it's static and non-changing) prior to sending to the browser -- like a HTML
page, GIF/JPG image, etc
A dynamic request is one that needs some processing on the server to send
out a response to the server, and IIS distinguishes between those that are
scriptmapped (i.e. the URL points to a resource that needs to be interpreted
by a script engine, such as ASP, ASP.Net, PHP, Perl , before a response can
be sent out) and standard ISAPI/CGI which are directly executable by IIS to
generate a response.
Thus, an ASP page is simply a resource on the server containing script
commands. IIS has a line of configuration which maps all requests to .asp
extension to the ASP script engine. When you make a request to a .ASP URL,
IIS looks up the configuration, sees that it is scriptmapped to an ASP
script engine, and hands the URL to the ASP script engine, which then opens
the ASP file, reads and executes its contents, and sends the response out.
PHP works in much the same way. Once you install the PHP files on the
server, you will have to add a line of configuration to IIS which maps all
request to .php extension to the PHP script engine -- so that all .PHP URLs
get handled by the PHP script engine, which will open the PHP file, read and
execute its contents, and send out a response.
PHP happens to have two forms of extensibility for IIS -- an ISAPI version
and a CGI version. Either will work, though I tend to recommend the ISAPI
version if it is stable for you -- because it is a format more native to IIS
and will likely be the wave of the future.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Matthew Brookes" <mattyb@matthewbrookes.(spam)com> wrote in message
news:Ilu5d.4797$5O5.2796@news-server.bigpond.net.au...
Hi, I'm a small business web developer, and I don't know much about servers.
I generally develop in ASP, and am looking at doing some work in PHP too.
I run IIS 5.0 and Win 2000 Pro on my machine. I want to know if it's
possible to run ASP scripts and PHP scripts on the same machine?
Does the server just distinguish between them based on the file extension?
I've seen all the info on www.php.net regarding PHP on IIS, but I'm worried
that I'll if I install it I won't be able to run my ASP scripts.
Thanks,
Matt.
------------------------------------------------------------------------
"Any intelligent fool can make things bigger, more complex,
and more violent. It takes a touch of genius -- and a lot of
courage -- to move in the opposite direction."
- Albert Einstein
------------------------------------------------------------------------
- Next message: David Wang [Msft]: "Re: IIS can't serve Asp page"
- Previous message: David Wang [Msft]: "Re: IIS Service on XP Pro SR2"
- In reply to: Matthew Brookes: "IIS, ASP & PHP - is it possible?"
- Next in thread: -Alex: "Re: IIS, ASP & PHP - is it possible?"
- Reply: -Alex: "Re: IIS, ASP & PHP - is it possible?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|