The ftp_nlist command causes a great lag or something, when executet.
I wrote a script that reads dirs and subdirs of an ftp and writes an
index of the files into my mysql db....

Since I use a recursive function for that, the ftp_nlist has to be
called about some thousand times.....it is really impossible to get the
script run until finished reading all dirs. 
Maximum I got was about 30 entries.

When I increase set_time_limit, the script takes more time, but the
results are even less than with 5 seconds limit or something.

I read about a problem like this on php.net, and there was printed, to
use the ftp_rawlist command instead.
The ftp_rawlist command causes exactly the same latency.

Does anybody know what this is and what I can do?
Is it a bug?


Here is the code of the function:

function auslesen($verzeichnis)
{

global $verbinden;
$arrliste=array();      
$arrliste=ftp_rawlist($verbinden, $verzeichnis);


                while (list($num, $entry) = each($arrliste))
                { 
                auslesen($entry);
                schreiben($entry, $verzeichnis);
                }

ftp_cdup($verbinden);
}



well.....the function works.......but just in 3 of 5 cases, in the other
2 it causes the latency......but when it reads about 5000 dirs
recursive, there is no chance for the script.

Please help

Sincerely  Rudi


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to