Archive

Posts Tagged ‘SSH’

Checkout SVN with PHP

October 4th, 2008 Jigish Thakar No comments


Subversion (SVN) is a version control system that allows multiple developers to work on code simultaneously without coming into conflict (further information on SVN can be found on Wikipedia). Here at Brightlemon we find ourselves working on ever more complex sites and SVN has become a very useful tool that, if required, allows all staff to work on a site at any one time. We use a windows SVN client called Tortoise SVN so that we can work remotely on code and then commit to a central SVN repository.

When it comes to updating a site by checking out the code from a repository we usually run commands via an SSH shell connection, however we have found recently that when we are working with external companies (and even for new staff) then it useful to have an additional method for checking out the code that does not require SSH access to a server. We have achieved this by creating a PHP script that executes SVN commands in the following way. In order to use a PHP script that can run SVN commands you must ensure that your apache user (normally called ‘www-data’) has sufficient permissions to:

  1. create and edit folders
  2. run SVN commands

Read more…