Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm (Failed to collect files: Could not determine the type of file)

In deployment PhpStorm (7.1.2) cant upload any files with FTP. Error says "Failed to collect files: Could not determine the type of file" both with gif and php file.

idea.log:

2014-08-06 08:00:38,590 [ 384809] WARN - ins.webDeployment.TransferTask - Could not determine the type of file "ADDRESS_OF_FILE.php". org.apache.commons.vfs2.FileSystemException: Could not determine the type of file "ADDRESS_OF_FILE.php". Caused by: java.net.SocketTimeoutException: Read timed out

like image 836
Besuglov Sergey Avatar asked Aug 05 '14 16:08

Besuglov Sergey


People also ask

Why can't PhpStorm connect to a folder containing http?

The library that PhpStorm uses to connect to FTP (Apache Commons VFS) cannot read the contents of a folder containing such a file, which causes the operation to fail. The only solution is to remove the file containing http: in its name from the project. This may be because the deployment server requires a so-called passive FTP connection.

What if my language is not supported by PhpStorm?

If you are working on a language that is not supported in PhpStorm by default, there might be plugins supporting that language . When you open a file in the editor, PhpStorm chooses the file type and the corresponding language service according to the filename pattern.

How does PhpStorm choose the file type of a file?

When you open a file in the editor, PhpStorm chooses the file type and the corresponding language service according to the filename pattern. If the filename doesn't match any of the patterns registered for file types, you can associate the filename pattern with a specific file type.

How do I deploy a database using PhpStorm?

There are a couple of ways to deploy a database using PhpStorm: Make use of the integrated database tools and run the required DDL and SQL statements manually. Work with Phing and set up a DBDeploy task. Can I run a script or executable on my files before the upload occurs?


2 Answers

I guess it was all my fault.

After setting "Passive mode" in "Advanced options" for FTP connection all works fine.

Main Menu: Tools -> Deployment -> Configuration

"Advanced options" button

Check first checkbox "Passive mode"

like image 151
Besuglov Sergey Avatar answered Sep 20 '22 11:09

Besuglov Sergey


I faced the same error even after setting "Passive mode" in "Advanced options" for FTP connection.

Main Menu: Tools -> Deployment -> Configuration

"Advanced options" button

Check checkbox "Instead of MLSD".

(I was also facing issue of uploading only new files which were not existing on server before. this option will fix the issue. ) Have a safe phpstorming ahead.

like image 39
Shahid Rafiq Avatar answered Sep 22 '22 11:09

Shahid Rafiq