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

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.

Related

How can edit deployed laravel project

I have website that create from laravel. I want to do some customization to that. Project files does not have in my local machine. I have files that deployed to my hosting. I need to help for edit it. How can i do it
Simply download your files from remote host, edit anything you want and re-upload them.
It's good to remember that you don't need to download the vendor folder,
since you can use composer install when you have the files in your local machine.
After finishing the update, upload the files back to the server, and, if you have ssh access, run composer update, to update your dependencies. If you can't use ssh, just overwrite the vendor folder on remote host.
Hope it helps.
I will assume that you are using a IaaS
First:
You can do it by accessing via ssh with PuTTY, if you're completely sure what to change. Anyways it is the easy way but not the best one.
Second: (What I suggest)
You can use a version-control system, via Github. You can use to upload your local changes and pull them in your deployed server.
Third
You can use filezilla to tranfer your files to the server fia FTP.

using netbeans 7.2.1 doing a diff between local and remote

I have a netbeans php project that is local on my PC. I have it setup to save on the remote server "on save". This all works well. I now have a second developer in the mix who is doing the same thing to the same server .
Is there a tool/plugin or even standalone tool that that can do a recusive diff or project diff between my PC and the remote server?
Thanks
The "Copy files from Source Folder to another location"-feature is not meant to be used for more than one developer. It's good to use that feature for a local preview, for example when copying the files from the source folder (on save) to the webroot on the same PC or a local test server. By no means should the same preview folder be used by different developers. You still could use an external tool to have a diff done, but be aware that any files in the test folder are overwritten by Netbeans and it's pretty hard to find out which file was edited last by which developer.
Use a versioning system if you need to work on the same code by more than one developer.

Update cvs and files with eclipse

In the past, with Eclipse and a PHP Server/system, I had it setup so that when I commited changes to the CVS repository, it also saved the actual php files on the server. I had this functionality on a another computer in the past (I can't check this computer). The files for the repository seemed to have been saved in a different folder. So the cvs is in a folder stucture like var/cvs and my system files/PHP files facing clients are in something like var/www/html/. How would one go about setting something like this up? I use sftp to change files right now with Filezilla. It was very convenient before being able to commit the changes and check the web to make sure that changes worked. Right now I have to commit the changes then save the file with ftp to see the changes. Would love to be able to get rid of the sftp with Filezilla step if at all possible...
It sounds to me that you are testing your latest changes on the live website, which is bad idea, because if you inadvertently edit some error in the files, your website may expose that to the public.
My current work-flow is as follows:
I use Netbeans on a local project, which is the SVN checkout too. On most projects I use the Netbeans option "Copy files from source folder to another location" to copy the edited files "on save" to the local test webserver directory. If the changes work on the local webserver, I'll commit them to the SVN repository and login to the live-webserver via SSH and checkout the latest revision from the SVN.
So in fact I have four copies of each file:
The working copy (a Netbeans project and SVN checkout)
/home/feeela/projects/xyz/ (editing here only)
The test-server copy; Netbeans stores a copy there on each save;
/var/www/vhosts/xyz/ (127.0.0.1/xyz/)
The SVN repository; I'll manually commit files to it after testing on the local webserver;
/var/svn/xyz/ (svn commit -m "my last change")
The SVN checkout on the live-server, which is the actual website;
/var/www/vhosts/xyz/ (svn update # xyz.com/)
I don't have a clue, how setup the "local copy" feature (which can also refer to some other machine) with Eclipse. If someone knows a way to reproduce the above workflow using Eclipse and not need to manually sync the files to the test-server, I#ll be glad to read it hereā€¦
You could use a post-commit hook script on the CVS server to update (refresh) a working copy on var/www/html/. Every time you commit, the hook script would thus get the latest version of the files on the server and put them in var/www/html/.

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.

Categories