RE: Trying to get File and Directory info off of external server quickly

2005-08-02 Thread Goddard Lee
From: Philip M. Gollucci [mailto:[EMAIL PROTECTED] I didn't write this, but ...[it]... makes us millions. I trust you are putting thousands into perl, mod_perl and other good things, then ;)

Re: Trying to get File and Directory info off of external server quickly

2005-08-02 Thread Torsten Foertsch
On Monday 01 August 2005 23:12, Boysenberry Payne wrote: Hello All, I've got a two server platform one a static server for files and runs the mysql server and the other runs mod_perl. I'm trying to figure out the fastest way to get info on directories and files from the static server

Re: Trying to get File and Directory info off of external server quickly

2005-08-02 Thread Boysenberry Payne
Thank You Everyone, I think now that I know I can use $ftp-ls( -lR ), which I couldn't find anywhere in the Net::FTP docs or other O'Reilly books I have, I can stick to Net::FTP without is being slow. What was causing my script to take so long was the multiple $ftp-cwd( $directory ),

Re: Trying to get File and Directory info off of external server quickly

2005-08-01 Thread Philip M. Gollucci
Boysenberry Payne wrote: Hello All, I've got a two server platform one a static server for files and runs the mysql server and the other runs mod_perl. I'm trying to figure out the fastest way to get info on directories and files from the static server to the mod_perl server. Right now

Re: Trying to get File and Directory info off of external server quickly

2005-08-01 Thread Gedanken
On Mon, 1 Aug 2005, Philip M. Gollucci wrote: There is a running joke in my office that, no matter what the problem is, I simply blame NFS before hearing any details. I am correct a surprising amount of the time =) One quick caveat - properly unmount volumes when rebooting and such. Due to

Re: Trying to get File and Directory info off of external server quickly

2005-08-01 Thread Philip M. Gollucci
Gedanken wrote: One quick caveat - properly unmount volumes when rebooting and such. Due to one of those things that somehow grew beyond its original intent, we had a network of about 15 machines all mounting each other. NFS chokes when a mount it expects to be there, isnt. it takes it

Re: Trying to get File and Directory info off of external server quickly

2005-08-01 Thread Philippe M. Chiasson
Boysenberry Payne wrote: Hello All, I've got a two server platform one a static server for files and runs the mysql server and the other runs mod_perl. I'm trying to figure out the fastest way to get info on directories and files from the static server to the mod_perl server. Right

Re: Trying to get File and Directory info off of external server quickly

2005-08-01 Thread Boysenberry Payne
The server system is hosted with a third party, so I was hoping I could use mod_perl as a solution without resorting to involving them in the solution if possible. If NFS ends up being the best solution I will ask them if they could set it up. Thanks, Boysenberry This message contains

Re: Trying to get File and Directory info off of external server quickly

2005-08-01 Thread Philip M. Gollucci
Boysenberry Payne wrote: The server system is hosted with a third party, so I was hoping I could use mod_perl as a solution without resorting to involving them in the solution if possible. If NFS ends up being the best solution I will ask them if they could set it up. Specifically what

Re: Trying to get File and Directory info off of external server quickly

2005-08-01 Thread Boysenberry Payne
I'm not sure if HEAD would work. Basically, I'm trying to read a directory's files. After I confirm a file exists and doesn't have zero size I check that it has the appropriate extension for the directory then I add the directory address, file name and extension to a table in our database. It

Re: Trying to get File and Directory info off of external server quickly

2005-08-01 Thread Philip M. Gollucci
Boysenberry Payne wrote: I'm not sure if HEAD would work. Basically, I'm trying to read a directory's files. After I confirm a file exists and doesn't have zero size I check that it has the appropriate extension for the directory then I add the directory address, file name and extension to a

Re: Trying to get File and Directory info off of external server quickly

2005-08-01 Thread Boysenberry Payne
I've already got it working using Net::FTP. The problem is it runs slow using FTP. Here is an example of what I'm trying to do: my $h = $ftp-{handle}; foreach my $directory ( @directories ) { $h-cwd( $directory ) or die can't change to directory: $directory $!; my $dir_ls = $h-ls;

Re: Trying to get File and Directory info off of external server quickly

2005-08-01 Thread Randy Kobes
On Mon, 1 Aug 2005, Boysenberry Payne wrote: I'm not sure if HEAD would work. Basically, I'm trying to read a directory's files. After I confirm a file exists and doesn't have zero size I check that it has the appropriate extension for the directory then I add the directory address, file name

Re: Trying to get File and Directory info off of external server quickly

2005-08-01 Thread Boysenberry Payne
$ftp-{handle} = Net::FTP-new( $ftp-{host}, Passive = 1 ) or die Can't create new ftp with host: $ftp-{host}; It's part of my FTP module Thanks, Boysenberry This message contains information that is confidential and proprietary to Humaniteque and / or its affiliates. It is intended only for

Re: Trying to get File and Directory info off of external server quickly

2005-08-01 Thread Philip M. Gollucci
Boysenberry Payne wrote: my $h = $ftp-{handle}; foreach my $directory ( @directories ) { $h-cwd( $directory ) or die can't change to directory: $directory $!; my $dir_ls = $h-ls; foreach my $file_name ( @$dir_ls ) { unless ( substr( $file_name, 0, 1 ) eq . ) {