CGI or PHP on Apache Web Server
OK Guys,
I am an ASP guy. I need to write an application that runs on Apache.
I need to know a couple of things:
1) Should I use Perl/CGI or PHP? - Why?
2) What kind of database can I use? Can I use Access?
Thanks,
Mike
Blessed is the man who fears the LORD, who delights greatly in his commandments. Psalms 112:1
Wil posted this at 18:00 — 20th May 2003.
They have: 601 posts
Joined: Nov 2001
Is this Apache for Windows? If then, use ASP and your Access database?
Is this Apache for Linux? Then you can use Perl with ASP modules to mimmick your ASP commands through the Perl intepretter and use the database-independent DBI set of modules as the driver to your database connections.
Use whichever langauge you feel more comfotarble with. For a purely web application, many people find PHP easier to use to connected and interface with a database simply as PHP was exclusively (?) designed for this purpose.
- wil
andy206uk posted this at 18:12 — 20th May 2003.
He has: 1,758 posts
Joined: Jul 2002
If you plan to use apache then access is out of the question as thats an NT technology.
Personally I'd reccomend using PHP for your scripts and MySQL for your database. Why? cos they're free, fast and fairly easy to learn. (plus PHP has a bunch of functions built in for connecting to MySQL databases which will vastly speed up your development time!)
As an ASP programmer I don't know how easy you'll find the switch but I've never used ASP so I can't really tell you.
Andy
Wil posted this at 16:35 — 21st May 2003.
They have: 601 posts
Joined: Nov 2001
Why? He didnd't specify that the web server and the database server are on the same machine. And if this is a serious project that needs to be scalable let's hope that they are indeed on seperate machines.
- wil
Mark Hensler posted this at 17:15 — 21st May 2003.
He has: 4,048 posts
Joined: Aug 2000
If this is a serious project that needs to be scalable, let's hope that he's not using Access.
Coming from ASP, I think you'll find PHP easier to adjust to. Everything has a familiar function syntax. Whereas Perl has a few unique syntax functions (ie: $this=~/from/to/i; ).
Mark Hensler
If there is no answer on Google, then there is no question.
andy206uk posted this at 08:15 — 22nd May 2003.
He has: 1,758 posts
Joined: Jul 2002
Sorry... i just assumed it was apache on a unix platform. (why anyone would want to use NT is beyond me!)
Anyways... Access sucks, its bloated and was never designed for use on the web, MySQL is tons faster and was designed with the web in mind.
Andy
dk01 posted this at 09:33 — 22nd May 2003.
He has: 516 posts
Joined: Mar 2002
Not only that but an access database corrupts very easily. It tends to happen once it has too many connections at once. You could make the connections using some sort of Locking function with an algorithm like this:
Gain independant access and lock db
write and read to db
Unlock db for other connections to use
But again that will reduce speeds. If you are an ASP guy then think about Access and how it is an actual file. Well Mysql is actually a server in itself. This means that php can have multiple connects at once without the database being corrupted or slowed significantly. Its basically SQL Server for Unix (minus a few things I think).
Hightly recommend php/mysql. If you need sites to learn from then just ask because I think most people here are self taught.
-dk
druagord posted this at 16:28 — 22nd May 2003.
He has: 335 posts
Joined: May 2003
Since i used to be an asp guy too. Let me say first that every time somebody as ask me to use access as a db i add to change to sql server after 1 or 2 weeks of live service. access get very very very slow when there are more then 2 or 3 connections
second now i'm on php. with mysql books and software are free on there respective web site and support is easily available from forums like this one. Never will i work on MS again.
IF , ELSE , WHILE isn't that what life is all about
Mark Hensler posted this at 21:25 — 22nd May 2003.
He has: 4,048 posts
Joined: Aug 2000
druagord, have you gotten into Perl at all? I'm curious how an ASP guy compares the transition process for PHP and Perl.
Wil posted this at 21:58 — 22nd May 2003.
They have: 601 posts
Joined: Nov 2001
If you're after a serious open source database then I would chip in and say stay well clear from MySQL, too. I'd recommend Postrgesql anyday over MySQL for a very large project. Esepcially if that project will be interacting with the database in both direction, i.e. not just simply retrieving data with SELECTs all the time. That's one thing MySQL is suprisingly fast at.
- wil
dk01 posted this at 23:41 — 22nd May 2003.
He has: 516 posts
Joined: Mar 2002
Postgre??? I didn't even know its out of beta yet
-dk
druagord posted this at 22:29 — 23rd May 2003.
He has: 335 posts
Joined: May 2003
i use perl but only for server admin script i dont like the security implication of cgi. PHP is in concept a lot mor like asp then perl the perl syntax is quite a challenge when you start.
IF , ELSE , WHILE isn't that what life is all about
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.