Hi, can you send me the shortcode you use (hide the ftp credentials)?
Regards
Nickolas
[wordpress_file_upload uploadpath=”newpath” createpath=”true” accessmethod=”ftp” ftpinfo=”user:password@123.123.123.123:12345″ useftpdomain=”true” adminmessages=”true”]
Creates a folder with the name “newpath” and puts a file of 0 bytes in this folder. But gives the error: The duration of the upload exceeded the time limit of the server.
A shorter version of the FTP server log says:
CONNECT: Client “::ffff:123.123.123.123”
OK LOGIN: Client “::ffff:123.123.123.123”
…
OK MKDIR: Client “::ffff:123.123.123.123”, “/newpath”
…
FAIL UPLOAD: Client “::ffff:123.123.123.123”, “/newpath/test.txt”, 0.00Kbyte/sec
Changing permission by using for example ftpfilepermissions=”0755″ works fine. FTP server log shows “OK CHMOD”.
Using ftppassivemode=”true” doesn’t work, but the server can accept passive mode. It gives the same error as above but : The duration of the upload exceeded the time limit of the server.
I have tried to increase some PHP settings like memory_limit, max_execution_time (to 120 s) and max_input_time (to 120 s). But this just gives the error “Upload failed! Unknown error.”
The server log gives an error/warning: “PHP Warning: ftp_put(): Failed to establish connection.”
The files I have tried are between 9 bytes and 2.5 MB of different formats (jpg, pdf, txt etc). I have also tried to temporarily disable the firewall on the web server just to be sure that wasn’t causing any problems. I tried two different ftp servers. One of them is used for daily backup of sites. Both works with other ftp clients.
-
This reply was modified 4 years ago by
econexact.
-
This reply was modified 4 years ago by
econexact.
After some fixing and trixing, I managed to solve it. There were several issues, but it turns out none of these are probably directly related to the plugin. One of the issues was that the FTP server is behind a NAT and this was blocking outgoing traffic when using active FTP.
Oh ok, good to know.
Let me know if you have any other problems.
Regards
Nickolas