changing user password

2002-06-24 Thread Pavel Koutný
I need to make CGI script for changing user password throught web browser. I have one, but doesn't work: I'm using FreeBSD 4.6 & Apache 1.3.24 #!/usr/bin/perl -w use Expect; $suexec = "/usr/bin/su"; print "Content-Type: text/html\n\n"; sub ChangeUnixPassword { my ($account,$passwd)

Re: changing user password

2002-06-24 Thread David vd Geer Inhuur tbv IPlib
Hi Pavel, I know that perl mostly doesn't like the sticky-bits on files such as : -r-sr-xr-x 1 root bin 24576 Aug 6 1998 /usr/bin/su He just doesn't executes them. Personaly I haven't found a solution for this. I know a collegue of mine has written a C-programm around it. Ma

Re: test.cgi hashing error

2002-06-24 Thread David T-G
Kyle, et al -- ...and then Kyle Babich said... % % This is what I have: % % my %pages = ("Yahoo","http://www.yahoo.com/";, % "Google", "http://www.google.com/";, % "All The Web", "http://www.alltheweb.com/";); % % while ( my ($key, $pages) = each %pages ) { %print qq{$key}; %

text problem

2002-06-24 Thread Martin Pestun
Hi everybody I've got text file on the local machine and Apache too. What I don't know is how can I display this file like html file using cgi. The file looks like: USER PID PPID %CPUTIME COMMAND user 26794 26002 0.00:00 user 4687 4685 0.00:00 -ksh

Session and authentication

2002-06-24 Thread Niko Gunadi
Hi, I'm using a session for my login system. So the session will keep the user's username and password. My question is if we able to retrieve the session back (for another page), is it necessary to check the username and password against the database ? I do not want to have unnecessary function

Re: text problem

2002-06-24 Thread David vd Geer Inhuur tbv IPlib
Hi, Multiple ways of doing this : #!/usr/bin/perl use strict; my $logfile = "..."; open(FH, "<$file"); my @contents = ; close (); print " @contents "; # - or print "USERPIDPPID .. "; foreach $line(@contents) { ## $line =~ s/\s+//g; print " $line ";

Re: Session and authentication

2002-06-24 Thread Jordan Mclain
I usually use random numbers, and keys for things like this, for example: I have a users table in a database set up like this: id integer auto increment primary key usernamevarchar(32) passwordvarchar(32) rand_keyfloat this way I can set the users cookie wit

Re: test.cgi hashing error

2002-06-24 Thread David T-G
Kyle -- ...and then Kyle Babich said... % % That confuses me; I would just copy and paste and that would be it but % I would have no idea how that is working and I don't really want to put I think that's a wise course :-) % anything in that I don't understand yet. Is there a simpler way th

Re: calling sub based on database list?

2002-06-24 Thread perl-dvd
No, this is quite a simple problem actually. Here's how. my $alias = "home|htmlBody,Header,homebody,footer"; my ($name, $subs) = split(/\|/, $alias); my @subs = split(/\,/, $subs); foreach $sub(@subs){ my $return_val = &{$sub}($pass_in_vars); } So the first part I assume you've got whe

What editor for Perl do you recommend?

2002-06-24 Thread Octavian Rasnita
Hi all, Can you recommend me a good editor for Perl scripts that runs under Windows? It should: 1. Save the text with Unix end of lines. 2. Write somewhere the current line I am in. 3. Not necessary but it would be wonderful to have a hotkey to jump from subroutine to subroutine, or to list the

Re: test.cgi hashing error

2002-06-24 Thread Kyle Babich
That confuses me; I would just copy and paste and that would be it but I would have no idea how that is working and I don't really want to put anything in that I don't understand yet. Is there a simpler way that would be more like: my $links = #hash here ; > > Kyle, et al -- > > ...and the

RE: What editor for Perl do you recommend?

