无法使用PhpStorm上传

时间:2016-09-19 17:17:59

标签: php file-upload ftp

我正在尝试使用PhpStorm上传我的网站内容。我网站支持的FTP连接如下:

Host: ftpes://x.y.z.u
Username: username
Password: passwd
Port no 21

我已将PhpStorm配置如下:

Ftp Server connection configuration

在这里,我能够成功连接服务器。但是当我尝试上传任何文件时,我会遇到以下异常:

无法传输文件' \ tests \ ExampleTest.php':无法创建FTP目录" ftps://207.174.215.236/tests"。

在此之后我启用了被动模式,如下所示:

Passive mode configuration at PHPStorm 然后我再次尝试上传我的文件,但上传过程无法完成。我的日志文件中出现以下异常:

2016-09-11 12:08:21,135 [ 783522]   INFO - ains.plugins.webDeployment.ftp - java.net.SocketException: Connection closed by remote host 
2016-09-11 12:08:26,521 [ 788908]   WARN - t.connections.RemoteConnection - Retrying connecting to ftps://x.y.z.u:21/ in @f3d492: 1 iterations 
org.apache.commons.vfs2.FileSystemException: Could not list the contents of folder "ftps://x.y.z.u/".
    at org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:1173)
    at org.apache.commons.vfs2.provider.ftp.FtpFileObject.getChildren(FtpFileObject.java:445)
    at org.apache.commons.vfs2.provider.AbstractFileObject.getChild(AbstractFileObject.java:1095)
    at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.createConnection(RemoteConnectionPool.java:188)
    at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionManager.openConnection(RemoteConnectionManager.java:114)
    at com.jetbrains.plugins.webDeployment.PublishUtils.lambda$null$0(PublishUtils.java:102)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:307)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.commons.net.ftp.FTPConnectionClosedException: Connection closed without indication.
    at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:317)
    at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:294)
    at org.apache.commons.net.ftp.FTP.getReply(FTP.java:692)
    at org.apache.commons.net.ftp.FTPClient.completePendingCommand(FTPClient.java:1813)
    at org.apache.commons.vfs2.provider.ftps.FTPSExtendedClient.initiateMListParsing(FTPSExtendedClient.java:127)
    at org.apache.commons.vfs2.provider.ftps.FTPSExtendedClient.mlistDir(FTPSExtendedClient.java:99)
    at org.apache.commons.vfs2.provider.ftp.FtpJBHelper.listFiles(FtpJBHelper.java:66)
    at org.apache.commons.vfs2.provider.ftp.FTPClientWrapper.listFilesInDirectory(FTPClientWrapper.java:170)
    at org.apache.commons.vfs2.provider.ftp.FTPClientWrapper.listFiles(FTPClientWrapper.java:152)
    at org.apache.commons.vfs2.provider.ftp.FtpFileObject.doGetChildren(FtpFileObject.java:135)
    at org.apache.commons.vfs2.provider.ftp.FtpFileObject.doListChildren(FtpFileObject.java:461)
    at org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:1164)
    ... 11 more

请指导我如何上传文件。

我可以使用filezilla和winscp上传我的文件,但无法使用PhpStorm上传它。

0 个答案:

没有答案