Perhaps this is a question for the Configurations forum, but I as it tangentially involves ASP.NET I thought I would start here.

My company has contracted a vendor to build website that we could host on our own servers which would, among other things, display a catalog of our products. As the site would NOT be a shopping cart , but perhaps still in an oversimplification of what we needed, it was agreed that it would be built using WP and THEN work in conjunction with our IS/IT dept to couple the WP with our own inventory DB.

We had several meetings with the vendor and our IS/IT dept prior to the contract being signed and work starting on the site. However it appears no server maintenance people within the IS/IT dept were brought to the meeting.

As expected the vendor wanted development space in our servers, which originally seemed like a simple idea. On last Friday a bombshell was dropped, essentially the following: our company servers/pages use ASP.NET and SQL, not PHP ( this I knew, or had an inkling to) and as such they could not set up the dev space for our vendor.

Here are my questions in a nut shell, knowing that PHP and .NET are two different animals.

  1. WHY CAN’T the SAME server run PHP and .NET? The sever maintenance made it seem as if this was an near impossibility.
  2. Assuming that the answer to #1 is PHP can be installed simultaneously with .NET why can’t there be a WP installation as well ( assume for the sake of simplicity that this installation runs off it’s own MYSQL DB… etc. Essentially an independent site, hosted in the same server , concurrently with the .NET apps, but separate.
  3. Are not MYSQL and SQL so SIMILAR that, barring transactions, the two installations could have basic communication?
  4. SO in theory, would it not be possible to build a ‘bridge’ , instantaneous or not, between the DBs of the two installations?

I understand the task might not be the optimal and most graceful solution, but the question is is it still reasonably possible. All suggestion welcome. Thanks in advance!

  1. It can and I’ve done it before. Just install PHP in IIS. It’s been a little while since I did it, but I don’t remember having any hangups and that it was pretty straight forward. Just install and run *.php pages. Quick and simple. I’m not familiar with Mono implementations, but I’m sure it can do both as well.

My last job I had my server running IIS7 serving up ASP.Net MVC3 applictions, Coldfusion 9 applications, and PHP/MySQL for Piwik and phpMyAdmin. (The MS SQL Server was a separate physical server, however)

  1. There aren’t any technical reasons. There may be implementation reasons though, which could be overcome with the right amoutn of effort. There’s really no way to know how that specific server is implemented. But judging by their answer for #1, it seems that their SysAdmins are lazy and are trying to blow smoke up your butt or incompetent idiots who actually believe they can’t be installed together. So, you may be at the mercy of their bad employees. There should not be any specific implementation reasons why PHP can’t be installed. Installing PHP is nothing more than telling the computer how to read and interpret PHP files, just like any other JIT or Interpreted language (like Python, Perl, Ruby, LUA, AutoIt, etc.)

  2. I’m sure they could, if not through direct DB to DB communication, but through some sort of scripting translation via PHP or ASP.Net. Implemented SQL Server for PHP isn’t that hard and doing MySQL in ASP.Net isn’t hard in theory (but I remember having hangups here in the past).

  3. Yes. Alternatively to what I said in 3, if you want to keep each one sandboxed you could have them just send back JSON or XML data.

ie: ASP.Net wants data from MySQL, it asks a PHP page for it and the PHP page returns JSON which is then used by the ASP.Net as if it was talking to the DB itself.

This would save all the mucking around trying to get each to talk to a DB it doesn’t really like to talk to.

Thanks so much.

In all honesty, the guys from IT/IS are quite a busy. Still, resources or not, it seemed nearly irrational to even have believed that PHP and .NET couldn’t exist on the same server. From the start we pretty much expected that creating a communications bridge between the two may be a challenge, but as I said our server guy even an installation of PHP was nearly impossible!Originally I was thinking along the line of you answer to #3 and #4 but their response disheartened me. I was also think that if worse came to worse, the WP site could be used for output only, keeping our current .NET dashboard to update product info as we have always done ( even if 33% of the reason for the new site was to fix the clunky , inflexible control panel)

Thank you for your answer.

.NET is a framework on which a large number of different languages can be run - PHP is one of those languages.

There are probably some differences in coding between PHP.NET and PHP running on other frameworks so knowing that you can write PHP to run on .NET isn’t going to help you with this particular problem as you probably don’t want to have to rewrite the script for .NET.

I just thought I’d point out that PHP is a possible choice of language for .NET and so they can of course exist on the same server just as any other language that runs on .NET can coexist with .NET.


.NET is a framework on which a large number of different languages can be run - PHP is one of those languages.

poor phrasing on my part, I was saying it seemed irrational to see .ASP (.as in ASP.NET) files and assume that we couldn’t host WP because we cant run PHP concurrently.

My windows server runs ASP.NET as well as PHP and runs both MySql and MSSQL. But PHP and .NET can connect to any of the database servers. For the lazy sysadmins that do not want to set it up, get them to install webmatrix on the server. Then in IIS they can get a GUI with next buttons and can install PHP and WP through that.

You don’t even need webmatrix – just the web PI from ; you can have multiple versions of ASP.NET and PHP running side-by-side in minutes without doing IIS surgery. I think you could even get away with running them in the same site on some level though there are probably interesting landmines there.

Yes, both things can talk to just about any database. With the DTC you can even have transactions cutting across mysql and mssql. I would recommend having the .NET app communicate with the PHP app over http and web services rather than reading / writing to the same database. You want a clean demarcation there. Your future self will thank you. Or the violent psychopath who replaces you will not end up hunting you down.

I would pretty strongly recommend the vendor use their own QA environment and not develop on your production server. Especially if this is hosting something as sensitive as inventory.