Click to See Complete Forum and Search --> : How to create a member login?


Baby Jai
07-03-2003, 08:39 PM
Please if someone could help me it would be greatly appreciated here. I have part of my site i would like to create a member login for. I do not like using Javascript and it is not as secure as cgi i think. Ive never done CGI before so i know absolutely nothing about it. If someone could help me here it would be greatly appreciated. Any help is good help.

nkaisare
07-04-2003, 12:16 AM
If you are running Apache server, password protection is as simple as inserting a line in .htaccess file in the protected directory and creating a file (.htpasswd) in the main directory using htpasswd command.

PS: I know it can be done because I have done it before. Someone else can possibly point u to appropriate source giving more info about this.

Baby Jai
07-04-2003, 12:18 AM
ok server? you got me lost now. Im running on geocities server, also I need basics

jeffmott
07-04-2003, 12:44 AM
If you have never written a CGI program then you really have only two choices:
1) learn ;)
2) download a pre-written one.

If you want to learn then you'll first have to choose a language (CGI itself is not a language). Perl is the most common and best suited for CGI applications. You can start at the Perl and CGI FAQ (http://www.perl.com/pub/a/doc/FAQs/cgi/perl-cgi-faq.html). The book Learning Perl, Third Edition (http://www.amazon.com/exec/obidos/tg/detail/-/0596001320/ref=ase_develooper/104-3431286-2795943?v=glance&s=books) is a good introduction to Perl. From that point you should be able to use http://www.perldoc.com/, which is the free and complete language reference.

If you just want to download a pre-written one then you can search at http://cgi.resourceindex.com

ok server? you got me lost nowThe World Wide Web is really only a wide spread collection of software applications. A more interactive way of accessing documents and data available on the internet. These software applications are divided into two types: client software (the browser) and server software. The client software sends a request to a server for a particular document. It then parses and renders the returned result. The server software, upon receiving a request for a document retrieves that document, performs any processing that may need to be done with it, and returns the result.

You are probably aware of the top two competing client software: Microsoft IE and Netscape Navigator. Of server software, the top two competetors are Apache and Microsoft-IIS.

A CGI program is executed at the server, and the output of that program is what is sent back to the client browser.

None of that really tells you what server software geocities is running, but hopefully helps you better understand the workings of the Web.

Baby Jai
07-04-2003, 01:21 AM
K couple things. Is perl the only type of CGI? Well Geocities doesnt have Perl supported so im in the wind. Currently im using a jacscript enceypted password area. Works very well, but is there anything else i can use?

Jona
07-04-2003, 01:19 PM
Originally posted by Baby Jai
K couple things. Is perl the only type of CGI? Well Geocities doesnt have Perl supported so im in the wind. Currently im using a jacscript enceypted password area. Works very well, but is there anything else i can use?

Perl is a language that runs CGI scripts. You can also use C (.dll extension, rather than .pl). I like Perl the most.

Geocities does not support any server-side languages (Perl/CGI, PHP, ASP, JSP or any others); therefore, you cannot use any CGI scripts until you get a server that supports the use of them.

Using JavaScript to protect an area is possible, as you have apparently done, however it is insecure. Thus, if you are in need of higher security, you should use a server-side script.

[J]ona

Baby Jai
07-04-2003, 10:46 PM
so did you check it out? its on my site. Also tell me what you think? Im wondering what a server script is? i Do webdesign but never workd with nay type of CGI, I wouldnt even know where to start

Jona
07-05-2003, 01:31 PM
Apparently, I was mistaken. Your host is Geocities, but your have purchased a domain and hosting package with them? If so, please make certain that you have a cgi-bin folder in your main directory.

[J]ona

Baby Jai
07-05-2003, 01:56 PM
YEs I do, but the thing is when i work with pearl...well i havent even started. I do have the package for 5 years and i do have a cgi bin. That isnt the problem. But the problem is how do i edit pearl? With notepad?

Jona
07-05-2003, 02:00 PM
You don't edit Perl. You edit Perl code. ;) Also, I use Notepad, yes. It's simple code--if you're using FTP the format is ASCII. Also, set the CHMOD to 755 (if there are four visible digits, use 0755). Anyways, do you have a script already or do you need help writing one? (If you need help writing one, good Lord, what do I do? lol. I am helping you out here, but I've never created a Perl login script--only PHP. But I can try...)

[J]ona

Baby Jai
07-05-2003, 02:05 PM
Youve been a blessing for me so far. Im not asking you to write me a Perl code. You keep syaing CHMOD, lol...what is that? I have no idea, as you can see by my site I can design but I cannot do anything with CGI. Like I said, I have a login but its Javascript and encrypted so its hard for the NORMAL person to decipher it, thats even if they can get to the source. But I want to use a CGI for the simple fact that it is more secure and better. And hopefully once I ahve it launched it will be easier to edit the personnel that I have listed in it. Any help is good help right?

Jona
07-05-2003, 02:09 PM
Actually, CHMOD has nothing to do with CGI. Not directly, anyways. It's just the file permissions. If you are using FTP, you'll have to change your CHMOD mode before uploading the file--when you do upload it--unless you're on a Windows server. (And there I can't help you, since my server is Linux, and I've never used a Windows server, nor do I want to.)

[J]ona

Baby Jai
07-05-2003, 02:11 PM
Well, what do you suggest I do then? Im on a Windows server and I dont know where to go. Is there something I could just edit the personnel thru notepad and upload the CGI to my website? Or does that sound to easy? LOL, let me know :(

Jona
07-05-2003, 02:17 PM
I've never been on a Windows server. Basically, though, you'll have to open Notepad and write your Perl script. Then, upload it (however you do, whether FTP or File Manager) to the cgi-bin folder on the server. Then test the script--if it doesn't work, but should, the first thing you want to do is check to make sure your file permissions are set to 755.
Also, to report all errors for debugging, I'd use this code right after your first line (the #!usr/bin/perl part).


use CGI::Carp qw(fatalsToBrowser);


[J]ona

xataku_nakusute
07-10-2003, 01:02 AM
you are correct that geocities does not support cgi, however they DO SUPPORT PERL, only in the form of .pl files. i too have been lookin for some type of member cgi or perl script or something, and so far ive found ones that are quite unsuccessful. so im thinkin of going with something else, mayb .php or .asp.

sorry bout my rude intrusion, i was just passin by

(] XaTaKu_NaKuSuTe [)

http://www.xataku.tk/