Archive for the ‘PHP and web development’ Category

PHP 5.2.x on Fedora 13

Tuesday, June 22nd, 2010

Not all of us are using PHP apps that are ready for PHP 5.3, so we need to rebuild PHP 5.2.x for some newer OS’s. Unfortunately, trying to rebuild the PHP 5.2.13 SRPM for Fedora 11 (the last Fedora to use PHP 5.2.x), on Fedora 13 doesn’t work as-is. The “configure” file ends up broken, and running it produces an endless stream of errors, starting with:

cat: confdefs.h: No such file or directory
./configure: line 387: ac_fn_c_try_run: command not found

It took me a while of looking around, but the solution was found on the Ubuntu bug tracker, specifically in the comment #17 by Arkadiusz Miƛkiewicz, which pointed to a PLD patch for the same issue. Patching the Fedora 11 SRPM with that patch (needs some fuzz) makes it build properly.

Peg revisions in SVN

Monday, April 26th, 2010

One feature missing from early (and even relatively recent; less than v1.5) versions of Subversion is the ability to specify universally the exact revision of a file/directory within a repository across all commands/features (such as “svn switch” and externals). The difference between:

  • “file X/Y/Z which existed at revision 99”, and
  • “the file which exists if you backtrack from HEAD to revision 99 on path X/Y/Z”

is subtle but continues to catch many people out, especially those of us who use older (< 1.5) versions of SVN for one reason or another, typically because RHEL/CentOS 5 include SVN 1.4. I won’t attempt to rewrite the excellent chapter about peg and operative revisions in the online Version Control with Subversion book, but it’s worth remarking on nonetheless. It’s caused myself and my colleagues no end of headaches when trying to do predictable deployments using a specified SVN URL. Essentially, it means these two things are not necessarily equivalent:

svn sw svn+ssh://user@myrepo/X/Y/Z@99 myworkingcopy


svn sw -r 99 svn+ssh://user@myrepo/X/Y/Z myworkingcopy

If, between revision 99 and HEAD, you’ve renamed some directories within the path X/Y/Z, then backtracking the history of the current X/Y/Z (as of HEAD; this is the operative revision) doesn’t necessarily lead you back to X/Y/Z as it was at revision 99 (the peg revision). This is quite common when rearranging SVN repositories.