The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Agora cart error - Undefined subroutine

Discussion in 'cPanel Developers' started by verdon, Jul 15, 2004.

  1. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Hi :)

    My installation (via cpanel) seems to work, but I'm getting a lot of errors as quoted below from my apache error log...

    'Undefined subroutine &main::agora_cookie_save called at agora.cgi line 1626'


    I did do some searching in the archives for this forum and for the free Agora support Yahoo mailing list (shudder...) and found one reference... http://groups.yahoo.com/group/agora2/message/15785

    the essence of which was make sure my store's cookie directory was writable by the webserver. I assume this means /store/shopping_carts/ as that seems to be where files named along the lines of '6408723.5728_COOKIES' get written. I verified that dir to writable, in fact making it 777 for now, but I still get the above error from every cart view.

    I don't know a lot about perl, but I looked in agora.cgi and that error is coming from here, which is a sub routine called by many other routines

    sub call_exit {
    &agora_cookie_save;
    codehook("cleanup_before_exit");
    if ($sc_in_throes_of_death ne "yes") {
    exit;
    }
    }

    The &agora_cookie_save; sub routine is in the file /store/library/agora_html_lib.pl and as other things in there are called (and seem to be working) from agora.cgi I'd guess that & agora_cookie_save should be available to agora.cgi

    Any suggestions?

    Thanks, verdon vaillancourt

    Ps. Even though these errors are showing up in my apache error log, everything seems to be working as expected, there are no errors in the agora log, and I only noticed it because I periodically skim my Apache logs.
     
  2. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    N.W. Iowa
    it appears that in the main script, agroa.cgi, it's not calling the library or module that uses the missing sub routine from the agora_html_lib.pl lib file. There's probably some lines toward the top or somewhere in the script that calls other lib's via the require or use lib functions. You may need to add a require line so it uses the lib file.

    Mickalo
     
  3. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Hi Mickalo,

    Thanks for pointing me in the right direction. I had thought something like that would be likely, but found it odd that none on the agora cart mailing list seemed to have had this issue, if there was indeed something wrong with the current version of the cgi. Perhaps nobody checks their apache logs?

    Anywise,

    I added a line into the sub-routine and the errors gone and all seems well


    Code:
    sub call_exit {
      # new line
      &require_supporting_libraries(__FILE__,__LINE__,"./library/agora_html_lib.pl");
      &agora_cookie_save;
      codehook("cleanup_before_exit");
      if ($sc_in_throes_of_death ne "yes") {
        exit;
       }
     }
    
    Thanks again :)
     
  4. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    N.W. Iowa
    glad it helped :)

    Mickalo
     

Share This Page