Re: Undeclared CGI???
by chromatic (Archbishop) on Aug 13, 2003 at 04:33 UTC
|
It looks fairly solid to me. Can you run it from the command-line? What version of Perl are you running? What is the output of these commands?
perl -V
perl -MCGI -e "print CGI->VERSION()"
| [reply] [d/l] |
|
I am running perl version 5.6.1 which I'm pretty sure is the latest. The other command doesn't appear to work. Just comes up with heaps of errors. i have been trying to download and install all the extra modules that it requires but it is never ending. Any other ideas because there are compilation errors whihc must mean that some code is wrong somewhere???
| [reply] |
|
It looks like you don't have CGI.pm installed (???). Try installing that. Other than that quote the exact error here and we will probably have more luck.
| [reply] |
|
Re: Undeclared CGI???
by sgifford (Prior) on Aug 13, 2003 at 05:03 UTC
|
Why don't you try starting with a very simple program:
#!/usr/bin/perl -w
use strict;
use CGI;
If that works, try adding in a line:
my $query = CGI->new();
If it still works, add in another line and whatever modules it requires, and so forth. That should help you narrow down exactly where the error is occuring.
| [reply] [d/l] [select] |
Re: Undeclared CGI???
by snadra (Scribe) on Aug 13, 2003 at 11:04 UTC
|
I am running perl version 5.6.1 which I'm pretty sure is the latest
No, it is not. It's Perl 5.8.0
But that is not causing the problem. If you want to upgrade, do it, otherwise just reinstall CGI.pm.
snadra | [reply] |
Re: Undeclared CGI???
by mildside (Friar) on Aug 13, 2003 at 04:51 UTC
|
Try replacing your use CGI; with use CGI qw/:standard /; and see if the error still occurs.Cheers!
| [reply] [d/l] [select] |
|
Tried what you said but giving this error now: Undefined subroutine CGI::Vars. Any more Ideas? Thanks for your help guys.
| [reply] |
|
/J\
| [reply] [d/l] |
|
Sounds like an incomplete or incorrect installation of the CGI module perhaps?Cheers!
| [reply] |
|
| [reply] |
|
Re: Undeclared CGI???
by chanio (Priest) on Aug 14, 2003 at 03:30 UTC
|
I don't have Mail::Mailer but I would bet on that line that says ... my $mailer = new Mail::Mailer ( "smtp" );
should have the address of your ISP's smtp. If you don't know it, try this address and fill the form with your email address... http://www.xav.com/mx_lookup.pl
Then copy the smtp address to that line.
Hope it helps! | [reply] [d/l] |
|
Tried what you said which seems like a good idea but I copied the address that I recieved and pasted it in but I am still getting the same error message Undefined subroutine CGI::Vars. I guess this must be a pretty bad error cause no one has solved it yet including me!!! You put the adress here dont you??
my $mailer = new Mail::Mailer ( "ADDRESS HERE);
If anyone can find a working solution then they will be one mighty good perl monk! | [reply] [d/l] |
Re: Undeclared CGI???
by mildside (Friar) on Aug 14, 2003 at 04:53 UTC
|
A few questions for you Nickd_69
- Who maintains the server that this script will run on? Perhaps you should contact them about your problem with their installation of CGI.pm
- Could it be a problem with the include path? This may be fixable with the use of a -I in the shebang line
Cheers! | [reply] |