14

I'm a real klutz when it comes to Eclipse, but I'm also poor, which is why it is the option I've chosen.

I've installed Eclipse 3.5, Eclipse for PHP, and RSE. I've actually gotten to a point where I can create a new (local) project and download all files to my local (Windows) computer. I'm not running any kind of web server on my local box, and am hoping to keep it that way for now.

I've imported my remote folder into my local project, where I can see all my PHP files and edit them. But of course, when I save, it just saves the local copy. Is there no "put" command? Can I not save straight to the server? Or perform an immediate sync of that one file? I certainly wouldn't want to have to perform a complex sync operation after every little incremental change.

I have no idea what RSE really is, nor how it works, and the documentation is, well, cloaked at best, non-existent at worst. Does anyone have some tips for me? What should my workflow be (barring any local server to test)?

Ideally, I would love to be able to open up the entire "project" directly from its location on the remote server and avoid dealing with a "local" copy altogether. Failing that, I would be willing to "get" the entire remote site once, and then manually "put" individual files that I change locally back, provided it's not a cumbersome process. Am I asking too much? Dreamweaver operates this way, but it's support for PHP is limited at best and can't be considered a full-fledged IDE...

Tom Auger
  • 19,421
  • 22
  • 81
  • 104
  • So I've had a little bit of luck by opening up the Remote Systems Explorer perspective, going through the jiggery-pokery of setting up a connection to my local site via FTP and then choosing the extremely handy "Create Remote Project" command via right-click on the folder I wish to make as the "root" of my project. Then switching perspectives back to PHP, lo and behold, that remote project is now available from the PHP Explorer view. Unfortunately I don't get the nice IDE features like Syntax error checking or code completion... what's the solution? – Tom Auger Jun 10 '11 at 20:56
  • 2
    Here is great tutorial for Eclipse: [How to setup Eclipse with PHP PDT, Remote System Explorer, Theme Manager, and Drupal Plugins](http://www.patrickjwaters.com/blog/2011-07-24/how-setup-eclipse-php-pdt-remote-system-explorer-theme-manager-and-drupal-plugins/35) Eclipse + PDT + Remote System Explorer allows you to develop PHP applications remotely. – Łukasz Ciećwierz Dec 23 '12 at 17:37
  • Thanks Lukasz. That's a great resource. – Tom Auger Jan 03 '13 at 15:40
  • Your language ("jiggery-pokery") is as straightforward as Eclipse is unnecessarily complex. I've never seen an editor/IDE rely on so many levels of analysis and configuration hoops as Eclipse in order to associate a project with a remote server. I guess many of us ultimately came from a Dreamweaver environment, and SublimeText and NetBeans along the way, which rely on plugins, but even they are pretty straightforward "host, username, password" setups. – TARKUS Aug 11 '15 at 17:17

5 Answers5

23

I use WinSCP and enable remote synchronization.
Everything that changes on the local system is automatically synchronized trough SCP/FTP onto the server.

enter image description here

powtac
  • 40,542
  • 28
  • 115
  • 170
  • 6
    That's actually a damn fine idea. I've used that in the past for simple PSPad projects that depend on SSH. This may do it as a fallback. I sure would love to know the "native" way of doing it in Eclipse, but MAN that environment is convoluted... – Tom Auger Jun 10 '11 at 21:20
  • 1
    I don't know of a native way in Eclipse but Netbeans has one! – powtac Jun 10 '11 at 21:24
  • I'm having a hell of a time with WinSCP. I get errors on the initial synch operation - can't change timestamp. There seems to be no way to avoid this. I've logged a bug with the developer, unless someone else knows a workaround. – Tom Auger Jun 16 '11 at 18:34
  • @TomAuger if you having time sync problems, make sure the time on your local machine and on the server is up to date! Even a tiny difference can make some trouble... – powtac Aug 22 '12 at 12:44
  • good point. i'll definitely check! Though now that I have moved to an SVN + NetBeans setup, this has no longer been so much of an issue for me. – Tom Auger Aug 22 '12 at 17:41
  • 2
    For Windows boxen running Eclipse, this works far better than Eclipse's overblown RSE support. – johnwbyrd Dec 11 '12 at 02:43
  • This is not a great solution, Win SCP does not launch sync at start (maybe we could) and the program does not keep the connexion stable, if you delete a local file, it mays interrupt the sync process... Maybe I could configure it to do it better but this is not obvious. – Loenix Jul 03 '16 at 07:49
  • I made more tests with WinSCP, it warns me about 2000+ folders :D But unable to delete a folder in root one, when deleting a file in a subfolder and restoring it, it is going crazy. This soft is really not done for multiple project usage. – Loenix Jul 03 '16 at 10:42
3

Sorry to drag up an old topic but Remote System Explorer is exactly what you need. No need for sFTP or a Shell. Setup the connection in the RSE perspective just like you normally would using your sFTP/SSH client.

Open the folder for the first time and you get the login dialog. Enter your credentials. Store them as needed.

Now navigate to your development files and double click or right click to open the file. Eclipse caches a local copy till you save, Ctrl-S.

Need to do some shell work. Right click on a folder and Launch a Terminal. If your files are source controlled, such as svn, you can checkout or update from the terminal.

I use to have Putty, FileZilla and a host of other editors and utilities. Now I never leave Eclipse. SQL, Shell, sFTP, PHP, CSS/HTML, C/C++, Droid, all within Eclipse.

Mike Mackintosh
  • 13,917
  • 6
  • 60
  • 87
jwwicks
  • 79
  • 6
  • Hey thanks for the follow-up. You know, I did use the RSE perspective as my original post states, but for some reason it didn't work for me. I think it had to do with synchronization. That was a while ago and since then I've completely jumped ship and stick with NetBeans. At the time of the original post there were a few problems with NetBeans in FTP mode, but now it works like a charm and is extremely streamlined for PHP development. – Tom Auger Jun 06 '12 at 13:00
  • says it does, but it doesn't create new files and opens .php by default with text editor – max4ever Sep 12 '12 at 08:36
3

Looks like RSE might be overkill for your needs. Here's a similar question and popular answer to your problem of uploading from Eclipse:

How do I add FTP support to Eclipse?

Secondly, you could try out a version control system like SVN - it would take a little bit of time and work to set it up but probably be far more useful than getting RSE going and then you could develop locally, commit your changes to the server and then update the workspace on the server.

Thirdly, there are other IDEs out there, like Netbeans, with built in support for working on remote files.

Community
  • 1
  • 1
baraboom
  • 1,398
  • 9
  • 9
  • Awesome, thanks for the quick response. I'll look into that other question. As I mentioned above, I don't have the cycles to install CVS or SVN and get that working right now (though maybe I just should). Finally I've looked at other free IDEs, but perhaps I should scrutinize NetBeans again. Thanks! – Tom Auger Jun 10 '11 at 20:49
  • Yea I was still writing the answer and did not see your comment about SVN - it would use a few cycles ;) However, looks like Aptana will do what you want. – baraboom Jun 10 '11 at 20:52
  • I dunno. I followed your link and the highest rated answer was a warning against using Aptana. Now I'm just spooked! – Tom Auger Jun 10 '11 at 21:21
  • Netbeans seems awesome, but I'm constantly getting transfer errors when saving files (even though the remote file save actually works). The error is "Cannot log out from server 192.168.2.22" and it causes a dialog on every single save and asks to disable remote save (which would defeat the whole purpose). This appears to be a rather common feature and there is no workaround that I've been able to find, even with Passive mode turned on... – Tom Auger Jun 10 '11 at 23:06
  • NetBeans does a very ppor job of remote file synchronization, as my recent experience has shown, and a slew of forum and support posts and issue tickets support. The author has been quotes as saying 'Sorry, our resources are limited and this is likely more than we are going to support (at least for now), we want to focus on the IDE (PHP project & PHP editor). I have to repeat myself, the only _reliable_ way to work in teams is SCM.' So this is not a reliable answer to my question as of NetBeans 7.0 – Tom Auger Jun 16 '11 at 18:33
  • I've only been using netbeans for a couple of months but for my smaller projects (hundred files or so), it seems to handle it fine for my workgroup of one... I have the project saved locally and upload on save. I'm glad winscp worked out for you, might try that myself in the future. – baraboom Jun 17 '11 at 18:15
  • As of now, NetBeans 7.1.2 does a fantastic job and has addressed all of the FTP issues it was having in earlier versions. – Tom Auger Jun 06 '12 at 13:00
