Development environment - php

I got kind of a problem, I can't figure out.
I got a local development server set up in my office and an other online dedicated server, to test my web-apps on.
That's all fine as long as I work in my office and use the LAN/WLAN.
But sometimes I'd like to do some quick code changes at home. There's where my problem starts. I tried several possibilities. FTP, VPN, WebDAV, ...
It does work, but the speed is incredibly slow. I need 5 min to chance one or two lines of code.
How's your development environment set up and what option should I use to make the "connection" become faster?
Thank's in advance

Typically extreme slow downs like this are due to the IDE you are using. It wants to read and parse everything in the "project" for you, and it is doing that over a slow connection (ftp, sftp, ssh, etc.).
If you are using dreamweaver, check out this KB Article and this Google Search.
Ultimately, you are going to have some performance hit, but you should be able to configure your IDE to minimize that. You can also always drop back to using something like FileZilla or WinSCP plus your favorite editor ... perhaps Sublime Text with Remote Access.

Trying to do dev over remote file system access is painfully slow. A few options:
Use Remote Desktop (RDP) to connect into your machine and do local dev.
You can always go the skydrive / google drive / dropbox route that syncs your dev files to your home computer so you can have local copies on both.
Don't discount source control (though with that you can only make updates to what was checked in, so if you left the office without a checkin, you won't be able to do anything about it from home).

Related

My company is a Rackspace Cloud client (provided to us for free) and I'm trying to find some way to set up version control

As the title says, my (small) business is provided a free Rackspace Cloud client account. We receive a decent amount of traffic but I haven't been able to put together a business case to move to our own server yet. However, we are developing some complex apps and I'm frustrated with not having the ability to even ssh into the remote server. Ultimately, I'd like to set up some sort of version control (at this point, I'll take anything, git or otherwise).
I have control over databases, can FTP, set up cron jobs, and perform a few other basic functions. I can't think of any way to set up git or something similar without ssh access. A thought went through my mind that maybe some sort of PHP version control exists that I might be able to set up, but I haven't had any luck finding it yet.
Do you guys have any ideas, thoughts, or advice?
There is no complete php git client out there. But you can just use ftp for deployment. Have a look at git ftp: https://github.com/resmo/git-ftp
There's no need for your git repos (or whatever you want to use) to be on your Rackspace server. You can use one of the various hosting services such as GitHub or BitBucket, or you could just stick a cheap computer in the corner of your office and use that.

File Sync with FTP Server

I have a Website with an FTP Server in BigRock.com. What my issue is, whenever there is a deployment, i will have to manually search and find all the files that need to be changed. Now the project is getting larger and larger and making these kind of changes is taking a lot of my valuable time.
So is there any Software/Tools available for Syncing with the FTP Server and changing files based on changes made locally? I am not sure about FileZilla Client since i couldn't find much options in it. I am pretty sure that there would be some solution for this. My project is done in Zend Framework with Doctrine ORM and Many other Libraries.
If you need a one-way synchronization from local files to server, you can check this free tool: http://sourceforge.net/p/phpfilesync/wiki/Home/
It could not be much easier to install or use.
try Allway Sync
It uses innovative synchronization algorithms to synchronize your data between desktop PCs, laptops, USB drives, remote FTP/SFTP servers, different online data storages and more. Encrypted archives are supported. Allway Sync combines bulletproof reliability with extremely easy-to-use interface.
url http://allwaysync.com/
I tried personally is working fine for ftp and local file sync. and also it is free..
Working with Assembla, i found the FTP Tool in it.
Here is the reference link,
http://blog.assembla.com/assemblablog/tabid/12618/bid/78103/Deploying-a-Web-site-is-easy-with-Assembla-s-FTP-tool-Video.aspx
Its Easy to Work Out,
Add the FTP tool using the Tools section of your Admin tab.
Deploy code to any server with ftp or sftp installed.
Set the deploy frequency to manual (you push a button) or schedule automatic deployments for every commit, hourly, daily, or weekly.
Only changed files are deployed for fast and accurate deployments.
Easily roll back and deploy prior revisions.
Add multiple servers for staging and production releases or simply to deploy different repository directories to different locations.

Team Environment Setup and Remote Working

