PDA

View Full Version : PHP -vs- ASP


kungfoore
09-19-2002, 01:06 AM
Currently we are running a IIS 4.0 box with ASP apps. We are looking into changing to a UNIX/Apache environment. But, as stated before, all of our pages have been coded in ASP. My understanding is that Apache can't process ASP pages. Is this still true? If it is, how difficult/easy is it to transfer these pages to a PHP?

Any help would be appreciated.

Thanks!

firepages
09-19-2002, 03:07 AM
Apache can not run ASP , you can get chillsoft ASP but its more fun than useful...

your biggest problem is any of your scripts which use COM/ADO/activeX etc as they are not available on *NIX.

the rest is probably straighforward enough (without seeing your code) you just need a PHP programmer! , there is a utility called ASP2PHP (search on google) but I hear that it is not really that useful.

There is nothing that ASP does that PHP can not (the reverse is not true) but how easy/hard depends entirely on the complexity and structure of your existing scripts.

kungfoore
09-19-2002, 05:09 AM
OK, most of our pages just use asp for includes and page was last updated.... and there are a few e-commerce appz that require connecting to an ACCESS db.

So, I guess my next question would be how hard is it to switch over to a MySQL environment. Is MySQL an open source db? Can I still use ACCESS dbs.

Thanks for your help.

firepages
09-19-2002, 06:20 AM
Hi, MySQL is mostly open source , certainly for use in building commercial web-applications it is free (MySQL licesning has always been a little surreal !)

As for MSacess you will need to lose that for 2 reasons, 1) its really not suitable for web-applications with concurrent requests (it breaks quite easily) & 2) it is not supported on *NIX (& whilst there are convoluted ways to use access via *NIX they would slow down the process even more)

You can convert your access databases to MySQL via mysqlFront www.mysqlfront.de , or by writing a script in PHP to do it for you (+search on google for other options)

note that MySQL does not support foreign keys (well it sort of can, but as referential integrity is not enforced its as good as having no foreign keys in the first place)

If you are using the DB for simple selects/updates/deletes etc then MySQL is a fine choice... if you need heavier stuff look at postgreSQL(open-source) or Interbase(open-source version available google 'firebird') both of which are true RDBMS's

Roy Sinclair
09-20-2002, 10:07 PM
Originally posted by firepages
...There is nothing that ASP does that PHP can not (the reverse is not true) but how easy/hard depends entirely on the complexity and structure of your existing scripts.

Nonsense, there's nothing either can do that the other one can't. The question isn't whether things can be done or not, the question is the magnitude of the effort involved in getting there.

Spookster
09-21-2002, 12:37 AM
Originally posted by Roy Sinclair


Nonsense, there's nothing either can do that the other one can't. The question isn't whether things can be done or not, the question is the magnitude of the effort involved in getting there.

Oh really now? Might want to reconsider your opinion before we dilute it with facts. :D

Y-STU-K
09-21-2002, 07:34 PM
Originally posted by Roy Sinclair


Nonsense, there's nothing either can do that the other one can't. The question isn't whether things can be done or not, the question is the magnitude of the effort involved in getting there.

Ahem thats definatly not right PHP is vastly superior

whackaxe
09-21-2002, 09:36 PM
i heard that ACCES could only handle 30 or less simultaneous connections? ASP always gets me lost anyway so i stick to PHP

Y-STU-K
09-21-2002, 09:58 PM
access also creates another instance of itself when concurrenlty accessed very bad

Roy Sinclair
09-23-2002, 07:50 PM
Originally posted by Spookster


Oh really now? Might want to reconsider your opinion before we dilute it with facts. :D

I stand by my opinion, you'll have to come up with some cold hard facts to change my mind, so far all I see is just your opinion.

Roy Sinclair
09-23-2002, 07:51 PM
Originally posted by Y-STU-K


Ahem thats definatly not right PHP is vastly superior

And what do you base your opinion on?

Roost3r
09-23-2002, 08:24 PM
..... from my programming experience id say php is easier and mysql is alot faster... conclusion php = win

Y-STU-K
09-23-2002, 09:15 PM
this is based on using both of them. I found that PHP queries databases much faster even on a windows server

PHP + MySQL is much faster, oh aye PHP it's Open Source :) and multi platform. This is all obvious stuff tho

firepages
09-24-2002, 03:31 AM
"I stand by my opinion, you'll have to come up with some cold hard facts to change my mind, so far all I see is just your opinion."

one might sat that 9,000,000 domains + probably are not wrong... however since that in itself prooves nothing (they could all be quite mad :)).

include()
require()

fsockopen() (+all the network functions that allow you to do stuff from browser simulation to network programming)

native connectivity to all the major datasources including the important ones... (MySQL,PostgreSQL,Oracle,MSSQL,Interbase,Informix,Sybase)
+ the preferred terribly slow ASP method of ODBC

zlib compression, PDF creation, COM, on the fly image creation.... well I can go on but check out the manual.

Now there is nothing there that an ASP user can not get done , BUT he/she has to use a variety of plugins and/or different languages to acheive this.

But the x-platform issue is the cruncher for me, PHP runs on the worlds most popular webserver (apache) + IIS / netscape (even AOLserver(yuk)) as server modules, you can do shell scripting on win32 & *NIX, and PHP-GTK allows x-platform GUI's (PHP-GTK2 is getting close I hear (at which time the war is over)).

PHP's only worry as far as ASP is concerned is .NET and the possibilities it holds, but I know very few sys-admins who would ever consider moving from apache to a MicroSoft solution who in the server market have never quite gotten in right, of course .NET is still new and until we get past the hype and see how it performs in the real world then we will never know :)

(I just got the .NET Enterprise server RC1 from MS ($5 for a year! (and a really groovy CD case)) so should get to playing with that soon enough)

fractalvibes
09-26-2002, 01:11 AM
Originally posted by Roy Sinclair


Nonsense, there's nothing either can do that the other one can't. The question isn't whether things can be done or not, the question is the magnitude of the effort involved in getting there.

Actually I think there are a number of things that can be done natively with PHP that ASP by itself (talking VBScript) cannot do.
1.) Manipulate Images
2.) Send Email
3.) manipulate pdf documents
To start with. Rather, ASP relies upon components such as CDONTS or other DLLs to provide those functions. Database access is through another - ADO.

Just a different approach than PHP. Much more "built-ins" to the PHP language. Each has their own strengths and weaknesses.

So one could look at what ADO/COM etc. can be replaced by native PHP code, and replacement components are available.


Phil J.