0

I think @Łukasz's note deserves to be an answer on this page - it would have saved me a great deal of time, so hopefully it will do the same for others:

Here is great tutorial for Eclipse: How to setup Eclipse with PHP PDT, Remote System Explorer, Theme Manager, and Drupal Plugins Eclipse + PDT + Remote System Explorer allows you to develop PHP applications remotely.

I will add that downloading and using the smaller Eclipse for PHP Developers and thus skipping step 2 on the blog works just fine.

Darvanen
  • 626
  • 1
  • 9
  • 19
0

I tackled the same problem recently. I got a web site hosting company and was using SeaMonkey and developing the code on the 'production server' and learned to do development on a 'development server' and then upload the debugged, working stuff to the production server.

So I use Xampp (it's a good, and FREE, local web server you can easily install on your laptop) and I use NetBeans to develop. Netbeans is better than Microsoft tools -- no ballmer involved in the deal.

xampp uses Apache as the (local) web server and provides Mysql and PHP server-side-scripting support.

The quality of these two is HIGH. Just excellent stuff. You will want to get a local web server running on your laptop, do your development locally, then upload using ftp or the Netbeans environment, the files to your 'production web server.'

I messed around with a lot of different unrelated pieces trying to put a local web server, debugger, mysql database together and then got really lucky and found xampp and then NetBeans.

wantTheBest
  • 1,682
  • 4
  • 43
  • 69
  • Hey thanks for the quick response, and I'm sure that having a localhost web box is the most efficient way to go. There are reasons right now (working in a team environment and don't have the cycles to set up CVS) why I need to work more-or-less directly on the remote server, so unfortunately your solution won't work for me at this time. – Tom Auger Jun 10 '11 at 20:45