View Full Version : newbie
missk
03-14-2006, 04:38 AM
I've been thinking about making a fiction site where people can post there writings for a while now.
I know HTML, CSS and PHP, the thing is I'm not very good with CGI and every tutorial I've found is crap. They can't explain a damn thing without confusing you in the first sentence. I've really tried learning all of this, but I can't find a good tutorial. Is there any anyone can suggest?
hyperbole
03-14-2006, 05:46 PM
CGI is not a language. It is not a single thing like HTML, JavaScript, or C++. You program CGI by learning a server side language, such as Perl, and using the environment variables provided by the web server (such as Apache) to control the actions of the program.
If you already know how to use PHP with web pages, you are using CGI.
Some links about developing for CGI are
Tutorial 1 (http://movielibrary.lynda.com/html/modPage.asp?ID=49)
Tutorial 2 (http://www.wdvl.com/Authoring/CGI/)
.
bustamelon
03-14-2006, 07:08 PM
Is there a reason why you can't or won't use PHP?
missk
03-14-2006, 07:49 PM
I was trying to use PHP, but someone told me that if I wanted people to be able to sign up to be users on my site, that I needed CGI, PHP wouldn't work. As far as I know, that's the only way to do what I'm looking for.
missk
03-14-2006, 07:50 PM
Thanks alot! Those tutorials really helped. =]
FishMonger
03-14-2006, 08:07 PM
Either php or perl can be used to do what you want. It's a matter of personal preference.
bustamelon
03-14-2006, 08:07 PM
I was trying to use PHP, but someone told me that if I wanted people to be able to sign up to be users on my site, that I needed CGI, PHP wouldn't work. As far as I know, that's the only way to do what I'm looking for.
You were misinformed there. This is done with PHP all the time, in fact there are several threads in the PHP secion of this board that talk about just that. Search for "login" or "authentication". You'll just need a database with your usernames, logins, passwords (encrypted of course), and any other info you might want. Then you would likely use sessions to authenticate. You would use an include to call a bit of code on every page that checks for client session info and verifies it against the data.
Of course it can be done with Perl too, but it's a lot more cumbersome IMO.
FishMonger
03-14-2006, 08:16 PM
Of course it can be done with Perl too, but it's a lot more cumbersome IMO.
I almost included a statement like that, but I'd say that php is more cumbersome. I comes down to which one you know best and what you need to do. Perl is more powerfull, faster and if you know how to use it, is also less cumbersome. Any and all languages are cumbersome if the person doesn't know how to use it.
bustamelon
03-14-2006, 08:34 PM
I almost included a statement like that, but I'd say that php is more cumbersome. I comes down to which one you know best and what you need to do. Perl is more powerfull, faster and if you know how to use it, is also less cumbersome. Any and all languages are cumbersome if the person doesn't know how to use it.
Hmm.... well I was a Perl person years ago. I remember having to manually echo all the headers and everything, but now that I think about it, I guess there are probably lots of new built in functions to handle that stuff, as there is in PHP. Perl is undoubtedly more powerful, but I don't know if I would agree that it's faster -- at least as far as runtime goes. Then again, I used it mainly for text processing and regular expressions (its original purpose). But your conclusion is exactly right. Whatever you know better will end up beiing faster (in terms of build time).
I should correct my first statement: maybe missk was not exactl misinformed, as much as the conversation that took place was not clear. Yes, you do need some type of CGI to do what she is looking to do, but as hyperbole said, PHP counts as a CGI tool. Just a means of interfacing the user with the server interactively.
missk
03-16-2006, 02:29 AM
Oh really? Thanks! I totally didn't know that!
Well, which would you guys say would be better?
I have someone helping me who knows CGI somewhat, and I'm sure we could figure it out, but if PHP works just as well, maybe we should use that?
FishMonger
03-16-2006, 04:21 AM
which would you guys say would be better?
In my opinion, Perl is better. bustamelon feels that php is better. As far as which one is best for you will end up being your personal choice. Since you already know a little php, that may be your better choice, at least at this point in time. Once you learn both, you might decide that Perl is better.
bustamelon
03-16-2006, 07:47 PM
In my opinion, Perl is better. bustamelon feels that php is better. As far as which one is best for you will end up being your personal choice. Since you already know a little php, that may be your better choice, at least at this point in time. Once you learn both, you might decide that Perl is better.
Agreed 100%. Personal choice. If you say you know PHP, then it seems reasonable to try it in PHP. OTOH, if your friend is a whiz, and has the time and patience to help you thru it, then take advantage of that.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.