Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



View Poll Results: Which is used more.
PHP 0 0%
CGI 1 100.00%
Voters: 1. You may not vote on this poll

Reply
Old 08-29-2008, 02:20 AM [HELP]PHP or CGI
Junior Talker

Posts: 1
Name: Josh
Trades: 0
I need to know which you think is more used these days.

Reason: I am in a CGI class and the other day the teacher asked me if we had any questions and I asked why we were using an outdated language instead of PHP. He told me that CGI was old but wasn't outdated and that 70% of websites that use a server/client scripting language (CGI, PHP, ASP) use CGI. He told me that since my statement was out of line i had to write a 1 page essay proving or disproving the statement i had made in his class. So help would be appreciated. if you would like to explain your reasons that would help also. I decided to do this poll because i could not find the information i needed on the internet. All the pages i have come across is a heated debate on which is better now which is used more. That is not what i am looking for so if that can be kept out of this poll i would appreciate it.

Thanks,
Fizban
Fizban is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-29-2008, 08:31 AM Re: [HELP]PHP or CGI
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Studying an outdated language is not bad, in fact it is usually a good thing. Is CGI even a programming language at all? I thought it was just a standard communications protocol that languages use to interface with the server...

I just finished reading a very silly article about PHP vs CGI. The title is unfortunately very bogus, since PHP uses CGI every time it interacts with the server. Maybe someone with more advanced knowledge in this area can elucidate this point, but I know that it is a fact.

Usually when people say "PHP vs CGI", what they mean to say is "PHP vs Perl", or something like that.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.

Last edited by wayfarer07; 08-29-2008 at 08:33 AM..
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 08-29-2008, 10:29 AM Re: [HELP]PHP or CGI
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Quote:
Is CGI even a programming language at all? I thought it was just a standard communications protocol that languages use to interface with the server
Exactly, CGI means Common Gateway Interface (or computer generated images, but I bet it's not that one you talk about...).
It's just a way of exchanging datas between 2 programs.

As Abel wrote, PHP can use CGI to interact with the web server.
It's even pretty common. I have used a PHP4 with CGI for a while, when PHP5 was new, to have the .php4 files running with php4, and .php running with php5.

Most of what exists today as a CGI script is perl, right. But it could be anything...
Python, basic, lisp, fortran, even a simple application.... Basically anything that receive parameter and return something can be used as a CGI gateway.
If I remember right, I have seen web site that provided ping tools that simply used the ping linux utility.
It was a cgi that was calling to the executable, which returned the program output directly.

A side effect that have CGI, is that for every request the server receive, it will launch a new process of the interpreter.
If you use PHP with cgi, it means that each page request will trigger the launch of the PHP executable, to generate the page, and the web server will pass back the generated content to the browser.

On contrario, with a apache module compiled PHP, the interpreter is runing alongside the web server process, all the time, and can process the requests without the hassle of launching/stopping the interpreter at each requests.
(except when using something like fastCgi, which launch 1 interpreter and then multiplex it to treat several requests, but it's not the most common setup)

Let me just add that I find pretty unfair that you have to write that paper just for a legitim question...
It looks more to me that your teacher learned to use CGI back in 1995, and did not much improved his skills since.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 08-29-2008, 11:38 AM Re: [HELP]PHP or CGI
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Sure he didn't say 7%?

As Thierry has said, it sounds like a lecturer who is trying to justify his existence in a changed world.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to [HELP]PHP or CGI
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.07440 seconds with 13 queries