Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php project through ftp (Netbeans, Eclipse or any free IDE)

Tags:

php

ide

netbeans

I am new to Netbeans. Is it possible to work directly on the server files through sftp to avoid downloading/uploading each time. Will the intelisense work the same ?

If it is possible I can't find how to do that or what plug-in i need to use. And if it isn't what other free php IDE offers this option ?

like image 945
Jla Avatar asked Feb 12 '10 10:02

Jla


1 Answers

So.

With Netbeans

To work directly through ftp/sftp on Netbeans 6.8

  • Open a new project and select "Php application from remote server"
  • It stills need a local storage for the files so that you can work on them so you need to specify a project name and it's local folder
  • Next step is the remote configuration: Click on the "Manage" button to add a new connection by giving it a name and selecting sftp or ftp. Then enter the connection configuration with the initial directory
  • Back on the remote configuration screen the upload directory must be the same as the "initial directory"
  • On the next screen you can retrieve all the project's sources

Once done each time you will save a file it will be automatically uploaded to the server. If not go in the project properties and check "Upload Files" is on "OnSave" mode in the "Run configuration" section.

PS: I had problems with a "The authenticity of ... can't be established. RSA fingerkey is..." warning that kept appearing each time I saved. If so just create an empty and writable known_host file and point to it in the "Known host files" property of your remote connection, then restart Netbeans (seen on netbeans forum)

Edit: At this stage the behaviour still isn't quite what I am expecting since when you open a file netbeans will open the local copy and overwrite the remote copy when you save.

Edit2: Apparently you can not open the file directly from the server in Netbeans. You'll have to download the file before modifying it.

General solution

One workaround is to use an utility that will map the remote storage as a local drive. I know Fuse does it for Mac & Linux. I haven't found one for Windows yet.

like image 156
Jla Avatar answered Nov 28 '22 01:11

Jla