Scorpion King
Scorpion King

Reputation: 1938

php website to aspx .net website

I was working on a rewards website in php and mysql. I have almost finished everything but the client now wants the website to be in .net and not php. Most of the php coding is completed and it is not possible to start from scratch in .net and finish the whole website in 2 weeks.

I am good with php but not much knowledge about c# or aspx. is there any chance that i can just modify the php pages into aspx pages or create new aspx pages and re-direct? I am basically clue-less here so i need some suggestions.

Appreciate any help provided.

Upvotes: 1

Views: 797

Answers (4)

Miloslav Beňo
Miloslav Beňo

Reputation: 168

It's little bit crazy requirement from your client try to change a platform 2 weeks from a deadline.... Anyway, the easiest way for you to achive this, is to use Phalanger - PHP compiler for .NET. You would just compile your PHP code into .NET assembly and the problem is solved.

Upvotes: 1

NullUserException
NullUserException

Reputation: 85478

Explain to your client that this is not feasible. Besides, they'll now have to pay a whole lot of money to Microsoft for the server stack. Besides PHP runs fine on Windows, with Apache or IIS.

if they still won't do it... Depending on their knowledge level you can just "fake" your PHP pages as ASPX. That's really easy to do with Apache. Just add the following line to your .htaccess file:

AddType application/x-httpd-php .aspx

And rename all your .php files to .aspx. Sometimes clients are just stubborn and want a particular technology but have no clue why they want to do it. It's usually because "someone" told them it XYZ was "better."


Edit: There's nothing stopping you from integrating the new website into their existing ASPX website, even though they are not using the same technology. I suppose they have a MSSQL backend, and PHP can connect to that. With a little work (and cookies), you can even make it seamlessly keep the user logged into both sites.

Upvotes: 3

Joshua Partogi
Joshua Partogi

Reputation: 16435

Would running PHP on IIS be an option? As others have mentioned, PHP and ASP.NET is two different beast and you would have to rewrite the code.

Upvotes: 0

Daniel Sorichetti
Daniel Sorichetti

Reputation: 1951

There's no automatic way to port it to ASP.NET. I would suggest talking to your client and explaining the situation, and that it's gonna take a long time to rewrite the code in ASP.NET (you should still ask for your payment now)

Upvotes: 0

Related Questions