We are working on a project which is getting bigger and bigger.
Till now our work looked like this:
I have a web server, I'm coding with VIM directly over SSH
Another programmer send me new files I add them and integrate them (he have a copy of project and local server)
Designer sends me design I also integrate it.
It is pretty much waste of time, because every time they made change I have to integrate it.
Now we have a hosting which doesn't support SSH (I cannot use vim now). How should we work on a project like this? How should I set up my VIM to work on remote project (I don't want to download and upload every time I want to change file)?
You didn't mention your OS. That would be certainly hepful if you want a precise answer.
The first thing would be to find a better host. You can rent very decent dedicated servers for as low as 40 or 50 € or less. If your project is big and serious, 50 €/month or 100 €, or 200 € is perfectly acceptable and you can install/enable whatever you need. Depending on the size of your project, a VPS could be enough. Whatever the price, a web host without SSH access is worse than shit.
But you may not have any power on that area.
Since your server doesn't support SSH, a proper VCS is not an option. The only practical solutions I see are rather "old-school" but they work:
Solution A:
Download the whole site on your local machine with an FTP client.
Edit locally.
Test your changes with a local web server.
Upload the changed files when your tests are OK.
Solution B:
Connect to your server with an FTP client.
Use its "Edit Locally" feature to open the files in Vim.
Write your changes, the file is automatically updated on the server.
Solution C:
Use Vim's bundled netrw plugin: :e ftp://host/path/to/file. See :h netrw.
Note that the process will always be download -> edit -> save -> upload, whether you notice it or not. Depending on the solution you choose, the process can be horribly repetitive and inneficient or almost completely invisible.
But, seriously, get another server and use a VCS and a local server.
I recommend using version management software like git with SSH hooks that automatically upload changes to your server.
You can use a version manager, like git and make a git pull in the web server every time you have a stable version.
You collaborator can push the new content and you dont need manage the file youtself.

What is the simplest way to work on a project from different computers?

I have two computers that I use for development, one at home and one at the office. I use Aptana Studio 3 on both machines and would like to be able to easily work on a single project from both computers.
What are some easy ways to transport the project between computers. Right now I am just using a USB drive to transfer the files between computers.
Also, I'm using a local apache server on one computer, and a local IIS server on the other.
I think you should use something like SVN, GIT, Mercurial and so on. I suggest you this software to manage your project:
Tortoise
You might try connecting remotely (via Remote Desktop Connection for example) from home to the office computer and in this way you will only work on the office one and there will be no need for file transfer.
Alternatively, you can setup a source control server (by using SVN for example) and commit your projects to it. This way, you will be able to work on them from multiple locations.
if you have the opportunity to use a (virtual) server, and remote desktop from both computers, you won't come back to another solution. Overall with a server-side language like php, it's ideal, as you have your repository on your test web server (lamp/wamp) directly. That ensure ONE version for all your tools, easy and faster backups, synch, etc.
If I had no access to a virtual remote server, I would use github as an alternative, for the sake of code base security, and decent synch times. But I'm no expert on github.
Staging Environment
The best situation in your case will be to have a separate staging machine which is accessible to all three development machines. This can be another machine you control, one of the development boxes available to all of the others, or an external host - you can get a dedicated virtual machine from cloud providers for as little at $10/month, or if your project is simple enough use a plain web host even more cost-effectively.
Source Code Manager
A source code manager is a good start - SVN is common and free. Git is another and can even be set up to do remote deployments. These tools will give you two benefits:
Shared code between all environments, always up to date
Protection against data loss and error - if something major breaks revert to a working copy
File Synchronization
Finally, a tool like Dropbox can synchronize your files across all three systems as you make changes. Again, this one is free and can be installed on most operating systems.

Is there any possible cacth a web screenshot in virtual server hosting with PHP?

I want catch web screenshots with PHP. Because I also need some process with PHP, I do not want use any on-line screenshot service. I am willing to renting a free hosting or a virtual server hosting which cost less than 20 dollars per year.
As I know, virtual server can not upload exe files (like url2bmp.exe, webshot.exe, webscreencapture.exe, etc). And they all use linux system (it can not use new COM("InternetExplorer.Application")).
So, is there any possible cacth a web screenshot in virtual server with PHP? Thanks.
as a possible alternative, you can check out this project: http://code.google.com/p/wkhtmltopdf/
You can do this with Linux, it is seriously tricky though. You need FireFox, imagmagik and VNC installed.
Basically you get Firefox to open a new window in a VNC display, grab the screenshot of that display with imagmagik and then save it as a thumbnail. The hard part about this is getting the VNC portion to work, especially with a headless setup. But it is completely do-able.
However, it will probably be a ton easier just getting a Windows VPS.
Doing a search, found this which might work:
Taking website screenshot, server-side, on a Linux rented server, free
Ah and here is the post about what I described above:
Command line program to create website screenshots (on Linux)
You can take automated screenshots of websites using an open-source tool like pageres. It can also simulate various resolutions, testing responsive layouts.
I'm not sure whether it's relevant that your website is coded in PHP, or that you're mentioning .exe files. Are you new to web development?

Categories