Re: where should perl create a file for user download?

From: Ramprasad A Padmanabhan (ramprasad_at_netcore.co.in)
Date: 02/02/04


To: beginners@perl.org, Timothy Driscoll <molvisions@mac.com>
Date: Mon, 02 Feb 2004 18:52:48 +0530

Timothy Driscoll wrote:
> greetings,
>
> I am writing a small perl script that takes user input via a Web form, writes
> a few files to my server, creates a zip archive that includes those files,
> and offers the user a link to download the zip file. I am running perl 5.8
> on OS XS 10.3.
>
> can anyone offer some expert advice concerning where on my server to put the
> newly created zip? in my cgi script dir? somehow, this troubles me from a
> security perspective (plus the fact that all of my user-accessible documents
> exist on a separate Volume from my core server apps). is there a better way?
>
>
> thanks!
>
> (a perl newbie trying to start off on the right foot.)
>
>
> :tim
>
The simplest way :-
Create a directory under your document root and store the files and
give links to those files as plain href. thats it

Optionally ,You can also try doing some fancy stuff like changing
content type of your script and printing the zip file

Bye
Ram



Relevant Pages

  • Advice for moving linux script to MacPerl
    ... in perl that runs on our Linux web server. ... - I told them to download and install MacPerl, ... script that prints the environment variables. ...
    (comp.lang.perl.misc)
  • Perl / Apache on RH9.0 not working.
    ... The server encountered an internal error and was unable to complete your ... Premature end of script headers: ... This is the first time I"ve used Apache 2.0 so I'm not sure if this is an Apache or a Perl issue. ... Configuration Phase Participation: Create Directory Config, ...
    (RedHat)
  • Re: DBD::Oracle dbd_st_execute slow speed
    ... I take it you are comparing like for like with the Plus or Developer script? ... have you tried this piece of Perl with some hardcoded values? ... My DBA ran an analyze table, looked at the indexes and server ... the same oracle database and same schema and tables. ...
    (perl.dbi.users)
  • [Full-Disclosure] PR0V1NG RFP WR0NG
    ... Agree that the presented Perl code has issues, and I agree that it's very ... I've taken a sample perl test script which reads: ... Server: Netscape-Enterprise/4.1 ... I'm a washed out sell out capitalizing on my 10 seconds of fame for writing some crappy advisories and some shitty perl code. ...
    (Full-Disclosure)
  • RE: Perl / Apache on RH9.0 not working.
    ... Perl / Apache on RH9.0 not working. ... The server encountered an internal error and was unable to complete your ... Premature end of script headers: ... Configuration Phase Participation: Create Directory Config, ...
    (RedHat)