CGI or PHP on Apache Web Server

They have: 82 posts

Joined: Oct 2001

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

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

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

They have: 601 posts

Joined: Nov 2001

Quote: Originally posted by andy206uk
If you plan to use apache then access is out of the question as thats an NT technology.

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's picture

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. Wink

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.

He has: 1,758 posts

Joined: Jul 2002

Sorry... i just assumed it was apache on a unix platform. Wink (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's picture

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's picture

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's picture

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.

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's picture

He has: 516 posts

Joined: Mar 2002

Postgre??? I didn't even know its out of beta yet Sticking out tongue
-dk

druagord's picture

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.