writing files on HD vs overwriting files on Apache CGI

Richard Gaskin ambassador at fourthworld.com
Wed Feb 19 17:16:01 EST 2003


jbv wrote:

> When using the following script in a regular MC stack :
> 
> open file myFile
> write myVar to myFile
> close file myFile
> 
> MC overwrites an already existing file, or creates a new
> file with that name on the HD.
> 
> But when MC is used as CGI on Apache for instance,
> no new file is created. The only way to achieve this, is
> to place in the right directory a file of same name & type,
> (and full access privilege : 777) and overwrite it with the script.
> 
> For instance, I have a web page with a form allowing users to
> upload jpg & gif files of their own. The cgi script parses these
> files and is supposed to store them in a specific directory with
> specific names. In order to achieve this, I need to put in advance
> in that directory as many empty files as possible uploads, with
> the right names. Then when a file is uploaded, the content will
> overwrite the corresponding file.
> 
> Could some CGI / Apache / Unix guru be kind enough to explain
> why this is so ?

Hmmm... I could have sworn I had an MC-based CGI creating both text and
stack files within a folder in my cgi-bin....

Could it be a permissions setting for the directory that's affecting this?

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.2: Publish any database on any site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the metacard mailing list