Re: Undefined subroutine: if (param('admin') eq "y")

[email protected] (Greg Jetter)
Newsgroups perl.beginners.cgi
Organization Lazy Mountain Computers
Message-ID <[email protected]>
On Tuesday February 19 2008 3:46 pm, [email protected] wrote:
> I'm using the Web Developer Server Suite - Community Edition pretty
> much out of the box on WindowsXP.  This script worked fine on a LAMP
> system although I am not sure what Apache modules were loaded.  I am
> beginning to wonder if I am missing some configuration to allow:
>
> if (param('admin') eq "y")
>
> ERROR
>
> Software error:
> Undefined subroutine &main::param called at C:/www/vhosts/localhost/
> cgi-bin/stafio.pl line 33.
>

your missing  the function called param .
for some reason it not being loaded , you use it  quit a bit in your code but  
it's not defined any where so it must be loaded by a call to use, or require

see comments below





> SCRIPT
>
> #!C:/www/perl/bin/perl.exe
> use CGI::Carp qw(fatalsToBrowser);
> #  organizational In/Out board
>
> # configuration data
>
> require 'C:/www/perl/lib/datapath/stafio.ph';


reads through this and insure that  all the paths  to any additional libraries  
are correct



Greg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.