Remote Synchronization
Many of you would like to have remote synchronization for your PHP projects - well, let's have a look what we have done.
First, you have to define a Remote Web Site configuration for your project; I'm pretty sure most of you already know how to do that but let's repeat it once more: right click your project in Projects view and select Properties. In the Project Properties dialog, choose Run Configuration and as a type select Remote Web Site (or, if you are currently editing a PHP file of your project, just choose Customize... from the combo box in the main toolbar). You will notice that now one can select On Save for Upload Files (the first highlighted area on the image). Please note that now it's also possible to speed up an upload a bit but as the label says, use this with caution (the second highlighted area on the image).
You are done! Seriously, from now, every change (create, edit, rename, delete) should be immediately propagated to your remote server. One more note - if the operation takes more than 1 second, progress bar is shown:

The same applies if one uses local copying under a document root of a web server (it can be found in Sources category of Project Properties dialog):

That's all for today, and as always, please use our development version of NetBeans to try it and let us know if you find any problem.
Thanks a lot, we hope that you will like this feature!

This is a great feature! This is something I have been waiting for in NetBeans since I first started using it for PHP work. Way to go guys!
Posted by lobo235 on April 09, 2009 at 05:54 PM CEST #
Good feature.
I think the remote host setting can be extracted into a standalone service for common use.
By the way, why NetBeans forget providing a united Run/Debug/Profile configuration gui for all projects , like Eclipse or IntelliJ IDEA.
Posted by hantsy on April 10, 2009 at 05:21 AM CEST #
Nice to see new stuff appearing all the time :)
Posted by dr. Hannibal Lecter on April 10, 2009 at 08:52 AM CEST #
First of all - thanks a lot for your positive feedback!
To hantsy:
> [...] the remote host setting can be extracted [...]
Unfortunately, I wasn't able to do it for NB 6.7...
> [...] a united Run/Debug/Profile configuration gui for all projects [...]
Please, feel free to file an issue, thanks.
Posted by Tomas Mysik on April 10, 2009 at 09:11 AM CEST #
Ohh, that's cool feature. Thanks!
Posted by Pepa on April 10, 2009 at 09:15 AM CEST #
This is a great feature but when you work with many big projects (17k files) on FTP servers you have problem because you always must download projects sources to you computer.
Posted by ssa on April 10, 2009 at 11:01 AM CEST #
Can you make FTP connections like in ZendStudio5
or Eclipse (plugin "RSE FTP") ??
Sorry for my english :)
Posted by ssa on April 10, 2009 at 11:09 AM CEST #
To ssa:
> [...] you always must download projects sources [...]
Why "always"? Sorry, I don't see the point why to download it more than once.
(Of course, if you are a standalone developer; in a team, working without any VCS is IMHO very risky and hardly possible.)
Posted by Tomas Mysik on April 10, 2009 at 11:30 AM CEST #
To ssa:
> [...] "RSE FTP" [...]
Any link? I found this one but it returns HTTP error 500:
http://dsdp.eclipse.org/help/latest/index.jsp?topic=/org.eclipse.rse.doc.user/gettingstarted/g_start.html
Posted by Tomas Mysik on April 10, 2009 at 11:32 AM CEST #
Usefull feature!
Question: upload files can also be set to manually.
But how do I start it then?
Is there a shortcut to copy files from the source to the FTP server.
(using 6.5)
Posted by MyBelovedPHP on April 10, 2009 at 11:50 AM CEST #
Hi, very usefull feature but how can I upload only changed files from many folders?
I need additional view for changed files - like subversion "show changes".
Thanks!
Posted by murwazy on April 10, 2009 at 12:53 PM CEST #
To Tomas Mysik:
> [...] Why "always"? [...]
Usually I work with SVN project but 1-3 times a day I must fix something in different clients application and I would have to download all source for each client.
To Tomas Mysik:
> [...] Any link? [...]
http://www.eclipse.org/dsdp/tm/
Posted by ssa on April 10, 2009 at 12:56 PM CEST #
To MyBelovedPHP:
> [...] manually. But how do I start it then?
Using context menu on a file/folder or define a shortcut (Tools > Options > Keymap).
> Is there a shortcut [...]
I already answered above.
Posted by Tomas Mysik on April 10, 2009 at 12:57 PM CEST #
To ssa:
> [..] I must fix something in different clients application [...]
Just an idea - download only those files that you are going to change?
> [RSE]
Well, remote client in NetBeans PHP is from the beginning planned as simple as possible, only as a basic support. Unfortunately, more complex solution is currently out of scope for our PHP team, you can see e.g. http://www.netbeans.org/issues/show_bug.cgi?id=154446
Posted by Tomas Mysik on April 10, 2009 at 01:07 PM CEST #
To murwazy:
> how can I upload only changed files from many folders?
Changed files are uploaded automatically, no need to upload them manually.
> I need additional view for changed files - like subversion "show changes".
Unfortunately, right now this is not possible.
Posted by Tomas Mysik on April 10, 2009 at 01:10 PM CEST #
To Tomas Mysik:
no no, i dont use "upload on Save".
very often i want upload all files together.
additional view for changed files with upload option - please, think about this:)
Thanks.
Posted by murwazy on April 10, 2009 at 01:24 PM CEST #
To murwazy:
> [...] i dont use "upload on Save" [...]
Then I think you have only 2 options:
- select all changed files by hand (using CTRL) and Upload (from their context menu)
- upload all the sources
Posted by Tomas Mysik on April 10, 2009 at 01:46 PM CEST #
To Tomas Mysik:
- unfortunately my projects have many folders and files.. in project view i dont see "expand all" button. it is really uncomfortable to do this in your way :/
- i dont work alone with files.
usually i use eclipse but I give a chance netbeans and really like it. only uoload is "poor". many people works with remote files like me.
best regards.
Posted by murwazy on April 10, 2009 at 02:00 PM CEST #
To murwazy:
> [...] it is really uncomfortable to do this in your way [...]
You can upload all your files - and when upload dialog appears, just use its search functionality and context menu on files. Perhaps a good idea for the next blog entry ;)
> i dont work alone with files
Our remote support is primarily targeted for standalone developers; in a team, (S)FTP is risky so some VCS is expected and recommended and usually used.
Posted by Tomas Mysik on April 10, 2009 at 02:39 PM CEST #
To Tomas Mysik:
> You can upload all your files - and when upload dialog appears, just use its search functionality and context menu on files. [...]
yes but i have there hundreds of files :)
i use "upload on save" option for now, it is more convenient than upload all files or searching changed.
> Our remote support is primarily targeted for standalone developers; in a team, (S)FTP is risky so some VCS is expected and recommended and usually used.
we use svn, access to ftp is only for upload currently changed files.
please please think about "changed files view" for upload - this will be good idea for the next blog entry ;)
best regards.
Posted by murwazy on April 10, 2009 at 02:52 PM CEST #
Hi, great feature!
A small problem: empty folders are not created - did I miss something?
Posted by Michal Kocián on April 11, 2009 at 02:27 PM CEST #
To Michal Kocián:
> [...] empty folders are not created [...]
Yes, this behaviour is intentional; could you please describe your scenario (why you need it)? Or feel free to file an issue if you want.
Thanks a lot,
Tomas
Posted by Tomas Mysik on April 14, 2009 at 10:00 AM CEST #
Hi,
usualy there are few empty folders for XML data exports, imports, cache, etc... OK, I wanted to know if it is a feature or a bug.
It would be nice to reestablish connection, when the connection is broken during a transfer, and finish the transfer ... or ask whether try to finish the transfer again.
But it is great feature ... I enjoy it.
Posted by Michal Kocián on April 15, 2009 at 05:24 PM CEST #
To Michal Kocián:
> [...] empty folders for XML data exports, imports [...]
In such case you need to change folder permissions - right? This is currently not supported (limitations come from JDK side) but it will likely change in the future.
Thanks for your positive feedback.
Posted by Tomas Mysik on April 15, 2009 at 07:05 PM CEST #
I'm experiencing problems with this feature: I have to enter the password EVERY TIME, which is very annoying. I tried using the private key file as well as storing the password in the remote connection.
Having to enter the Password everytime when saving a file is very annoying, especially since the textfield isn't even focused :/
Furthermore until now I don't know where the files land... At least I know where they don't land: In the directory it should
Other than that it's definately a cool feature!
Posted by Dominik Jungowski on April 16, 2009 at 10:05 AM CEST #
I have just finished searching the whole server: My files never landed on the destination server :(
Posted by Dominik Jungowski on April 16, 2009 at 10:25 AM CEST #
To Dominik Jungowski:
Please, file an issue with steps to reproduce (link can be found in the blog post).
Thanks,
Tomas
Posted by Tomas Mysik on April 16, 2009 at 12:38 PM CEST #
To Dominik Jungowski:
I didn't reproduce this issue using NetBeans IDE Dev (Build 2009-04-16_12-03-59 ). If you fill the issue add there info about your OS and exact steps. I'll try to reproduce again then.
Thanks a lot for helping us to make our IDE better ;)!
Regards,
Filip
Posted by Filip Zamboj on April 16, 2009 at 01:43 PM CEST #
Hello,
This is slightly offtopic.
Are there any progress with symfony support? Is Petr Pisl still working on it? He hasn't posted for long time.
Posted by Guest on April 16, 2009 at 02:15 PM CEST #
To Dominik Jungowski:
I actually found out that IDE keeps me asking on password only in case it can't save host to known_hosts. That's actually what's done after it asks on fingerprints. Could you verify your settings, paths to id_dsa and known_hosts file in particular?
Thanks a lot!
Regards,
Posted by Filip Zamboj on April 16, 2009 at 03:22 PM CEST #
Guest wrote:
Are there any progress with symfony support?
* not yet
Is Petr Pisl still working on it? He hasn't posted for long time.
* No he isn't. I have in plan to write some tutorial about symfony and netbeans. But there is no real support at the moment. I mean there is no support in a way that you call symfony actions from IDE ... On the other hand there are some features in IDE that helps you, svn, ftp upload, file editor, debugging and many others ...
I hope and I wish it's gonnna be done once. We actually appreciate all ideas but I don't see real symfony support in 6.7.
Btw, if you have any good ideas about symfony support, could you, please write that on users@php.netbeans.org. This is going to make our communication easier.
Posted by Filip Zamboj on April 16, 2009 at 03:31 PM CEST #
I keep getting an error message,
"Upload Files on Save failed. Disable this functionality for this session?"
Even though it uploaded just fine. This is highly annoying. Inadequate FTP saving is really a deal breaker for me :(
Posted by Mark on April 18, 2009 at 09:22 PM CEST #
To Mark:
Please, file an issue. Thanks.
Posted by Tomas Mysik on April 20, 2009 at 09:57 AM CEST #
For FTP, go to Tools->Plugins->Available Plugins->Seach "FTP" and install remote-fs!
Works for me :-)
Posted by Jan Kaderabek on April 21, 2009 at 11:25 PM CEST #
@Filip: I tried it again by changing the permissions of the known_hosts file to 666 but it still didn't work.
I filed an issue (http://www.netbeans.org/issues/show_bug.cgi?id=163345) with hopefully enough information
Posted by Dominik Jungowski on April 22, 2009 at 11:03 AM CEST #
I have found out that my main issue results from my keyfile having a passphrase. I also already wrote this into the ticket
Posted by Dominik Jungowski on April 30, 2009 at 12:28 PM CEST #
Great work! This feature was urgently needed for our company's development infrastructure!
Posted by Andi on May 13, 2009 at 08:02 AM CEST #
two "big" improvements:
- a checkbox to select/deselect all files in the upload dialog
- check only the changed files by default in the upload dialog (so you don't have to re-upload everything every time but you can chose to upload only the changed ones). leave unchanged files unchecked.
great work anyway :D
Posted by Gino Pilotino on May 28, 2009 at 10:47 AM CEST #
this is a feature which is totally needed.
only one thing...
is it possible to have a permanent ftp-connection. the initial connect may take some time and if you have to wait every time you want to upload a single file, it's dramatically slow.
Posted by andy on June 03, 2009 at 03:33 PM CEST #
Well, I suggest something else, quite easier for each session of work, it must have an option to upload all open files.
In this way, we can keep opening files and changing it, and when we are done, a simple click on "Upload All Open" will reduce the work of CTRL + Click selection of files from the project menu.
Posted by Rehan Anis on June 15, 2009 at 08:29 AM CEST #
Good work, yet I still would really like to see an 'exclude folder' option. I'm using a doc/ folder in each of my projects, for all the documentation/spec/screenshots/PSD's etc.Theese files tend to be really big, and NB allways wants to upload them 'on run'. It kinda irritates and slows down development if I want to use the 'on run upload' feature.
The "upload all open" suggested by Rehan also seems to be quite a good idea! Anyways - keep up the good work love php for NB!
PS: Any symfony integration plans yet?
Posted by Konrad Malawski on June 19, 2009 at 12:46 AM CEST #
I´d like to see to add a 'remote include path' for libraries on a remote system.
I often work on Projects using libraries symlinked and/or using pear. It would be great to be able to include those libraries (acessible via another ftp-account) as include-path and also have them editable/synced on save. With the 'old' ZendStudio 5.5 this is possible by right-clicking on a folder of a remote connection and chose 'add to project'. Sadly, the Eclipse-Based Studio is more than disappointing :(
Any chance to see this in a future version ?
Alex
Posted by Alex on July 05, 2009 at 09:33 AM CEST #
Thanks..
Posted by aşk şiirleri on July 29, 2009 at 05:41 AM CEST #
this is a feature which is totally needed.
only one thing...
is it possible to have a permanent ftp-connection. the initial connect may take some time and if you have to wait every time you want to upload a single file, it's dramatically slow.
Posted by medyum on August 12, 2009 at 03:29 PM CEST #
this has totally not worked for me :(
it says "Upload failed on save failed . Disable this functionality for this session" ..
the "manual upload works" fine
hope someone can help !
thanks
Posted by shashi on August 28, 2009 at 09:40 PM CEST #
It was a very nice idea! Just wanna say thank you for the information you have shared. Just continue writing this kind of post. I will be your loyal reader. Thanks again.
Posted by links of london on October 31, 2009 at 03:30 AM CET #
Tomas,
this is THE feature we needed for the way we develop. Thank you so much!
Just a single problem we have: when updating from SVN we have to upload all the stuff manually. Could you think of a way to keep track of the files which were changed and not yet uploaded? E.g. keeping hashes of all uploaded files so you can see which files are already up-to-date on the server?
Kind regards
Andi
Posted by Andi on November 26, 2009 at 02:50 PM CET #
I have tested the Create project from remote files in 6.8 .But it is downloading all the files to my local machine. It is good if there is any plugin like Aptana , which has got a property that allows editing the files without downloading. Same facility is avalabe in Quanta also. So I wonder why the Netbeans haven't got such a functionality ..If anyone know any plugins please share
Posted by Alwin on January 16, 2010 at 02:30 PM CET #
Wooohooo!!
I tried so many PHP IDEs - now i found the features i really needed.
- upload on saving AND
- local file history
Love!!!
Greez,
c509
Posted by c509 on January 18, 2010 at 10:38 PM CET #
maybe I am doing something wrong, but when using IDE 6.5 I could manually select a file, right click it and upload to remote server. Now on IDE 6.8 the option to upload/download is not showing on my right click.
The settings for upload on SAVE, RUN, MANUAL are ok, but when I get the latest updates from the SVN and want to upload them, it is not a SAVE. the RUN tries to upload everything, not just latest SVN updates and manual I cant find.
any help? thanks
Posted by shibuya246 on January 28, 2010 at 02:37 AM CET #
Wooohooo!!
I tried so many PHP IDEs - now i found the features i really needed.
- upload on saving AND
- local file history
Posted by ED Hardy Suit on February 07, 2010 at 08:26 AM CET #