Menu

FindOffice.pl not working

sidd
2016-03-02
2016-03-03
  • sidd

    sidd - 2016-03-02

    Hi , Can you help me with the below error

    I am geeting a 404 error(The requested URL /var/opt/switchmap/FindOffice.pl was not found on this server.) when I tried to search for a string.The file does exist in that location and I followed th steps in section 11 of the Readme file

    ne@scps02 /var/opt/switchmap $ cat /var/www/switchmap/FindOffice.pl

    #removed line here

    use strict;
    use File::Spec;
    use Sys::Hostname;
    use lib '/var/opt/switchmap';

     
  • Pete Siemsen

    Pete Siemsen - 2016-03-02

    From these symptoms, it looks like your SearchPartLists.html file contains this:

    <form method="GET" action="/var/opt/switchmap/FindOffice.pl"> ...but the file you show as existing is /var/www/switchmap/FindOffice.pl Is it as simple as the "opt" and "www" not being the same? </form>
     
    • Pete Siemsen

      Pete Siemsen - 2016-03-02

      (Hmm, it sure butchered my reply, sorry)

      From these symptoms, it looks like your SearchPortLists.html file contains
      this:

      /var/opt/switchmap/FindOffice.pl
      ...but the file you show as existing is /var/www/switchmap/FindOffice.pl.
      Is it as simple as the "opt" and "www" not being the same?

      On Wed, Mar 2, 2016 at 1:25 PM, Pete Siemsen siemsen@users.sf.net wrote:

      From these symptoms, it looks like your SearchPartLists.html file contains
      this:
      ...but the file you show as existing is /var/www/switchmap/FindOffice.pl
      Is it as simple as the "opt" and "www" not being the same? ---
      FindOffice.pl not working (sourceforge.net)
      --- Sent from sourceforge.net because you indicated interest in <https: sourceforge.net="" p="" switchmap="" discussion="" 378009=""> To
      unsubscribe from further messages, please visit <https: sourceforge.net="" auth="" subscriptions="">
      </https:></https:>

       
  • sidd

    sidd - 2016-03-03

    Thanks for the response Pete, It was typo on my side- I was trying different thing to make it work and pasted the wrong output. SearchPortLists.html is pointed to /var/opt/switchmap/FindOffice.pl

    and I getting 404 error when I tried to search for something -The requested URL /var/opt/switchmap/FindOffice.pl was not found on this server.

    <meta name="ROBOTS" content="NOINDEX, NOFOLLOW"> <title>Search Port Lists webpages</title> <link href="/var/opt/switchmap/SwitchMap.css" rel="stylesheet">

    Search Port Lists webpages



    <form method="GET" action="/var/opt/switchmap/FindOffice.pl"> #################### ne@scms02 ~ $ cat /var/opt/switchmap/FindOffice.pl ########output omited###### use strict; use File::Spec; use Sys::Hostname; use lib '/var/opt/switchmap'; </form>
     

    Last edit: sidd 2016-03-03
  • Pete Siemsen

    Pete Siemsen - 2016-03-03

    Ok. I had trouble understanding your last message. My email reader is Google Chrome with GMail, which gets very confused when an message contains imbedded HTML. It looks much better when I log in to the Sourceforge site and look at the forum.

    Anyway, I think I see the problem. This next part may be a bit confusing, sorry :-)

    When you edited the SearchPortlists.html file as described in step 11.3 of the README file, you inserted a Unix absolute file path to the FindOffice.pl file. You inserted "/var/opt/switchmap/findOffice.pl". Instead of that absolute path, you need a path that is relative to the root that your web server serves. The path will start with a slash. It'll be something like "/cgi/FindOffice.pl". It won't start with "/var/opt".

    If you're running the Apache, look in the Apache config files for "DocumentRoot". That is the root of the web server. On my system it's "/usr/web". If my SearchPortlists.html file were like yours, and contained "/var/opt/switchmap/FindOffice.pl", my Apache web server would try to find "/usr/web/var/opt/switchmap/FindOffice.pl". Hope this makes sense.

    In step 11.2 of the README, you copied FindOffice.pl to a directory under your web root. So in SearchPortlists.html, you want to use a path to that directory, relative to your web server's root.

    Hope this makes sense :-)

     

Log in to post a comment.

MongoDB Logo MongoDB