Current location: Hot Scripts Forums » Programming Languages » PHP » CGI or PHP better?


CGI or PHP better?

Reply
  #1 (permalink)  
Old 02-08-05, 04:22 AM
mhs12grade1992's Avatar
mhs12grade1992 mhs12grade1992 is offline
Newbie Coder
 
Join Date: Feb 2005
Location: USA
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
CGI or PHP better?

Is PHP script more easier than CGI script? If so, why? I heard PHP is more security than CGI. What's the difference between PHP and CGI? When I set up my webhosting, I will have both CGI and PHP supported. So I can use both scripts.
Reply With Quote
  #2 (permalink)  
Old 02-08-05, 11:37 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
PHP is much easier than Perl (popular as CGI) and is more readable ..
security is up to you .. you are the one securing your scripts..
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
  #3 (permalink)  
Old 02-09-05, 11:28 AM
moronovich moronovich is offline
Junior Code Guru
 
Join Date: Oct 2004
Posts: 460
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
PHP is much easier than Perl (popular as CGI) and is more readable ..
security is up to you .. you are the one securing your scripts..
for confirmation, perl is not cgi and vice versa. cgi is not any language. it's an interface for client-server communication. perl is often misunderstood as cgi for most applications use perl with .cgi extension while both of them refer to different terms. indeed.
__________________
just an ignorant noob with moronic solution...
Reply With Quote
  #4 (permalink)  
Old 02-09-05, 02:16 PM
Tempestshade Tempestshade is offline
Newbie Coder
 
Join Date: Aug 2004
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
WOW wait a minute there NeverMind lol thats ur opinion lol i program in both php and perl/cgi lol i find perl/cgi is simpler to use BUT php has more options lol. If you are a beginner id go with perl/cgi then move to php thats what i did. Perl/cgi is very simple for beginners
__________________
http://www.cashbackhosting.net - Cashback Hosting. Cheap Web Hosting starting at $1.50
Reply With Quote
  #5 (permalink)  
Old 02-09-05, 03:41 PM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
Quote:
Originally Posted by moronovich
for confirmation, perl is not cgi and vice versa. cgi is not any language. it's an interface for client-server communication. perl is often misunderstood as cgi for most applications use perl with .cgi extension while both of them refer to different terms. indeed.
Yup, I know that
that's why I said it's popular as CGI, because as you said, too many people confuses them because of the .cgi extension also because they are put in CGI-bin folder ...
what people don't usually know that you can run PHP as CGI just like Perl

as for Tempestshade, different opinions we have
I don't code in Perl, but I read some tuts about it's basic syntax and I think PHP is easier..
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]

Last edited by NeverMind; 02-09-05 at 03:48 PM.
Reply With Quote
  #6 (permalink)  
Old 02-09-05, 08:44 PM
moronovich moronovich is offline
Junior Code Guru
 
Join Date: Oct 2004
Posts: 460
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Tempestshade
WOW wait a minute there NeverMind lol thats ur opinion lol i program in both php and perl/cgi lol i find perl/cgi is simpler to use BUT php has more options lol. If you are a beginner id go with perl/cgi then move to php thats what i did. Perl/cgi is very simple for beginners
i appreciate your opinion. however if you call perl as a so easy language to learn, you are directing programmer wannabe to the wrong direction. perl is often known as nightmare for its intricate regular expression. new perl user would often discourage himself after viewing the magical syntax.

perl is more mature than php. anyway, perl development is slower because it's not so interesting for end user (like phyton). it's normal since perl is not designed for web programming. if you want to handle strings properly, perl is your choice.

php is much simplified as the main goal of php programming is to make (web) programming as easy as possible. you may argue that in php 5, php becomes more intricate with its oo programming. anyway, it's not the reason. php 5 oo is designed to boost script execution at run time. you may notice that in php 4 you can call all functions in a class (ie. all are public functions) which is bad in system design for the performance hit occures. with a little type hint in the language (without leaving the loosely typed concept), you will get cleaner and faster code even for your enterprise solution.

regards,
__________________
just an ignorant noob with moronic solution...
Reply With Quote
  #7 (permalink)  
Old 02-09-05, 09:01 PM
mhs12grade1992's Avatar
mhs12grade1992 mhs12grade1992 is offline
Newbie Coder
 
Join Date: Feb 2005
Location: USA
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
In my convenience, I would go with PHP codes because I found very convenience. I'd use CGI Perl if needed. I would rather to have both supported at my webhosting server. I would mostly use PHP. Especially for a log-in membership account.

I heard PHP is part of Perl, yeah.

MHS
Reply With Quote
  #8 (permalink)  
Old 02-10-05, 02:09 AM
SwitchBlade SwitchBlade is offline
Newbie Coder
 
Join Date: Jan 2005
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
cgi is slow php is better
Reply With Quote
  #9 (permalink)  
Old 02-10-05, 10:52 AM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by NeverMind
I don't code in Perl, but I read some tuts about it's basic syntax and I think PHP is easier..
I code in both, and I agree- PHP is much, much easier to learn and to use. I hardly touch perl anymore because it's so convoluted.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Reply With Quote
  #10 (permalink)  
Old 02-10-05, 10:53 AM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by mhs12grade1992
I heard PHP is part of Perl, yeah.
Nonsense. Whoever told you this is flat-out wrong. They have nothing to do with each other at all.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 profitable script sites for sale cms-master.com General Advertisements 3 07-03-07 10:17 AM
RESELLER WEB HOSTING - $9.99/MONTH For 4GB HD & 30GB BW! CPanel, PHP, MySQL & MORE! IncognitoNet General Advertisements 0 10-30-04 01:19 PM
Mouseover with Single PHP page rjwebgraphix PHP 7 09-16-04 05:15 PM
cgi or php script to detect dead links and images impatientskydiver PHP 0 07-15-04 06:49 PM
100 Web Templates & 10 PHP Scripts for sale! HostersUK.co.uk General Advertisements 0 01-10-04 12:31 AM


All times are GMT -5. The time now is 05:29 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.