Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Converting to PHP from ASP Classic site

Guest
Jan 18, 2010 Jan 18, 2010

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?

TOPICS
Server side applications
10.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Jan 25, 2010 Jan 25, 2010

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

Translate
LEGEND ,
Jan 18, 2010 Jan 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 18, 2010 Jan 18, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 19, 2010 Jan 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 19, 2010 Jan 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 19, 2010 Jan 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 19, 2010 Jan 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 19, 2010 Jan 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 19, 2010 Jan 19, 2010

I guess the other option would be to install MySQL, and the php server separate.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 19, 2010 Jan 19, 2010

I found the answer somewhere else. Installing them separate is the advice I got.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 19, 2010 Jan 19, 2010

you can connect php to pretty much every major database on the market... mysql, sql server, oracle, postgresql,...

however, you can't do that using dreamweaver.  dreamweaver groups together commonly used tools ... php/mysql.  If you want to use sql server with php, you're going to have to do some custom coding, or use a php framework.

moving data from sql server to mysql is fairly easy.  mysql has a migration toolkit application that can assist you with this.  you can also export your database from sql server.

I can tell you with confidence, that even many experts don't know a whole lot about hosting php/mysql on a windows server.  honestly, the only reason I know so much about this is sheer necessity, so I can build/host/maintain ASP, ASP.NET, and PHP all from one web server (that's also running both SQL Server and MySQL).  It's a pretty rare situation that people mix their technologies this much or even have the desire to work on that many technologies.  You absolutely can run all of these from one server, but you need root access.  You can't work from server software, or be on a server where you don't have full control over everything / anything that's installed on it.  For a lot of people, it's easier just to have two separate servers... one windows for their asp/asp.net/sql server and one for the lamp stack.  If you work from one server and want to support all of these technologies, you have to run it from IIS.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 20, 2010 Jan 20, 2010

Thanks (Jon & David)

Part of me wants to have my own server that I can work on but since I'm a one-man shop, the administrator would be me and I just can't put on another hat or have that added responsibility. I rely on "experts" to give me support. Unfortunately, the "experts" aren't always there when I need them.

The host I have falls into the category of being "just adequate" but I hear that's the new standard for excellence these days;)

Part of me want's to go with a more local sever but that has its pitfalls too.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 25, 2010 Jan 25, 2010

You guys are so far ahead of me I am really feeling out in left field somewhere. I also have heard that asp is a thing of the past but I continue

to use it. (That is with Dreamweaver writing the scripts) I know I need to learn other technologies but truth is I don't know where to start. Where I work my company uses SQL Server 2007 and ASP.NET. Although they let me use Dreamweaver which I believe is soon to be a thing of the past at my company.

Awhile back I bought David's book (Dreamweaver CS3 with CSS, AJAX, and PHP),  and I started trying to work through it during my free time, but I have to admit I got confused and quit when I had to install MySQL, (nothing against your book David, it was me not knowing if I was doing something right). I wasn't sure if I was supposed to run SQL Server and MySQL at the same time. My limited knowledge and also my limited time to do this at work put me back in a corner, and here I am again wondering what I should do. I am fearful of losing my position.

I love web design and I want to be moving in the right direction for the future, what would you guys advise me to do if you were in my position? Can I install SQL And MySQL at the same time. Will I need administartive priviliges to do so? Please advice.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 25, 2010 Jan 25, 2010

Oh well, I guess I am stopped in my tracks once again. David I pulled out your book and was trying to remember what part of your book I got stuck on from before. I remember now when my problem began, it was on page 71 "Choosing individual installation or all-in-one package", I was still in the process of getting my work enviroment ready. I can see that you perfer to install each program separately, as you feel it gives you more control.

Ok, this part makes since to me, but when I go to the next page of course I am stuck in my tracks again because it clearly states I need to make sure I am logged into Windows as an Administrator.

Is there anyway around this?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 22, 2010 Jan 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 24, 2010 Jan 24, 2010

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 25, 2010 Jan 25, 2010

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 25, 2010 Jan 25, 2010

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. :~(

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 25, 2010 Jan 25, 2010

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 25, 2010 Jan 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 26, 2010 Jan 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 26, 2010 Jan 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 27, 2010 Jan 27, 2010

LArtJunky wrote:

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.

MySQL and PHP have been pretty stable for the past few years. The 4th edition of MySQL was published in 2009, and is unlikely to go out of date very quickly. PHP books should be OK, as long as they were written for PHP 5, which was first released in 2004. You'll see a lot of books with PHP 6 in the title. This is publishing nonsense. They usually contain about half a chapter on what they think you will be able to do in PHP 6. The rest is devoted to PHP 5.

PHP 6 isn't even in an alpha version yet, and it could be years before it is finally released. Many of the features originally planned for PHP 6 are now in PHP 5.3. The main thrust of PHP 6 is to make the whole language Unicode-compliant, rather than just parts of it as at present. PHP 6 will also deliberately break backwards compatibility with some ancient parts of PHP.

Any books on PHP that you recommend?

Mine, of course.

Seriously, though. My books have been written with an eye to security and avoiding any practices that are likely to break in PHP 6, when it eventually comes. My books don't teach PHP in a formal manner, but concentrate on getting things done. "The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP" uses the Dreamweaver server behaviors, but shows you how to rip them apart and customize them to suit your own needs.

If you want a more formal approach to PHP/MySQL, take a look at "PHP and MySQL Web Development" by Welling and Thomson. I haven't seen the latest edition, but the first edition was excellent, and it seems a constant bestseller.

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.

When I worked for NHK (1980-84), I lived in Kojimachi, a kilometre or so East of Ichigaya. When I went back for the BBC in 87-92, we moved to a place near Gakugeidaigaku Station on the Toyoko line. The sushi shop right next to the station was fantastic. Don't get back there as often as I would like.

What were you doing in Japan?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 27, 2010 Jan 27, 2010

My Mom was an exchange professor teaching at Sophia University so I took advantage of the free housing that was available there.

It was a perfect opportunity for me. I was in school at the time and turned the whole thing into a few easy credits doing "research" on the Fashion Industry in Tokyo.

I was only there for about 6 months.

Yes, you were certainly close to where I was living.

I was here:

http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=nihon+television+&sll=35.688089,139.736223&sspn=0.006056,0.016319&ie=UTF8&hq=nihon+television&hnear=&ll=35.688429,139.736143&spn=0,359.99592&z=19&layer=c&cbll=35.688462,139.736232&panoid=wDwEOsU6zOwocZDzGWs6zQ&cbp=12,53.7,,0,-7.13

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 27, 2010 Jan 27, 2010

What a small world we live in. When you mentioned Ichigaya, I wondered if you had anything to do with Sophia University. What's amazing, though, is the Google map you linked to. The building in the middle distance on the right side of the road with a dark coloured glass wall is NTV 4-bancho bekkan. NTV is one of the main commercial TV networks (Ch 4 in Tokyo). The BBC moved its bureau into that building in the summer of 1989. My desk for the following three years looked out over that street.

If you turn the Google street map photo 90 degrees to the left (north), you see the entrance to Pauke, a bar run by a Swiss guy (I think his name was Hans). We would often go in there for large amounts of nama-biiru and Eisbein (a hock of ham).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines