Subversion + Basecamp



I am currently using Basecamp for project management and Subversion (deployed on my Dreamhost account) for code management.

What I would like is for a message to be automatically posted to my Basecamp project every time I commit code to the associated subversion project. Luckily, someone did exactly that with a set of custom php scripts:

I have uploaded these scripts to my /hooks/ directory in my subversion project (project name=TSI) and changed the post-commit file (removed the .tmpl extension in the default one provided as I was supposed to do) to read:


/bin/php /svn/TSI/hooks/notify.php $REPOS $REV

Problem is, when I commit, I get the following error:

“post-commit hook failed (exit code 255) with no output.”

I think I am not calling the notify.pho file correctly in my post-commit file as I am unsure of the appropriate file path and even more unsure of how I can execute a php file.

If anyone has done this or knows what is wrong here, I would appreciate the help!


(for the following, I’m assuming you have a share-hosting account)

You don’t mention making the the post-commit file executable after removing the .tmpl extension – that could be the cause of the immediate error.

Probably the “/bin/php” will cause an error, since on DH the php binary is under /usr/local/. The default php binary is PHP4, but I’m guessing you’ll need PHP5, so use: /usr/local/php5/bin/php

The path to notify.php would probably be something like:


However, the WhompBox post suggests using $REPOS to locate notify.php, so the following php call should work:

/usr/local/php5/bin/php $REPOS/hooks/notify.php $REPOS $REV

I hope that helps; let us know if you succeed.