PHP - ftp_get only works once

Posted by William on Stack Overflow See other posts from Stack Overflow or by William
Published on 2010-04-06T18:28:57Z Indexed on 2010/04/06 18:33 UTC
Read the original article Hit count: 147

Filed under:
|
|

I'm connecting to an ftp server that I have no control over, and I'm pretty sure is using something old and outdated due to other issues I've run into.

I'm simply using this code in a loop to get all the files in a directory.

ftp_put($this->conn_id, $remote, $local, FTP_ASCII);

The first time all goes well, but after that I get this error thrown for each file I try to get: "There is already an active transaction"

I've tried both passive & active with no luck. It's the exact same code I use to connect to other FTP servers and get files with no problem.

Any ideas? I suppose my last resort could be disconnecting and reconnecting for each file, but that seems like a huge waste.

© Stack Overflow or respective owner

Related posts about php

Related posts about ftp