Click here to Skip to main content
Click here to Skip to main content

asp2php shell

By , 21 Aug 2005
 

Sample Image - a2pshell.jpg

Introduction

OK, well, this isn't going to change the world or anything but I developed it because I needed it and I figured I'd share it with y'all because we do that at CodeProject right?

What is it? Well if you have ever tried to use the .asp to .php conversion utility (asp2php written by Michael Kohn) you may have had the same problems I had to do with converting whole directory structures in one go. It seems as though a single file error causes the whole conversion process to abort. Then you have the choice to convert the files one by one (ugh!) or write something like this (yay!).

Michael has done a great job on the utility and although it's not perfect it sure does give you a good start when you have to convert a site from .asp to .php.

Using the code

The code presented here isn't anything radical like I said before but it may prove useful to some people who don't know how to do things like recursive file searching and shelling out to other apps. The code is commented enough and simple enough to be understandable by most people. I think so, I'm not going to go into detail here ... just look at it and say "big deal!" I know there are a lot of you who are way better than me at writing code so any idiot mistakes you find please let me know ... as well as anything that could be done better if you can be bothered to tell me about them :)

Acknowledgements

Oh yeah ... a big thanks to Dana Holt (I swear I thought you were female from your name) for the 'Browse For Folder" classes ... it was late and I was too tired to figure that stuff out and he had posted it here on CodeProject so I used it :)

Using the program

After you compile the program (or download the release version) just put it in the same folder as the asp2php utility and off you go :)

Update

I finally got round to fixing the "spaces in the path" problem ... it still wont change your world but it's a bit better...

History

  • 10th Feb 2003 - Version 1.
  • 12th August 2005 - Version 1.1.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

l a u r e n
Software Developer
United States United States
maintainance coding (and spell checkers) are for people with more time and less curiosity than me ... i have a dog called god and we take long walks and discuss bigotry and bones

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
Questiona question from sureshkakistaffSean Ewington8-May-07 3:31 
"Hi lauren how to install and how to use the asp2php tool pl give me one example Regards suresh"
QuestionWhere do PHP files go?memberRhettinari1-Sep-04 12:32 
Hi, I realize that this is a repeated question, but under all the others they seem to have solved their problems, but I had the command line running, openened up the GUI, ran it. The log said the 194 files were processed, but I can't find any PHP files. The directory with the ASP was under the...
AnswerRe: Where do PHP files go?memberghanley7-Nov-04 14:50 
Same again - where are the files converted to? Location?
GeneralRe: Where do PHP files go?memberAbunai10-Dec-04 9:28 
I was having the same problem. Make sure there are no spaces in your directory path.
AnswerRe: Where do PHP files go?membersunner13-Dec-04 12:28 
Make sure the directory with the ASP files is something without spaces like c:\aspfiles\
Generaldid not convert anythingmemberiffo10-Jul-04 4:07 
I downloaded asp2php shell, then I went to the interface picked the path of the folder where I have my asp, then clicked "Do it", nothing happens, I see the log file it says start and finish time of conversion but it says 0 file converted..   Thanks
Questionwhere are the converted files?memberdaino30-Apr-04 6:15 
i have installed the windows version of asp2php and also the asp2php shell. i have them both complied and in the same directory. i ran the shell application and it performed some kind of function because when i veiwed the log file it said it had converted the all the asp files...   but,...
AnswerRe: where are the converted files?sussPulsorock19-May-04 19:08 
I have the same problem here... any idea anyone?
AnswerRe: where are the converted files?memberel_ade1-Jul-04 0:22 
The script do not work if your directory to be converted is not under the directory of the script, put your directory in the same directory where is the samples directory and sorry for my bad english
GeneralDid not work at all for memembervirtual78-Dec-03 11:57 
I selected a folder containing 10 asp files and clicked on 'Do it'. I opened the log and it said it processed 0 file.
 
