Re: Why this file download CGI works with Firefox and fails with IE ?



Us wrote:
In article <fhpjb2$osu$2@xxxxxxxxxxxxxxx>, stoupa@xxxxxxxxxxxxx
says...
Are you sure that this is a system path to file? You can't to use
URL path. For example (on unix) if your file test.zip is stored in
/var/www/htdocs/test/ then you must use

my $file='/var/www/htdocs/test/test.zip';

I think you can use indifferently full qualified path or relative one
from root or the script itself (what I've done here)

Yes, if course. I wanted to accent that must be used system path instead of "http path" ;-)
But be careful that perl script is in some directory but can be run (by Apache) from other directory. In this case the relative path is not good idea. I'm used to use some "our" variable where I have stored absolute path to web root directory and all other paths I create from this variable. For example:

# virtual server for domain mydomain.com
our $webroot = '/var/www/mydomain/home/';
....
my $downloadpath = $webroot . 'download/';

# virtual server for domain otherdomain.com
our $webroot = '/var/www/otherdomain/home/';
....
my $downloadpath = $webroot . 'download/';

I think you understand me ;-)
--

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail from another non-spammer site please.)



.



Relevant Pages

  • Re: i want to start an application automatically at boot in unix : Please help urgent !!!
    ... > unix as root. ... that run at boot time. ... You'd put your script there. ...
    (comp.unix.shell)
  • IBM Informix Web DataBlade: Local root by design
    ... IBM Informix Web DataBlade: Local root by design ... Impact: Any user who can: 1) Save a Perl script anywhere on the server's ... admin right on any database can do it by loading the WDB module into ...
    (Bugtraq)
  • RE: Linux hacked
    ... I would also suggest using a simple script in the future that alerts ... Subject: Linux hacked ... To get back into your account you want to use, at the boot manager ... boot normally and you should be able to login as root with your new ...
    (Security-Basics)
  • Re: BSDstats v3.0 - The Security Rewrite
    ... The bsdstats script could easily pick up that entry and set ... a management machine, and that management machine only has ... Email is sent to root containing IDTOKEN= as generated by host, root forwards that to rpt@xxxxxxxxxxxx, rpt@xxxxxxxxxxxx sends back KEY= value ... second time, submits report values to root, root forwards that to rpt@xxxxxxxxxxxx ... ...
    (freebsd-questions)
  • Re: Great SWT Program
    ... from a terminal emulator and log in as root there. ... terminal-emulator windows open, ... The script, suid-root utility, or whatever would ... the command interpreter with root privileges ...
    (comp.lang.java.programmer)