Continuous Integration with phpUnderControl and Git

Continuous Integration with phpUnderControl and Git

I was searching for a decent continuous integration solution for my PHP projects for some time now, but always had the problem that most of the described solutions used SVN instead of Git as VCS system. Yesterday I found an article which describes the setup exactly as I needed it: phpUnderControl with Git on a Debian/Ubuntu system. Using the article, I managed to set up a working system quickly, which basically works as expected: CruiseControl checks the repository for modifications and starts the build process if there are any new commits. The build process includes generating API documentation (phpdocumentor), running static code analysis (php-codesniffer) and executing unit tests (phpunit). If the build succeeds, the results are published and can be accessed through a nice webinterface powered by phpUnderControl (see screenshot above which I stole from the phpUnderControl site).

However, the described setup has a few issues which bugged me:

  1. CruiseControl runs from the shellscript as root, posts all output to the console and is not automatically started at boot time.
  2. CruiseControl runs on port 8080, but I wanted to manage access to the webinterface through the apache which is already running on the box
  3. There’s no authentication – everybody can access my CI server, see the build details and start new builds through the webinterface.

(more…)

Authenticate Apache against Redmine with AuthMySQL

For a student project we needed to authenticate an apache host against a MySQL database, in this a case we wanted to handle authentication for a Subversion repository with a Redmine database. I know that Redmine has its own solution for this problem using Redmine.pm, but for some reason that approach didn’t work and we didn’t have the time to bug around with it. This howto is written for the use with Redmine (especially the database view), but you should get the point how to set it up on other environments. The howto was done on an Ubuntu 8.10 box but should work on any other distro as well (except for the module installation). I assume that you got all the other stuff (apache, mysql, …) up and running.

(more…)

Quick and dirty: set up a local PHP and Ruby development environment on Ubuntu Hardy Heron (8.04)

This is a quick and dirty tutorial how to set up a local development stack on a fresh Ubuntu Hardy Heron (8.04) install.

Here is what we will install:

  • Apache 2.2
  • PHP 5 as apache module
  • Ruby 1.8 as apache module & Rails 2.0.2
  • MySQL 5
  • phpMyAdmin

(more…)

Set up multiple virtual hosts on XAMPP for windows

As I work on many projects and experiments on my local windows development environment (XAMPP), I normally put all web stuff in the htdocs directory and usually I’m happy with it. For several projects (like CMS installations or experiments with frameworks) it’s very handy to have a separated virtual host in order to be able to have an own document root for that application. You just don’t have to bug with different paths and subdirectories and can focus on developing instead of setting base URLs etc.

For example, if I develop MVC applications which are meant to run in a host’s document root, I want to work with paths like http://<host>/<controller>/<action> without having to deal with subdirectories like http://<host>/directory/subdirectory/public/<controller>/<action>.
It just facilitates developing and even tough it’s a little more work at setting up a new project, usually it’s worth it. Here’s a quick and dirty how to achieve this in two steps.

(more…)

Wieder zum Indianer zurück

Im Laufe einer Servererweiterung bin ich von Lighttpd wieder auf Apache zurück. Nicht dass ich mit Lighty nicht zufrieden gewesen wäre (v.A. in Bezug auf Geschwindigkeit, Speicherauslastung und einfacher Konfiguration), aber der Apache kann einfach mehr, speziell wenn es um DAV und SVN geht. Hab jetzt Apache mit PHP über mod-fcgid laufen und dazu endlich meines eigenes SVN-Repository + Trac :-)