I downloaded the command line version and it worked fine.
GeneralRe: Did not work at all for mememberl a u r e n8-Dec-03 17:19 
ummmm this software is a shell to the command line app u downloaded i suspect u didnt have the command line version installed b4 u ran the shell is all   "there is no spoon"biz stuff   about me
GeneralMe2, it's still asp filesmemberMad4U24-Feb-04 19:20 
Hi, all, I've place the GUI tools to the folder as same as asp2php command line, after I Do it, the log file contain some processing... words, but the files still with asp program in it.   Just popin
GeneralRe: Me2, it's still asp filesmemberl a u r e n25-Feb-04 7:03 
im not 100% sure what ur saying?   "there is no spoon"biz stuff   about me
GeneralDidn't work on the things I needed it formemberDaAlmighySmithy2-Mar-04 15:58 
I have a lot of files saved as .asp that use only one ASP function (#include). They use mostly HTML but have one or two ASP codes in them each. There are 85 files in total so I didn't want to update them all manually so I chose this.   Thing is, it's working on everything but the 85 files...
GeneralPHP and ASP with IISmemberfarocam65-Dec-03 8:03 
I have the IIS installed in my computer `cause i wanted to test ASP pages.Later on, i started learning PHP and downloaded the PHP-4.3.4 application server and installed it. It automatically configured the IIS and at first everything was going fine ( with PHP pages ), but when i tried to access...
GeneralRe: PHP and ASP with IISmemberl a u r e n5-Dec-03 8:29 
no i have php and asp running fine hmmmmmmmm im puzzled as to what may have happened on ur install go to ur iis manager screen in mmc do 'properties' for the default web site got to the 'home directory' tab click on the 'configuration' button   make sure .asp is listed as a supported...
GeneralRe: PHP and ASP with IISmemberfarocam65-Dec-03 8:54 
damn. .asp is listed already ( among many other extensions ) What´s could be wrong ? What do i do ?
GeneralRe: PHP and ASP with IISmemberl a u r e n5-Dec-03 8:57 
what handler is set to process .asp files? have u restarted the iis engine?   "there is no spoon"biz stuff   about me
GeneralRe: PHP and ASP with IISmemberfarocam68-Dec-03 5:07 
I`ve got it !!! I see what the problem was. Someone in another forum lead me to the answer. I had both servers under the same TCP/IP adress. When i changed them both to " All unasigned " the problem dissapeared magically. Thanks anyway
GeneralRe: PHP and ASP with IISmemberGary Canada10-Feb-09 10:06 
One of the biggest problems people have with installing php on IIS is they take the easy way out nad use the installer package. In my experiance it ALWAYS sets some things up incorrectly and sooner or later you will find a problem you can't solve (been there, done that and had to reinstall the...
Generalfile/directory names with spacesmemberborsnpl28-Apr-03 23:05 
The program does not work when a long directory name is selected due to space letter in it such as "C:\Documents And Settings\Desktop\asp2php". When you execute asp2php with these arguments original program parse it wrongly.   So I have to change the code like that:...
GeneralWhy does this site have .asp extensions!!memberbarrymac2-Apr-03 5:42 
you guys can't be running ASP pages on this site surely!  
GeneralRe: Why does this site have .asp extensions!!memberTJDEV27-Jun-07 15:14 
Why on earth not? It beats everything, hands-down.
GeneralRe: Why does this site have .asp extensions!!memberl a u r e n27-Jun-07 15:18 
i wouldnt go that far but its a valid choice of web scripting language if you're in a microsoft shop   "there is no spoon" {me}
GeneralMe :-)memberDana Holt1-Apr-03 7:54 
Thanks for the mention. I'm glad you found the class useful.   I'm used to the confusion about my name/gender from time to time.   -- Dana Holt Xenos Software LLC

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130619.1 | Last Updated 22 Aug 2005
Article Copyright 2003 by l a u r e n
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid