lmck21 has asked for the wisdom of the Perl Monks concerning the following question:

I have a perl script that creates an html page (www.curb-king.com/buildcurbpackage.htm - runs buildquote.pl). www.curb-king.com/cgi-bin/buildquote.pl has a couple of links that run perl programs. I get errors in the browser when I run those scripts. (chrome : website didn't send any data, firefox -the connection to the server was reset while the page was loading) If I type the address into the browsers directly it works (http://www.curb-king.com/cgi-bin/sendquoteemail.pl).

I developed this script on a computer I have set up to test scripts using lighttps and it worked fine. But I am having problems when I uploaded it to the server. Any thoughts, work arounds or better ways to do it.

Thanks

  • Comment on Script created html page won't run a perl script

Replies are listed 'Best First'.
Re: Script created html page won't run a perl script
by Corion (Patriarch) on Sep 23, 2019 at 20:28 UTC

    Most likely the web server error log on the server machine has more information as to what went wrong there.

    If the address works directly, maybe something is wrong with the links you are generating from buildquote.pl or buildcurbpackage.htm, but that's hard to tell without you showing the relevant parts of the generated HTML.

      No errors on on the web server. I checked that.

        So, what did the web server logs say about the transactions? Saying simply "No errors" isn't very descriptive. Are the requests reaching the server? Do those log entries appear any different from working requests? Can you ensure that your script is handling these requests as they are sent through (ie. are you logging)?

        What web server are you running?

        Right off the bat, please update things so that they use SSL. Asking a user for their personal information nowadays without at minimum SSL encryption is asinine. The "get it done at all costs" attitude before creating a proper backend is what the real problem is here.

Re: Script created html page won't run a perl script
by haukex (Archbishop) on Sep 23, 2019 at 22:39 UTC
Re: Script created html page won't run a perl script
by LanX (Saint) on Sep 23, 2019 at 20:36 UTC
    Can't reproduce it with the links you gave, so I can only guess.

    A common problem is to forget to assign the necessary file-rights to the user of the server-process or to adjust the lib paths.

    You should definitely check your http-server's error logs.

    If you are using CGI.pm you should consider printing errors temporarily to the page.

    HTH!

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Re: Script created html page won't run a perl script
by lmck21 (Initiate) on Oct 03, 2019 at 15:16 UTC

    Thanks for all your help, Just a reply back

    the problem was in Email::Valid, Works without it crashes with it. Not sure what that is about. I decided not to use it