Archive for January, 2008

Run svnserve, run!

Saturday, January 5th, 2008

More notes to self.

Fancy shmancy init scripts aside, this is the fastest way to get a Subversion server up and running:

/usr/bin/svnserve --daemon --root /var/svn

root is the directory housing one’s repositories; looks something like this:

/var/svn/
conf/
project1/
project2/
repos/

Make sure the svn port 3690 is open.

Redhat pfqueue Revisited

Saturday, January 5th, 2008

Finally got around to figuring out how to make pfqueue to run on Redhat. Though I never did get it to install and run from source, today I stumbled upon a copy in Dag Wieers repository. Simply install Dag’s build and, if you are using Postfix, make sure that the Posftix commands are in your path (I had to add /usr/sbin/to mine.)

Thank you Dag.

Running Windows commands from PHP over IIS

Friday, January 4th, 2008

In order to run Windows commands via PHP functions such as open_proc(), apparently one has to grant read/execute permissions to the account under which IIS is running (usually IUSR_<servername>) on C:\WINDOWS\System32\cmd.exe. Be sure to do this for web apps that rely on external commands.

This of course took me an eternity to figure out. I was only able to piece together WebSVN‘s bizarre Windows mis-behavior after scouring through the remnants of forum posts limboed in Google cache. PHP.net of course has no proper details on this, though I do now better understand what proc_open‘s obscure and undocumented bypass_shell parameter might be about.

Ah yes, PHP on Windows. Obscure and irritating.

Kind of like me. Not that that makes it any better.

The MySQL extension (php_mysql.dll) won’t load after upgrading PHP

Friday, January 4th, 2008

Ugh. As usual, more weird problems while trying to upgrade PHP on a Windows box. Are we having fun yet?

If you find that the MySQL extension won’t load, then probably a previous PHP installer has placed a version of libmysql.dll somewhere else in your path. Look in c:\WINDOWS\system32\

The problem is almost certainly the reason for the following obscure comment

Although copying libmysql.dll to the Windows system directory also works (because the system directory is by default in the system’s PATH), it’s not recommended.

in the PHP MySQL documentation.

Make sure your home PHP directory is in your path, and that its finding libmysql.dll there and only there.

“This page cannot be found” (404) error when upgrading ISAPI PHP on Windows

Friday, January 4th, 2008

iis mappings for php This page cannot be found (404) error when upgrading ISAPI PHP on Windows

If you are using Zend’s installer to upgrade PHP on Windows, the installer will probably break your file type mappings. Double check to make sure that .php points to the correct ISAPI dll in IIS.

(IIS -> Home Directory -> Configuration… -> Mappings)