Portal Home > Knowledgebase > Articles Database > Converting a website ASP to PHP


Converting a website ASP to PHP




Posted by troboy, 10-26-2010, 02:13 AM
Hi I have a website written in ASP language and want to convert it in PHP Can anybody help me ? Any tips ?

Posted by drspliff, 10-26-2010, 04:23 AM
Enjoy the long & arduous task of re-writing it from scratch.

Posted by RoseMary3, 10-26-2010, 04:44 AM
i think there is no other way accept re-write all your code

Posted by ArabCoders, 10-26-2010, 04:53 AM
if the codebase is big, i would suggest that you, Use some sort of PHP framework such as cakephp for example, it will cut large part of the coding time p.s: sorry for my bad English skillz! :x

Posted by petteyg359, 10-26-2010, 05:00 AM
Try Google.

Posted by troboy, 10-26-2010, 06:27 AM
Hey Thanks for that link

Posted by caffeinejolt, 11-03-2010, 12:43 AM
I have used this tool before: asp2php (forum prevent me from including a url - you can google it) and it does work for very simple sites. The generated PHP and/or the params used to handle the conversion may need some tweaking. Might work for you.

Posted by Shinary, 11-03-2010, 03:17 PM
Unless it is a fairly sophisticated conversion tool I would highly recommend rewriting the application. Sure the conversion might work, but then you could be left with an un-maintainable and bug-ridden codebase that will be an uphill battle to ever modify/extend. How large of an application are we talking about? How long has it been in development? Did you write it, or did someone else? Last edited by Shinary; 11-03-2010 at 03:17 PM. Reason: expanding my question

Posted by caffeinejolt, 11-03-2010, 03:24 PM
Yeah - a rewrite is preferred if you have to live with the code. However, if you just want to get it working as quickly as possible and don't see a lot of maintenance, then a converter can be nice.

Posted by Ramprage, 11-03-2010, 03:31 PM
Take your time and rewrite it manually. You'll be happy you did.

Posted by sivasakthiinfotech, 11-05-2010, 02:19 PM
Check this tool http://www.design215.com/toolbox/tra...rans_login.php This will reduce your time. microsoft have a ASP TO ASP.NET and PHP to ASP.NET conversion tool you can download. http://www.asp.net/downloads/archive...php-to-aspnet/ It isn't great, but it does the job.

Posted by File1eu, 11-05-2010, 04:03 PM
Remember that coding in PHP is a lot more advanced compared to ASP. For example, PHP uses lazy evaluation and provides single, double and triple = comparisons. ASP is also case insensitive unlike PHP. In ASP this would look like: When you start doing ASP and PHP at the same time it's very easy to get confused and write a=b in your PHP application which can cause a lot of strange bugs. Another thing to remember is that PHP has like a thousand functions. Whether you want to reverse an array or filter out HTML chars from a string: PHP has built-in functions for this kind of stuff, in ASP you would write probably write your own function.

Posted by sivasakthiinfotech, 11-05-2010, 06:19 PM
ASP to Php converter will do these job.

Posted by Shinary, 11-05-2010, 06:26 PM
Maybe I just think differently than other people, but the idea of code conversion like that just makes me nervous. There are just far too many unknowns when translating one language into another like that. But then again I've never really trusted code generation tools.

Posted by sivasakthiinfotech, 11-05-2010, 06:36 PM
I agree. But code conversion is only to save our time. After conversation you will need to do minor changes in php tags. Use it at first.

Posted by ClericX, 11-05-2010, 08:10 PM
I'm going to have to go with everyone else and say re-code everything manually. If it's a really large website and you don't have the time or resources to do so, I suppose you can try the conversion tool, but note you will almost definitely have to still make various manual changes to the generated code.

Posted by Mike Johnson, 11-07-2010, 02:28 AM
Yup, rewrite from scratch. Classical ASP was garbage.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
about nginx and WHMCS? (Views: 801)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.