On Tue, 5 Jun 2001, IT Dept - Terry Honeyford wrote:
> I have a really strange problem.
> when my script is run it works fine except for the bit that moves a
> company's config file. (shown below).
> the server comes back with a server error page and the server error log says
> :-
> "the CGI program /admin_tfoak did not produce a valid header (name without
> value: got line 'could not move file illegal seek at /admin_tfoak line
> 322.")
>
> snip ->
>
> 320 if ($query->param("dcomp")) {
> 321 &GETQUERYSTRINGVALUES;
> 322 `mv /web/company_profiles/$company_id
> /web/deleted_company_profiles/$company_id` or die "could not move file $!";
> 323 &GETREWRITEUSERS_CTL;
> 324 $content = "\<meta http-equiv=\"REFRESH\" content=\"1;
> URL=admin_tfoak?display=admin_menu\">";
> 325 }
> snip -<
You should use the move function (in the File::Copy module) rather than
the backticked system call, because this won't properly indicate a failure
of the move. You might be trying to move a file that has an open
filehandle on it. It is also generating an error message that the server
thinks is a header, and it is screwing up your redirect.
-- Brett
Brett W. McCoy
Software Engineer
Broadsoft, Inc.
240-364-5225
[EMAIL PROTECTED]