Forum Moderators: coopster

Message Too Old, No Replies

ftp overwriting files on server

         

primuz

10:52 am on Jun 20, 2005 (gmt 0)



Hi everyone. Need som help with this. I'm opening text files from server to a textarea in a form on a webpage by using php's ftp functions (works ok). The user can edit the text, and then save it. But when I try to save/write the file to the server, using the "w" option, I get the message: "failed to open stream: FTP server reports 213 570". I want do overwrite the files by using ftp. Anyone know how to do this?

(using ftp because I want to keep the permissions on the files secure - or is there a way around this?)

lobo235

9:28 pm on Jun 20, 2005 (gmt 0)

10+ Year Member



It looks like people have had similar problems writing files over FTP. One of the more common things is that fopen() uses passive connections when opening files from an FTP server. In some situations with certain routers and network setups this can cause problems.

Also, make sure you access files on the FTP using the full path and not a soft link or an alias because PHP has problems with those.

Read more in the comments on php.net:

[php.net...]