Eclipse Indigo RSE/TM and remote sync - php

I look around on StackOverflow and found similar but not this question exactly, so I come here for help.
I'm working on a PHP Project using Eclipse Indigo (3.7.1) + PDT 3.0.0 . In my case, my development is done locally, but testing the page is done on a remote server, authentication done by an SSH2 key. As of now I run, parallel to Eclipse, WinSCP with the Keep Remote Directory Up-to-date enable, so everytime I save a file on Eclipse, it uploads to the server. I wanted to do that inside Eclipse.
I installed the RSE/TM package and manage to use the view to browse the files on the remote server, but I didn't find anywhere on how to sync with the remote server automatically. Ideally I would be able to let the project sync everytime I save the file.
Can you guys help?

In Remote System Explorer perspective, find the folder on the remote machine you'd like to sync to. Right click on it -> Export from project

Related

How to work with ssh in PhpStorm?

I have the project in the remote server and i have only ssh access. How i can work with this project? I am looking for information for either PhpStorm or NetBeans.
You have several options, depending on your system.
You can rsync or scp up your files when you want to publish.
You can use version control (cvs, svn, git, mercurial, ...) and via ssh perform an "update" when you wish your code to go live.
You can set up a sshfs filesystem locally.
I don't know about NetBeans, but PhpStorm has a feature that allows uploading files as soon as they change to a server (via FTP or SSH).
I don't have a lot of experience with this feature but it does seem to work well. PhpStorm can also be configured to deploy changes that occurred outside (it seems to do so as soon as it regains focus). It also seems to properly delete files that have been deleted from the project, so it's a real sync, not just "upload".
See how to configure it under "To have PhpStorm upload changed files automatically" here: http://www.jetbrains.com/phpstorm/webhelp/uploading-and-downloading-files.html

Netbeans for remote system development - PHP

I have been using Eclipse for Remote System Development and after hearing a lot of good things about Netbeans for PHP development, I wanted to give it a shot.
I ran into couple of issues even before starting:
1. Downloading complete remote directory to my local machine:
I work on multiple projects located on a development server and the code base is pretty huge. While setting up new PHP remote project using sftp to access my remote directories, Netbeans started downloading all the files from the remote location I specified. This is a bit annoying as it is taking really long to download all the files (includes large videos which are part of the projects).
Eclipse remote system development (and most other editors like EditPlus), on the other hand, simply shows me the remote file structure and only downloads a file to local temp dir when I open it.
Is this behavior standard in Netbeans?
2. Will external file modifications cause sync issues?
I usually update my svn by connecting to the dev server using putty. Since Netbeans is trying to maintain a copy of it's own on my local computer, will updating the source files externally outside netbeans create sync issues?
3. Can I manage remote svn repos from within Netbeans?
Since I already checked-out my svn projects on the dev server, can I use svn from within netbeans to commit or update?
Yes, it is standard. Netbeans downloads the remote application so that it can scan the local copies to enable code-completion.
It shouldn't. By default, Netbeans is almost immediately aware of any changes you make to project files outside of Netbeans.
Yes.

Zend Studio: How to copy files to local server automatically when testing?

I just installed Zend Studio and it seems pretty great. But I would like to be able to copy my files from my dev folder to my local server's htdocs folder whenever I debug or run the solution.
I am already able to copy files to my remote server automatically on every save. I would imagine I should be able to do this automatically too for my local server?
Please let me know if this is possible.
Thanks.
I highly recommend you don't try to save copies to multiple locations. Check out the Subclipse plugin and use SVN to deploy a copy of your code to your dev server instead of copying it in between servers.

Using Netbeans for PHP, any remote system explorer?

Alright so I currently develop on a remote server and use putty for an SSH connection to deal with SVN. I develop with Eclipse PDT only due to the fact that it has the remote system explorer, so I don't have to actually have the files on my local machine to edit them, which is great.
Netbeans is my IDE of choice, and I've been googling for a while trying to figure out how I can possibly make this work with a netbeans project. I can't seem to find any plugins/any statement discussing the possibility of a future plugin/implementation to incorporate this.
Has anyone successfully accomplished this? Are there perhaps any standalone clients I can use to achieve this?
Thanks guys.
you don't need plugins with Netbeans for Svn (Git requires a plugin), you just have to click on "Team" -> "Subversion" on the Menu bar on top.
In "Window" -> "Services" you can browse some stuff like databases or team server too.
There is always the option to set up netbeans to browse a remote folder via ftp ( http://blogs.oracle.com/netbeansphp/entry/ftp_support_added )
You could also use sshfs to create a local mount of the remote folders/files.
I do agree that you should probably be using svn/git/whatever to develop locally and then push to the live site when ready instead.
Note: Netbeans does svn/cvs built in, but git requires the third party nbgit plugin which is still in it's infancy.

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

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 ?
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.
Looks like NetBeans added it a few minor versions ago: http://blogs.oracle.com/netbeansphp/entry/sftp_support_added.
Just confirmed that this support is in the 6.8 version I have running.
The intelisense will work the same as long as you have all of the completable objects within your project scope, it won't pull libraries still on the server. Download a local copy of any 3rd party libraries your project may need and add them to your project's include path to get full code completion.

Categories