I have a few ongoing projects that I wanted to use Trac for, but I only had tracd setup for one project. Yesterday, I spent a very long time working with my local development environment trying to get mod_python work with Apache 2.2.13, which led me to ultimately abandon the module and use the lightweight, standalone server for Trac, tracd. After installing mod_python using the MSI, I noticed I could no longer start Apache. I kept getting this error:
httpd.exe: Syntax error on line 113 of C:/Program Files/Zend/Apache2/conf/httpd.conf: Cannot load C:/Program Files/Zend/Apache2/modules/mod_python.so into server: The specified module could not be found.
I finally solved that problem by copying C:Python25python25.dll into C:Windows. This may not have been the “perfect” fix, but it worked so I was happy. Next, I was plagued with getting Trac setup with Apache and mod_python… which never happened. I did, however, get it to work using CGI (Trac’s FastCGI won’t work on Windows), which was horrendously slow.
I finally decided to use the standalone server, which was a billion times better than using the CGI setup. Below are the steps to setup Trac’s standalone server as a service on Windows XP.
- Install Trac/SVN using the instructions on Trac’s web site.
- Download and install the Windows Server 2003 Resource Kit Tools. (Note: Even though it says Windows Server, it is compatible with Windows XP, which it plainly says in the System Requirements.)
- Document the location of the Windows Resource Kits’ srvany.exe file. The default directory is C:Program FilesWindows Resource KitsTools.
- Open up the Command Prompt. To do this, go to the Start menu and click Run. Type in cmd and press enter.
- Type the following and then press enter: instsrv tracd “C:Program FilesWindows Resource KitsToolssrvany.exe”
- Type exit to close the Command Prompt.
- Go back to the Start menu and click Run. Type in regedit and press enter.
- Open HKEY_LOCAL_MACHINESystemCurrentControlSetServicestracd.
- Right-click on tracd and click New > Key. Name the key, Parameters.