3

I apologise if this is an idiot question but I've not had much expertise in this area.

I have a php website which needs to work under the same domain name as .net website, how can I go about achieving this? My first thought was to host them both together but I wasn't sure if you could run two different languages on the same hosting? I would be most grateful if you could let me know.

3
  • What kind of operating system does your host system have?
    – Grrbrr404
    Nov 21, 2011 at 12:47
  • 2
    Wiht IIS you can run both PHP and .NET, you'll need to have Windows OS though
    – matino
    Nov 21, 2011 at 12:48
  • Hosting both of them should be possible if you have a windows (virtual) server.
    – CodeInChaos
    Nov 21, 2011 at 12:48

7 Answers 7

2

There may be alternative / better solutions however can definitely do this under Windows using IIS - the simplest method would be to either tell IIS to handle all requests for files with .php extensions using PHP, or alternatively to have IIS handle requests in one virtual directory with PHP and requests in another virtual directory using ASP.Net.

There are plenty of resources on the web on how to run PHP under IIS / Windows:

2

Of course you can run both. There's absolutelly no problem with that. If you need hosting provider, you should look for windows (iis) hosting that supports PHP (there's plenty). If you host yourself, see Kragen's answer.

0

Absolutely yes, nowadays you can find many windows hostng provider that support both PHP and .NET. One of them is asphostportal.com.

-2

If the website is running Linux, perhaps Mono could be useful to you?

(but I don't know much about .net)

1
  • 1
    My mother once said you should not say anyt6hing if you know you dont know the answer.
    – TomTom
    Nov 22, 2011 at 5:39
-2

I just googled and found some links that may interest you:

1
  • You dont need to run IIS AND APACHE.. but i suppose that is 'one' of the options
    – ppumkin
    Nov 21, 2011 at 12:52
-2

You can run both .net and php on IIS. Or if you'd like to do so, you can run .net on IIS server, and PHP on apache or nginx.

-4

You wont find a paid hosting solution that will do "both" at the same time.OK - Apparently there are- I just could not find any for under 20USD a month.

I thought You will need to buy the PHP platform and .NET platform and code your site to use the best of both worlds - for the price of two.(somebody like streamline . net)

If you can get a VPS (virtual private server) will be cheaper and more configurable, create a windows(with IIS)[or WAMP] and Linux(Apache + PHP)[LAMP/XAMP]

But it is possible to run 1 platform only with the latter running as plugin.

Using that you can use .NET /PHP togheteher BUT -

on Linux the PHP is Long term support and .NET is an addon(not supported via LTS)

on Windows .NET is the base with PHP an addon(installable executable and works good- but not supported by Windows in any way)

So the support for the 'addon' is not long term and used at your own risk with updates being released for it much later than the base version.

Ideally,

if you can you make your own VPS server, and create your own Virtual Server completely stand alone on the same machine,with several virtual platforms using private ports internally to communicate with each other. Windows Server and Linux Distro and make them "talk" to each other in the way you like. Then a third could host the actual site and use whatever software you need form the other two VPS's That would be supported by each respected vendor and you will always have the latest updates available directly on the platform.

3
  • -1: There's plenty of windows hosting that do "both" and the whole answer gives WRONG feeling that it's supercomplicated to achieve.
    – Sandman4
    Nov 21, 2011 at 13:29
  • -1. On Linux PHP is base? Since when is PHP part of the kernel? Oit is an add on like anything aove the linux kernel. The answer is misleading.
    – TomTom
    Nov 22, 2011 at 5:40
  • OK- Call up Microsoft Tech support and tell them that your .NET package is knackered on Ubuntu.. they wont support you! I did not say KERNEL - Base- as in the main repositories - apt get apache (installed) how easy is it to apt get .NET???? I searched days and could not find. My answered is from personal experience as normal user. Reconsider your -1 - ass all the answeres are IIS-- wow.
    – Piotr Kula
    Nov 22, 2011 at 8:17

You must log in to answer this question.