Menu

Getting Search port lists

ryan
2014-02-06
2014-02-11
  • ryan

    ryan - 2014-02-06

    Accidentally hit enter before finishing my question.

    Does anyone know how to enable the search function to work in Switchmap? When I click on 'SearchPortlists.html', I get a 404. Also, does that search function look at all fields, such as the port description?

     

    Last edit: ryan 2014-02-06
  • Pete Siemsen

    Pete Siemsen - 2014-02-06

    Have you followed the steps in section 11 of the README file?

     
  • Pete Siemsen

    Pete Siemsen - 2014-02-06

    Yes, the search function looks at all the fields, including the port description.

     
  • ryan

    ryan - 2014-02-07

    No, I didn't see that documented in the README file. After following the instructions I get a 500 internal server error when searching for something. Any ideas? Below are my apache error logs.
    http://myserver/cgi/FindOffice.pl?strng=abc

    Can't locate ThisSite.pm in @INC (@INC contains: /usr/local/switchmap /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.5 .) at /usr/local/switchmap/Constants.pm line 2., referer: http://myserver/switchmap/SearchPortlists.html
    BEGIN failed--compilation aborted at /usr/local/switchmap/Constants.pm line 2., referer: http://myserver/switchmap/SearchPortlists.html
    Compilation failed in require at /usr/www/nets/internal/portlists/FindOffice.pl line 31., referer: http://myserver/switchmap/SearchPortlists.html
    BEGIN failed--compilation aborted at /usr/www/nets/internal/portlists/FindOffice.pl line 31., referer: http://myserver/switchmap/SearchPortlists.html
    Premature end of script headers: FindOffice.pl, referer: http://myserver/switchmap/SearchPortlists.html

     
  • ryan

    ryan - 2014-02-07

    Just FYI I changed the Perms on FindOffic.pl and SearchPortlists.html to 777, but that didn't help.

     
  • Pete Siemsen

    Pete Siemsen - 2014-02-07

    In the README file, section 11 describes how to put the FindOffice.pl file into a cgi-capable directory on your web server, and then edit SearchPortlists.html to set the path to FindOffice.pl.

    From your error messages, it seems you've done those steps - your Apache server is executing FindOffice.pl. Trouble is, FindOffice.pl can't load ThisSite.pm. The problem seems to be that you haven't done step 11.1, or not done it correctly. You have to edit the "use lib" line in FindOffice.pl to make it contain the path to the directory that contains the SwitchMap code, so that FindOffice.pl can load ThisSite.pm, Constants.pm, etc.

     
  • ryan

    ryan - 2014-02-11

    I had to change perms on ThisSite.pm to allow to be read by anyone. Previously:
    -rw-r-----

    Now, -rw-r--r--

    Thanks for the help on tshooting.

     

Log in to post a comment.