Need help with a login script

2010-01-08 Thread Adam Jimerson
I know this topic is beaten to death, and then some, but I was wondering if someone could help me figure out what is wrong with my login script. No matter if I try to login with a valid credentals or not it says that the login has failed. I'm sure it has something to do with the way that I am

Re: Showing errors with user input

2009-12-10 Thread Adam Jimerson
Greg Jetter wrote: start by checking the content of @errors inside the print_form sub. with a print statement and exit. Greg Thanks for that, now that is working correctly I guess I didn't need to go through the array like I was trying. -- We must plan for freedom, and not only for

Re: Showing errors with user input

2009-12-09 Thread Adam Jimerson
Greg Jetter wrote: You are trying to use a local scoped var as a global , line 93 $GoodMail is used out of its scope , if ( $user[5] =~ /^([...@\w.]+)$/ ) { $user[5] = $1; eval { my $GoodMail = Email::Valid-address( -address = $user[5], - mxcheck = 1); return; } #push @errors,

Showing errors with user input

2009-12-07 Thread Adam Jimerson
I am working on a registration page and there for want it to show the user errors it has found with their input. I have two subroutines in my code, the first one prints out the form, also takes an array with error descriptions that is passed by the other subroutine. The other subroutine

Re: Web photo album, is this possible in CGI

2009-05-23 Thread Adam Jimerson
2009 Adam Jimerson'}, -style={'src'='/default.css'}, -script=$jscript); To get the javascript in the $jscript variable I am currently using a here doc statement. I'm sure due to the length of my javascript code it is slowing down my page being made. If linking

Web photo album, is this possible in CGI

2009-05-10 Thread Adam Jimerson
Hi all, I am wanting to put something together where every time the script executes it looks into a set directory for photos and then builds a web page with those photos, or even a enlargeable thumbnail of the photo, in kind of a photo album way. I don't know if something like this can be

Re: Opening a pipe when taint mode is enabled

2009-01-13 Thread Adam Jimerson
Gunnar Hjalmarsson wrote: How would I allow for spaces but not newlines By including a space in the regex, just as Mike showed you in another reply. http://www.nntp.perl.org/group/perl.beginners.cgi/2009/01/msg13364.html Oh my USENET client didn't have the space in his reply. This is

Re: Opening a pipe when taint mode is enabled

2009-01-12 Thread Adam Jimerson
Gunnar Hjalmarsson wrote: Adam Jimerson wrote: On Jan 11, 8:21 am, nore...@gunnar.cc (Gunnar Hjalmarsson) wrote: Adam Jimerson wrote: It seams I over looked the space, is it possible to include spaces in the search string? Of course it is. What you call search string is a regular

Re: Opening a pipe when taint mode is enabled

2009-01-11 Thread Adam Jimerson
On Jan 11, 8:21 am, nore...@gunnar.cc (Gunnar Hjalmarsson) wrote: Adam Jimerson wrote: Gunnar Hjalmarsson wrote: You don't say what to do if the untainting fails. This code: if ($name =~ /^([...@\w.]+)$/) { $name = $1; }; should better be: if ($name =~ /^([...@\w.]+)$/) { $name

Re: Opening a pipe when taint mode is enabled (was: Send email using SMTP)

2009-01-10 Thread Adam Jimerson
Gunnar Hjalmarsson wrote: Adam Jimerson wrote: According to perlsec I need to use it as a key in a hash or reference a substring. The example given is ,[ ] if ($data =~ /^([...@\w.]+)$/) { $data = $1; # $data now untainted } else { die Bad data in '$data'; # log

Re: Send email using SMTP

2009-01-10 Thread Adam Jimerson
matt wrote: This is usually the result of a mismatch between the character set used by your ssh client and the locale settings of your session. Here's a link that discusses: http://help.lockergnome.com/linux/high-ascii-characters-linux-terminal- ssh-ftopict487060.html [u...@host ~]$ echo

Re: Send email using SMTP

2009-01-09 Thread Adam Jimerson
Adam Jimerson wrote: I wasn't able to remember what it exactly said, but yes it is about $ENV{PATH}, on my machine perldoc perlsec is riddled with formating problems it looks like, here is a copy of what I mean: Ok adding $ENV{PATH} = ''; or even $ENV{PATH} = '/usr/bin'; (in case it needs

Re: Send email using SMTP

2009-01-09 Thread Adam Jimerson
Gunnar Hjalmarsson wrote: I wasn't able to remember what it exactly said, but yes it is about $ENV{PATH}, on my machine perldoc perlsec is riddled with formating problems You can always read it online: http://perldoc.perl.org/perlsec.html Do I need to specify anything for the $ENV{PATH}

Re: Send email using SMTP

2009-01-09 Thread Adam Jimerson
Mike Williams wrote: You can read the output of perldoc perlsec on the web at: http://perldoc.perl.org/perlsec.html That will help, thanks! What version of perl are you using? What OS? I've seen similar problems with perldoc a few years ago while using perl 5.6.1 on early versions

Re: Send email using SMTP

2009-01-08 Thread Adam Jimerson
Gunnar Hjalmarsson wrote: Adam Jimerson wrote: I solved my problem using the sendmail with the code below in my script: open (MAIL, |/usr/sbin/sendmail -t ); print MAIL From: someaddr...@somedomain\n; print MAIL To: someaddre...@somedomain\n; print MAIL Content-Type: text/plain\n; print

Re: Verifying email addresses given by a user

2009-01-02 Thread Adam Jimerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mike Williams wrote: What are you expecting to happen? Email::Valid will throw an exception if *it* encounters an error. Finding an invalid address is not an error for Email::Valid. That's its job ;-) $addr will be undefined if the email

Verifying email addresses given by a user

2009-01-01 Thread Adam Jimerson
I'm trying to make my script verify a email address that a user has given to it. I have installed and using Email::Valid but it doesn't seem to be working for it allowed this as a email address: test The way that I have it checking is by this: eval { my $addr =

Re: embedding a CGI script in a HTML page?

2008-12-16 Thread Adam Jimerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Greg Jetter wrote: On Monday 15 December 2008 3:50:24 am Adam Jimerson wrote: Dermot Paikkos wrote: -Original Message- http://www.template-toolkit.org/ Mike Looking at the website and the documentation, still reading through it, I'm

Re:[SOLVED] embedding a CGI script in a HTML page?

2008-12-16 Thread Adam Jimerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mike Williams wrote: I have tried that and when I tried to call up a div object, in my css (is attached) called leftcolumn, instead of getting a navy blue column on the left side of the page it is just white. Did you perhaps use 'div

Re: embedding a CGI script in a HTML page?

2008-12-15 Thread Adam Jimerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dermot Paikkos wrote: -Original Message- http://www.template-toolkit.org/ Mike Looking at the website and the documentation, still reading through it, I'm still not sure how to mix this with my CGI scripts to make them look like the

Re: embedding a CGI script in a HTML page?

2008-12-15 Thread Adam Jimerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mike Williams wrote: On Sun, Dec 14, 2008 at 1:28 PM, Adam Jimerson vend...@charter.net wrote: On Dec 12, 12:47 pm, sdav...@mail.nih.gov (Sean Davis) wrote: Are you talking about this, http://search.cpan.org/~abw/Template-Toolkit-2.20/lib

Re: embedding a CGI script in a HTML page?

2008-12-15 Thread Adam Jimerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mike Williams wrote: Your first question was: Is it possible to embed a CGI scrip into a HTML page? Now you say: I'm not trying to put perl code into the page You will get better answers if you start with clearer questions. I'm sorry

Re: embedding a CGI script in a HTML page?

2008-12-14 Thread Adam Jimerson
On Dec 12, 12:47 pm, sdav...@mail.nih.gov (Sean Davis) wrote: You cannot put perl in a webpage the way that you do with PHP. However, there are a number of template engines written for and in perl that give you similar features.  Take a look at Template Toolkit, as an example. Sean Are you

embedding a CGI script in a HTML page?

2008-12-12 Thread Adam Jimerson
Is it possible to embed a CGI scrip into a HTML page? I don't know if CGI scripts work in a way that allow for this, I know that in PHP this is possible, because I want to make my CGI scripts and website have a unified look but I can't get my CSS to work in any of my scripts. -- We must plan

Re: Problem with uploader

2008-11-24 Thread Adam Jimerson
On Saturday 22 November 2008 11:23:28 pm Owen wrote: I apologize for not having the rest of your thread, but don't forget that CGI::Carp can be used, one use is in the set_message routine use CGI::Carp qw(fatalsToBrowser set_message); set_message(Please report details of this error to a

Re: Problem with uploader

2008-11-22 Thread Adam Jimerson
On Friday 21 November 2008 11:23:11 am you wrote: On Tue, 2008-11-18 at 10:49 -0500, Adam Jimerson wrote: If the open failed then wouldn't the die kick in and at least say something in the server logs? Also how would one go around and get a more descriptive error message? For testing

Re: Problem with uploader

2008-11-19 Thread Adam Jimerson
Matthew Whipple wrote: The open must have failed. You could work on getting a more descriptive error message but I'd suggest starting with the the path and permissions. Also check to make sure existing files are handled properly. Make sure the path used is relative to its environment (if

Re: Problem with uploader

2008-11-18 Thread Adam Jimerson
On Sunday 16 November 2008 9:10:19 pm you wrote: You'll want to look in the error log to see what is there. Sean All the Apache error logs says is print () on closed Filehandle OUTFILE at /srv/www/cgi-bin/upload line 46, but I do have the filehandle open in the script. -- We must plan for

Re: Problem with uploader

2008-11-18 Thread Adam Jimerson
Matthew Whipple wrote: The die message would most likely be written into the server's log. A quick fix to more easily get the error messages would be using CGI::Carp, a use CGI::Carp qw(fatalsToBrowser) should show you the error on the page. Using CGI::Carp didn't produce any error in

Re: Premature end of script headers

2008-11-16 Thread Adam Jimerson
Mike Williams wrote: [EMAIL PROTECTED] wrote: Hello, i need to know the reasons for this error Premature end of script headers i checked with my http header content-type:text/html ,but i had not solved yet.. Often this happens when some error occurs in your code before you

Problem with uploader

2008-11-16 Thread Adam Jimerson
I'm trying to make a CGI script to upload files remotely onto my server, to get around my uni blocking everything but port 80, but I have ran into a problem with it. I followed the documentation on CPAN for uploading files and did what they have suggested as the best way but it doesn't work.

Adding CSS to a CGI script

2008-11-08 Thread Adam Jimerson
I am curious about adding CSS to a CGI script, lets say that this is my script ~~~ #!/usr/bin/perl use warnings; use strict; use CGI qw(:standard); print header(), start_html(Add Me); print h1(Add Me); if(param()) { my $n1 = param('field1'); my $n2 = param('field2'); my $n3 = $n2 + $n1;