Skip to main content
January 18, 2010
Answered

Converting to PHP from ASP Classic site

  • January 18, 2010
  • 7 replies
  • 10510 views

OK...

I have an ASP classic ecomerce site and I am thinking, no, rather I'm must be moving to PHP. I'm doing this because Adobe and many of my extensions are soon due to stop supporting classic ASP.

What this means is that I have about 4 sites that have been built in CLASSIC ASP. Two of these are Ecommerce.

1. Of course the server they sit on is a Windows server. In my case it's IIS7 with a SQL 2008 database.

a. My first question is can I reliably run php/mysql on the same server? I get quite a bit of traffic so it needs to run the same as it currenly does.

b. Is this a common thing to do and would I run into problems doing this: php addons/updates?

c. Would I be better served just moving to a PHP server?

2. Eventually, I'll finish the php site and want to post it.

a. How does this process go?

b. What strategies/pitfalls should I be aware of?

This topic has been closed for replies.
Correct answer jon8

I am sorry I am lost when you are talking about workbench. I wished I could help. I thought about setting up like Jon referred to in his earlier email but I am not sure if this can be done without admin rights.

This is new to me. :~(


my greatest apologies.  it appears the migration toolkit has reached EOL and they recommend upgrading to workbench.  Here's a link that should help you install and use this product

http://dev.mysql.com/doc/migration-toolkit/en/index.html

http://dev.mysql.com/downloads/workbench/5.2.html

7 replies

February 11, 2010

If I have a page like the following.

http://www.domainname.org/pagename.asp?cid=4910

And I want to redirect to this page

http://www.domainname.org/pagename.php?cid=4910

On a windows server, what should I do?

David_Powers
Inspiring
February 11, 2010

I don't know. I'm not a Windows server administrator. However, it should be possible to create a redirect from pagename.asp to pagename.php. In fact, you can probably do a wildcard redirect to just change the filename extension.

March 3, 2010

tlw444,

I am sorry I am lost when you are talking about workbench. I wished I could help. I thought about setting up like Jon referred to in his earlier email but I am not sure if this can be done without admin rights.

This is new to me. :~(

Not that I'm the Dev Wizard here but since you're sort of in the same boat as I am, you've probably realized that ASP is going away...Microsoft killed it and nobody is going to support it because Microsoft isn't doing anything new to it. I personnally think they shot themselves in the foot by killing ASP. They cornered the market on the .NET thing but, in response, PHP and MySQL just got stronger. Since you work in a .NET shop, you should either totally embrace it (Getting a copy of Visual Web Developer...) or start moving, as I have, to PHP. Perhaps both? I also think it's an oversight for Adobe not to support .NET. I know there are probably good reasons for this. Microsoft itself being one of the biggest blocks to it...

Since you're not having to transcribe over from .NET or ASP to PHP as I am, I would recommend just setting up an Apache / MySQL server on your own system. There are a lot of pre-built installers for windows.

For converting your data that might be locked in a Microsoft SQL Server, get a copy of NAVICAT for $79 and save yourself a lot of grief converting from that to MySQL. You can also use the free version for a month and get it all converted over before the month is over. That said, if something really works and saves me a lot of time, in appreciation, I feel the need to pay.

That's about all I can recommend because that's about where I am in this whole process.

The problem I am personally up against right now is the knowledge that I thought I knew what I needed to know and now,  it turns out, I didn't know...Not even close. There are a thousand little details, error messages, new tools, new techniques that never occured to me to anticipate.

It just takes time and hard work to digest it all...

I totally understand where you're coming from...you're not totally alone.

January 28, 2010

So I guess I'm now wondering what PHP book. It always seems that I'm torn between getting a book

that "gets things done.."  and one that explains the inner workings of the program.

David_Powers
Inspiring
January 29, 2010

LArtJunky wrote:

So I guess I'm now wondering what PHP book. It always seems that I'm torn between getting a book

that "gets things done.."  and one that explains the inner workings of the program.

I think both types of book are valuable. I tried to learn JavaScript from "JavaScript: The Definitive Guide". It was hopeless, because it didn't tell me how to get done the things I needed done. However, I now find it invaluable when working with jQuery (which I learned from "jQuery in Action"). My most thumbed PHP book is "Programming PHP" by Rasmus Lerdorf and Kevin Tatroe. I've got the first edition, which doesn't even cover PHP 5, but it covers a lot of the basic grammar and is still very useful. However, when I first bought it, I thought it was terrible because it didn't take a hands-on practical approach. What I like about it now is I know exactly where to look up the information I need without having to wade through screeds of tutorial material.

January 29, 2010

Have you looked at the OReilly "Cookbooks?" I've never actually purchased one (thumbed through) but the idea always sounded good. Of course these fall into the category of "getting things done." The other books I like are the "Visual Quickstart Guide" books. Of course they tend to be more superficial but for a quick reference, I find them easy to use.

I'll have to take your other recomendations and I think I'll give those books a try. Thanks.

My company let's me get books from time to time so I'll probably buy two or three to fill the gaps in my library. Of course the alternative is expensive training so my company understands the savings with books.

We also subscribe to LYNDA.COM and I find that VERY useful too. Of course videos add another dimension to learning and while some topics are more detailed than others it's helpful to visually follow how people do things. I'm an Artist doing a Programmer's job so any time I can "see it," I can understand it better. Well, at least that's what I tell myself

January 25, 2010

I run my sites on a VPS Windows Server and my host support has installed php and mysql for me. However, to use the MySQL server, Support instructed me to go to Remote desktop and login to the server. Once there, I just find the MySQL folder and click on the MySQL Workbench program.

This means I am basically the administrator of the Database...It's as if I'm on my own development server where I can totally mess it up. However, on my home system, user permissions and tweaking the performance aspects of the database are not an issue; basically, nobody can get to it. On my production server, I could be breaking all the rules and never know it. I'm pretty apprehensive, for many reasons, about taking on that responsibility. Namely, I don't have time and I don't know enough about MySQL database management. Obviously

I mean, basically, I have full access to the database and I'm faced with the task of setting access rules for new databases that I create. I've looked for good advice on this topic but it's hard to find "general rules."Have any general rules i can follow here?

What's your advice about managing MySQL? Is it something can, fairly easily, pick up? Am I worrying about nothing?

Besides the security issue, my biggest worry is that I'll start doing things a certain way (the wrong way), only to find out that I need to do it all over again. Fixing it means, invariably, hours of work.


I think it's taken me a week so far to get a working environment going and even still, it's not quite there. My expectations were probably a little high.

Anyways, any suggestion/help is welcome. Thanks

David_Powers
Inspiring
January 26, 2010

LArtJunky wrote:

What's your advice about managing MySQL?

Grab a copy of "MySQL" by Paul DuBois. It's a monster of a book - more than 1,000 pages, but worth its weight in gold. The first 300 pages are an in-depth tutorial on data handling in MySQL. Since you're already familiar with SQL, you will be able to skim through them quickly, but you'll find the definitions of the data types very useful.

The next 300 pages deal with programming MySQL in different languages, and don't really belong in the book.

Next, you have a detailed rundown of administering MySQL. Finally, you have a lengthy series of appendices that contain details of MySQL functions and SQL syntax.

The book is now in its fourth edition, and it's so good, I have bought each one to keep up with new features in MySQL.

Paul knows his stuff, and writes in a very clear way.

January 26, 2010

Yes, thanks David for your suggestion, I was just looking for a good one on MySQL and PHP over the weekend but our Borders bookstore here rarely gets new computer books (never see your books).

I'll probably get the one you suggested; it's always good to have books that can help when problems come up. The only problem with books is that they are quickly pushed out of date by changing technology: new operating systems, tools, versions of MySQL and PHP... So, it's sometimes more difficult to apply it to your own system and tools.

Of course there's stuff that just doesn't change that fast and for that, your suggestion is well received. Thanks.

Any books on PHP that you recommend?

By the way, on a personal note, I was just reading your Bio...interesting stuff! I noticed that you worked at NHK Japan. It's been a few years since I was there in Japan (1987) but I lived a couple blocks from Ichiguya Station.

January 22, 2010

I'm starting to dig into this and I'm trying to find some tools that will allow me to get my data from MsSQL to MySQL. I understand that each database has it's own rules for data types and that it might not be a straight forward conversion but are there any tools or techniques for importing into MySQL?

I know workbench can do the actual importing but it doesn't do anything for prepping the data. Not having good/easy tools is the one thing that makes me a little bit aprehensive moving to php.

For example, MSSQL has tools for import/exporting data and it allows you to massage the data as you import. For example, MS has a import tool that allows you to select the csv file, filter that file, visually see the columns and rows that will be created, set the character types (gui), and then process it all. It's actually works pretty good once you understand the parameters.

I don't see the same with MySQL. If you know of something, let me know. I would even be willing to pay for a program if it's not overly expensive.

So, any recommendations on products that won't become too obsolete too quickly would be welcome.

I'd also like to hear some good strategies (things to watch out for...) if possible. Are there "better" file formats for importing into MySQL? In other words, are txt files or xml  easier than csv files?

Oh, man,,,so much to digest. At least I have a year to work my way through this.

jon8
Inspiring
January 24, 2010

migration toolkit.  you can transfer data into mysql from other data sources.  you can download from mysql.com

January 25, 2010

I tried to find this but I couldn't. Is it possible that it's been folded into Workbench?

January 19, 2010

My host is currently installing php/mysql. I've installed it as a test server on my own system and I've used phpmyadmin. Will I be using the same tools as I would use on my testing server or is this the sort of install where IIS is the administrator?

Is there anything else you can think of that will make my transition easier?

I've asked them to install Joomla.

Thanks

By the way. Since I'm using MS-SQL, I will need to export that database to mySQL. I've experimented with it but I didn't have any luck with it. At the time, I was actually just trying to export from an Access Database to mySQL but I didn't grasp how to import into mySQL. I know it's easy enough if you have a query with data. It's getting the data to that point that is unknown. Anyone know of a good place to turn for instruction on this? Book? Web?

David_Powers
Inspiring
January 19, 2010

LArtJunky wrote:

By the way. Since I'm using MS-SQL, I will need to export that database to mySQL. I've experimented with it but I didn't have any luck with it. At the time, I was actually just trying to export from an Access Database to mySQL but I didn't grasp how to import into mySQL. I know it's easy enough if you have a query with data. It's getting the data to that point that is unknown. Anyone know of a good place to turn for instruction on this? Book? Web?

I haven't used it myself, but the MySQL GUI Tools includes a migration kit: http://dev.mysql.com/downloads/gui-tools/5.0.html. You'll see that the GUI Tools have been EOL'd because they're being rolled into the MySQL Workbench. However, the Workbench doesn't yet include the migration kit.

January 19, 2010

Thanks, I vaguely remember installing "Workbench" but I don't remember if it helped.

For a "testing server" on my system (not production server), what do you recommend using? Wamp? Xampp? I have to admit that I'm a little confused by the array packaged windows installs.

January 19, 2010

Thanks to both of you for helping me "think outloud."

I'm trying to come up with a strategy but there are a lot variables to think about. My inclination is to keep it simple. Keeping it on Windows might be the simplest way and perhaps the best way to go for now. Will this work out, I don't know. I think, once I have the coding done, I will then find it easier to move to LAMP.

That said, converting my sites will probably take a while becuase there is a lot of hand-coding that will have to be duplicated.

One thing that I know I will have a problem with is text search. In MS-SQL it indexes keywords and I can then use SQL keywords (Queries) to pull in search results. It's pretty slick and for me, this was VERY easy to do but I'm not sure I'll find anything like this in mysql. Is there something similar in mySQL and is it easy to use?

So many unknowns.

David_Powers
Inspiring
January 19, 2010

LArtJunky wrote:

One thing that I know I will have a problem with is text search. In MS-SQL it indexes keywords and I can then use SQL keywords (Queries) to pull in search results. It's pretty slick and for me, this was VERY easy to do but I'm not sure I'll find anything like this in mysql. Is there something similar in mySQL and is it easy to use?

Unfortunately, my knowledge of MS SQL Server is very limited. However, if your data is stored in SQL Server, there's no reason why you shouldn't keep using it. Last week, I installed SQL Server 2008 Express to do a little experiment. So far, I have a database with one measly record in it, but I did manage to connect successfully from PHP to SQL Server, using Zend_Db.

It depends whether you're prepared to do some hand-coding in PHP. Dreamweaver server behaviors are pretty ancient, and the PHP ones use MySQL-specific functions. If you want to rely on Dreamweaver to do most of the coding for you, you'll need to make the switch to MySQL. Using something like the Zend Framework could give you greater freedom. Unfortunately, all books on the Zend Framework assume you want to build a mega-application based on the MVC design pattern, but modules like Zend_Db can be used independently.

David_Powers
Inspiring
January 18, 2010

LArtJunky wrote:

1. Of course the server they sit on is a Windows server. In my case it's IIS7 with a SQL 2008 database.

a. My first question is can I reliably run php/mysql on the same server? I get quite a bit of traffic so it needs to run the same as it currenly does.

b. Is this a common thing to do and would I run into problems doing this: php addons/updates?

c. Would I be better served just moving to a PHP server?

The answer to a and b is "yes". The answer to c is maybe.

You can run PHP on IIS7. MySQL doesn't interfere with SQL Server and vice versa. I have never used PHP/MySQL on a Windows production server, but they work quite nicely in my development environment.

2. Eventually, I'll finish the php site and want to post it.

a. How does this process go?

b. What strategies/pitfalls should I be aware of?

If you're going to deploy the PHP site on the same server as the ASP one, just create the new pages with .php file name extensions. When you're ready to go, just delete the .asp pages.

What's not easy is converting from ASP to PHP. Basically, you need to create everything from scratch. I converted a complex ASP site to PHP about eight years ago. It had been completely hand-built. The conversion process took me a couple of months. I could probably do it more quickly now, but I was only just learning PHP at the time. It taught me a lot about PHP, though.

Good luck.

jon8
Inspiring
January 19, 2010

i run php on windows servers and can provide any information you need.  i'm up on the absolute latest, and provide feedback to ms on some of their projects (like cache for iis which is now out).  You absolutely can run php/mysql well using IIS on windows.... but LAMP stack is still THE platform for the open source community.  as for switching form asp to php (good move), it's not as hard as you might think.  If you understand how to use dreamweaver to do one, you will perform the same actions in dreamweaver to use php for all of your CRUD.  PHP is an easy language to pick up, and the open source community is large and very supportive, so you can always google answers to your questions.