2002-06-24 Thread Pavel Koutný
I think that you want too much for Perl editing under Window$, but try Ultra Edit or JEdit. I recommend JEdit, it's probably best editor written in Java and it's designed for developers. Pavel -Original Message- From: Octavian Rasnita [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 20

Re: What editor for Perl do you recommend?

2002-06-24 Thread alex
hiho Octavian and allperl comunity, the simple solution to this problem is called PROTON 3.1 and can be downloaded @ http://www.meybohm.de/ (http://www.meybohm.de/proton.html) you can do, what I did, and that is mounting your user homedir (with samba)as some drive X: or whatever, and code away!

Re: What editor for Perl do you recommend?

2002-06-24 Thread Francesco Scaglioni
From: "Octavian Rasnita" <[EMAIL PROTECTED]> Subject: What editor for Perl do you recommend? Date: Mon, 24 Jun 2002 08:06:40 +0300 > Hi all, > > Can you recommend me a good editor for Perl scripts that runs under Windows? > It should: > > 1. Save the text with Unix end of lines. > 2. Write some

Re: What editor for Perl do you recommend?

2002-06-24 Thread David T-G
Teddy -- ...and then Octavian Rasnita said... % % Hi all, Hello! % % Can you recommend me a good editor for Perl scripts that runs under Windows? % It should: vim. Maybe gvim if you're feeling decadent. % % 1. Save the text with Unix end of lines. Yep. % 2. Write somewhere the curren

HTML form another web site

2002-06-24 Thread Fred Sahakian
Is there an easy way to display the HTML from another website on your page without a redirect? for example, the below CGI just forwards you: #!/usr/local/bin/perl print "Location:http://thecgibin.com/quickcode/redirect.shtml\n\n";; I would mlike a CGI to just get the HTML from another page w

Re: What editor for Perl do you recommend?

2002-06-24 Thread David T-G
Teddy, et al -- ...and then David T-G said... % % ...and then Octavian Rasnita said... % % ... % % Can you recommend me a good editor for Perl scripts that runs under Windows? % % It should: % % vim. Maybe gvim if you're feeling decadent. I forgot to mention that it's lightweight and fast, t

RE: HTML form another web site

2002-06-24 Thread Scot Robnett
You need to check out the LWP module. http://search.cpan.org/doc/RSE/lcwa-1.0.0/lib/lwp/lib/LWP.pm Scot R. inSite Internet Solutions [EMAIL PROTECTED] http://www.insiteful.tv -Original Message- From: Fred Sahakian [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 9:49 AM To: <

how to change my password throught cgi

2002-06-24 Thread Pavel Koutný
Hi there, I have Perl script for changing password of current user, but how to do this through web ??? If I access my script through web-browser, current user is always "www". After Apache authentication user remains still "web". I need to solve this problem, please help me! Pavel

RE: how to change my password throught cgi

2002-06-24 Thread Scot Robnett
Assuming you are on UNIX, run your script suid. For example, if your script was called auth.cgi, here is what you would do: 1st, at the command line: chmod 4711 auth.cgi 2nd, change your shebang line in your script to include the -U (run as user) flag: #!/usr/bin/perl -U Now t

Object oriented variable question

2002-06-24 Thread Hughes, Andrew
When using cgi.pm object oriented method, how do I assign a static value to a variable and then output it? The test script that I listed below prints all of the html tags with "Hello!Did it work?" (without the quotes) in the paragraph tags. Also, in my error log there is the following error: in

Re: GET/POST handleing

2002-06-24 Thread perl-dvd
Curtis, Is this why you want my CGI.pm input replacement lib? So you can turn around and tell me why CGI.pm is so much superior? As I read through the tutorial here, with every thing said, the basic message seemed to be "It doesn't matter who you are or how smart you think you are, your n

Re: Question about redirect

2002-06-24 Thread perl-dvd
Erik, Try not printing print "Content-type: text/html\n\n"; then print print "Location: /path/prog1.cgi\n\n"; regards, David - Original Message - From: "Erik Riggenbach" <[EMAIL PROTECTED]> To: "Beginners-Cgi" <[EMAIL PROTECTED]> Sent: Saturday, June 22, 2002 6:59 PM Subject:

RE: Object oriented variable question

2002-06-24 Thread Scot Robnett
You are trying to assign a static value to something that comes from the form. If you create a field called "comments" (or anything you want to call it, that's just what I chose) on your form and then type your test string, it will work with the following change to your code:

Re: return =1

2002-06-24 Thread perl-dvd
Octavian, Secondly, by your explanation, I'm not sure whether you know this, but your if should be like this: -- my $test = sub_name(); if ($test){ # stuff } -- Or -- if (sub_name()){ # stuff } ---

Re: text problem

2002-06-24 Thread perl-dvd
Martin, Well, you can use a simple html tag called pre. --- open(FILE, "; close(FILE); print qq^ $contents_of_file ^; --- Is that what you are looking for or do you want to actually split up the data into i

Re: Session and authentication

2002-06-24 Thread Niko Gunadi
On Mon, Jun 24, 2002 at 10:03:09AM -0600, [EMAIL PROTECTED] wrote: >Niko, >If you don't want to compromise security then use .htaccess instead. Then base >your session >file off of the $ENV{'REMOTE_USER'}. Now of coarse this is assuming you are using >Apache. Then yes >you do need to chec

RE: text problem

2002-06-24 Thread Bob Showalter
> -Original Message- > From: Martin Pestun [mailto:[EMAIL PROTECTED]] > Sent: Monday, June 24, 2002 8:54 AM > To: [EMAIL PROTECTED] > Subject: text problem > > > Hi everybody > > I've got text file on the local machine and Apache too. > > What I don't know is how can I display this fil

Re: What editor for Perl do you recommend?

2002-06-24 Thread Jonathan Gines
definitely go with emacs and use "perl-mode" then "font-lock-mode" if you want syntax highlighting. At 03:51 PM 6/24/02 +, Francesco Scaglioni wrote: >From: "Octavian Rasnita" <[EMAIL PROTECTED]> >Subject: What editor for Perl do you recommend? >Date: Mon, 24 Jun 2002 08:06:40 +0300 > > > H

Re: What editor for Perl do you recommend?

2002-06-24 Thread Niko Gunadi
Try HTML-Kit. A multi-purpose editor for web development. Highly customizable. Lots of plug-ins avalaible. Even can open file remotely ! http://www.chami.com/html-kit/ niko -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: What editor for Perl do you recommend?

2002-06-24 Thread perl-dvd
By all means, Homesite. Ok, so it actually cost a few dollars, but this thing does great things for you. - It color codes html, perl, sql, css and so on. - save your files as windows, unix or mac format. - upon opening files, auto discover which format and display correctly - open multiple fil

RE: What editor for Perl do you recommend?

2002-06-24 Thread Scot Robnett
emacs is a good one. I also like TextPad (www.textpad.com). Scot R. inSite Internet Solutions [EMAIL PROTECTED] http://www.insiteful.tv -Original Message- From: Jonathan Gines [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 11:19 AM To: Francesco Scaglioni; [EMAIL PROTECTED] Cc:

passing variables in POST

2002-06-24 Thread Niko Gunadi
Hii, I want to create a link to another page and want to pass some variables in which i do not want the user to know. (POST method) how to do that ? regards, niko -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: What editor for Perl do you recommend?

2002-06-24 Thread John Brooking
Recognizing that this is a religious issue among many programmers, I submit for what it is worth that I use Ultra-Edit (Windows). It has everything you ask, you can extend the syntax for color-coding, run command line programs and capture the output in a window, edit remote files via FTP, record a

Re: passing variables in POST

2002-06-24 Thread John Brooking
Only way I know of is to have the variables in their own private form somewhere on the page, such as: (HTML tags embedded in email message here!) Then have the link submit the form programmatically using javascript: Click here You should be aware, if you are not alr

Running Modules

2002-06-24 Thread Theresa Mullin
Greetings All, I have the following code, from which I attempt to call the module “Test” #!/usr/local/bin/perl ### ### Program name: demo.pl ### Created By:Theresa Mullin require "cgi.lib"; ### Include the CGI stuff use CGI qw(:standard); ### Include the database access stuff use DBI;

My mind is numb!

2002-06-24 Thread Ben Huyghebaert
I just spent about 5-6 hours going through some of the unix mans for perl. I'm trying to get a better grasp on perl/cgi because right now a lot of it still confuses me even after reading a whole book about it. I think I'm mostly confused because there are so many ways to do things and then on

Re: My mind is numb!

2002-06-24 Thread Alfred Wheeler
Comfortably numb? ;-) This might help (a little more introductory...): Copyright: 2001 Format: Paper Bound w/CD-ROM, 1057 pp. ISBN: 0-13-028418-1 In Perl How to Program, the Deitels and their colleagues, Tem R. Nieto and David C. McPhie, discuss topics you need to build complete, Web-based a

Fwd: Running Modules

2002-06-24 Thread drieux
On Monday, June 24, 2002, at 11:30 , Theresa Mullin wrote: [..] > use Test; > [..] > > …Here is module Test: > > #!/usr/bin/perl > > ### Program Name: Test.pm > ### Created By:Theresa Mullin > ### Date: 5/20/02 > > package Test; > > $dbase = "TEST"; > print "And to all a good nig

Re: Running Modules

2002-06-24 Thread drieux
On Monday, June 24, 2002, at 01:09 , drieux wrote: [..] >> use Test; >> [..] there is also a 'name space' clash here "Test.pm" already exists as a real module in most of the perl releases. cf: perldoc -m Test So you may want to get into h2xs a little sooner - so that you can feel safe about d

Re: My mind is numb!

2002-06-24 Thread John Brooking
Ben, I have found any of the O'Reilly books (http://perl.oreilly.com/) to be an excellent resource. I own _Programming Perl_ (a.k.a. "The Camel Book") and find it's writing style to be very easy to read (even if I still have to re-read the complicated bits several times to really understand them)

RE: Running Modules

2002-06-24 Thread Bob Showalter
> -Original Message- > From: Theresa Mullin [mailto:[EMAIL PROTECTED]] > Sent: Monday, June 24, 2002 2:30 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Running Modules > > > Greetings All, > > I have the following code, from which I attempt to call the module > "Test" > #!/u

Re: passing variables in POST

2002-06-24 Thread Ovid
--- Niko Gunadi <[EMAIL PROTECTED]> wrote: > Hii, > > I want to create a link to another page and want to pass some variables > in which i do not want the user to know. (POST method) > > how to do that ? > > regards, > niko Niko, If you pass the variables to the page, the user can find

Re: passing variables in POST

2002-06-24 Thread Niko Gunadi
On Mon, Jun 24, 2002 at 02:35:06PM -0700, Ovid wrote: >Niko, > >If you pass the variables to the page, the user can find them, period. If you >control the output >of the other page, you'll need to create some sort of persistence mechanism. >Typically, this is >done by assigning session ids, sa

Fwd: passing variables in POST

2002-06-24 Thread WyvernGod
--- Begin Message --- what about a sesion id based on their IP? or soem relevent info like that? may be a stupid way to do it.. but i track the "count" of how many users are currently at my site by their IP/timestamp that is saved for 5 min. if someone accesses the web site 5+ min after a t