elaurvick -
Joined: 14 Oct 2004 Posts: 18 Location: Pacific Beach, CA
|
Posted: Mon Aug 06, 2007 3:49 am Post subject: cig.log says "Undefined subroutine" - but it's in |
|
|
Our website is written in php, and I have Abyss set up on my computer so I can test everything before moving it to the live site. No problems, everything works perfectly. Now I want to run our shopping cart (which is written in Perl) on my computer so I can try customizing some parts before I move them to the live site. I copied all the files from the website to my computer and set up Perl. The webpages apparently are finding the main program (store/agora.cgi), but it's not generating the dynamic cart pages. I get an Error 500 and this message in the cgi.log when I try:
Undefined subroutine &main::agora_cookie_save called at agora.cgi line 1600.
CGI: [C:\Perl\bin\perl.exe agora.cgi ] URI: /store/agora.cgi?p_id=01009b Broken pipe
The subroutine IS defined, but it's in a different file:
store/library/agora_html_lib.pl
This is the code:
sub agora_cookie_save
{local($inx);
open(SERVCOOKIE,">$sc_server_cookie_path");
print SERVCOOKIE "# Library of Server Cookies\n";
foreach $inx (sort(keys %agora))
{print SERVCOOKIE "\$agora{'$inx'} = &str_decode('" .
&str_encode($agora{$inx}) . "');\n"; }
print SERVCOOKIE '{local($inx);' .
'foreach $inx (keys %agora)
{' .'$agora_original_values{$inx} = $agora{$inx};}' . "}\n";
print SERVCOOKIE "#\n1;\n";
close(SERVCOOKIE); }
I'm not very familiar with Perl, was hoping to learn as I modify the cart. Can anyone help me with this? |
|