Re: [OT] Re[2]: temporal directory used by apache/mod-perl?

2003-06-18 Thread Hector Pizarro
That will do it, thanks!


 Hello Hector Pizarro,

 Wednesday, June 18, 2003, 12:21:54 AM, you wrote:

 HP Apache::Request has a bug, it doesn't throw an error code when the
 file is HP partially uploaded. That's why I'm using Apache read()
 instead. Any idea HP how tosetup the  temporal directory for mod-perl
 without Apache::Request?

 What's wrong with TEMP_DIR ?

  my $apr = Apache::Request-new($r, TEMP_DIR = /home/httpd/tmp);
 HP my
  $upload = $apr-upload('file');
  $upload-link(/home/user/myfile) || warn link failed: $!;

 see: perldoc Apache::Request

 --
 WBR, Mike P. Mikhailov

 mailto: [EMAIL PROTECTED]
 ICQ:280990142

 My mother always used to tell me, The early bird gets the worm.


 HP --
 HP Hector Pizarro
 HP Amautatech

 Sorry, I'm mislead somewhere :(. So, you reading post data by itself,
 right? And *you* choose where temporary folder will be. Choose it on
 the same FS as target folder and use rename :) Or use File::Copy 'move'
 function which will copy file content if src and trg on different FS.
 Or `mv $src $trg`. TIMTOWTDI.

 But this is a far away from mod_perl topic.

 --
 WBR, Mike P. Mikhailov

 mailto: [EMAIL PROTECTED]
 ICQ:280990142

 Always listen to experts. They'll tell you what can't be done, and why.
 Then do it.


--
Hector Pizarro
Amautatech




Re: temporal directory used by apache/mod-perl?

2003-06-17 Thread Hector Pizarro
Apache::Request has a bug, it doesn't throw an error code when the file is
partially uploaded. That's why I'm using Apache read() instead. Any idea
how tosetup the  temporal directory for mod-perl without Apache::Request?

 What's wrong with TEMP_DIR ?

  my $apr = Apache::Request-new($r, TEMP_DIR = /home/httpd/tmp);
my
  $upload = $apr-upload('file');
  $upload-link(/home/user/myfile) || warn link failed: $!;

 see: perldoc Apache::Request

 --
 WBR, Mike P. Mikhailov

 mailto: [EMAIL PROTECTED]
 ICQ:280990142

 My mother always used to tell me, The early bird gets the worm.


--
Hector Pizarro
Amautatech




temporal directory used by apache/mod-perl?

2003-06-16 Thread Hector Pizarro
Hello, last week I asked about the problem I had with the partial uploaded
files,and how Apache::Request never got the error code correctly. (By the way,
thanks for the answer, looks like a bug) Well, the solution for me was to use
Apache read() and parse the incoming data myself. Uf, what a job!

Everything looks fine now, when I receive several files in the same
posting froma form and the user aborts the process, say, closing the form window, I can
rescue and save the files completed and dismiss the last one incomplete. My
problem now is that I have the /tmp directory in another partition in the
server.When I want to move the uploaded files from temporal to final, I can't do
'rename' as this function doesn't work across different filesystems. How
can Ichange the temporal dir from '/tmp' to, say, '/home/tmp'? I'm not using
Apache::Request so it can't be done as a parameter there, is it possible
to setthis in mod_perl, apache or I have to do it in the linux itself? if it is
the last one,any idea where?

Any information will be welcome, thanks people.

--
Hector Pizarro
Amautatech




apache::request parse() doesn't capture abort error

2003-06-13 Thread Hector Pizarro
Hello, first this is my configuration, all were installed by hand:

- apache 1.3.27
- libapreq-1.1
- mod_perl 1.27

 the users of this project can upload big files to the website (videos
 mostly). SoI use an html popup where a mod_perl handler receives the data, let's 
suppose
its 100Mb.
If the user closes the popup in the middle of an upload, Apache::Request
parse() isn't throwing any error, and all the following code in my module
savesthe file incomplete in the system, which of course is garbage data.

Is this a bug, an incomplete feature, or is my configuration? If parse is
supposed to return an error code, which one is that? 206 =
HTTP_PARTIAL_CONTENT?

Ok, now let's suppose that this error is fixed. I want to do several
uploads fromthe same popup at once, so I have 5 file boxes in the form. If the user
closesthe popup before the process ends, i'd like to save only the completed files,
how could I check which files are correctly uploaded, and which ones are
incomplete?

Any help would be great people, thanks.

--
Hector Pizarro
Amautatech