in reply to code problem

Huh?

Looking at your code I am compelled to wonder just what you are trying to accomplish... Is this to allow a user to download file.exe?

Go to the logs

Second, what messages are being written to the web server's logs when this code is run from CGI?


Peter L. BergholdBrewer of Belgian Ales
Peter@Berghold.Netwww.berghold.net
Unix Professional

Replies are listed 'Best First'.
Re: Re: code problem
by sandal (Initiate) on Jul 21, 2003 at 17:50 UTC
    It should allow open any necessary file(including appl) instantly in a client browser. There are Internal server error(500)message, I can no get other details from server. Sandal

        I can no get other details from server. Sandal
      Bad ju-ju that. You really need to know what the server itself is complaining about. Internal errors are usually logged to the server's logs. See if your system administrator can glean that information for you.

      Suggestions

      1. Try setting the permissions of the file you are trying to open to 777 temporarily and see if it runs
      2. Try using adding the line: to your code and see what shows up on the browser. You will want to remove the qw/ fatalsToBrowser / once your code goes " production" as it can present an information leak later on.
      3. Try substituting a plain text file for the executable and change your header to Content-type: text/plain and see if that works. There may be something configured on the server that will prevent you from pushing presenting executables, such as some form of draconian measures to prevent spread of viruses.

      Hope this helps.


      Peter L. BergholdBrewer of Belgian Ales
      Peter@Berghold.Netwww.berghold.net
      Unix Professional

        Of cource, reading server logs is most effective way.

        The hosting plan I use does not provide log access, unfottunately. I try code(with this additional line) on another similar server(bad, without log access as well).

        use CGI::Carp qw/ fatalsToBrowser /;

        and get error:

        Software error:

        Can't access file at akvilon.cgi line 7.

        Thank you,

        Sandal