Advertisement

Friday, April 20, 2007

PHP or CGI



When I originally taught myself web programming I had to chose between learning either CGI or PHP, they both offered options which more than matched my needs for what I wanted to do at the time and even with most popular php programs there is cgi alternatives (same for the reverse), but the main reason I finally decided on php was the simplest (and one I never see mentioned much in php vs cgi discussions) was when I write php code if theres a mistake I get a white page that pretty much says this error occurred on this line which usually makes it easy to fix quickly or at least you know what it causing the error (for newer programmers generally a missing ;). While with CGI if you make a mistake you get a server error page that tells you nothing, this isn't a huge issue if your script is a few lines long but taking Rampant Designs as and example one of the heavily php files contains 1182 lines of coding, so if you had a cgi script that long which didn't work you would be in for a hell of a time fixing it.

The other main fact is I always find php much easier to customize while cgi I find more difficult but that is mostly due to the fact I haven't spent 3 years learning cgi on and off.



Sites to check out:
Rampant Designs

Baby Seal Productions

Stick Guy

The Club

BSP Blog

Stick Guy Blog

No comments: