| << Grill | 2007 > October | Per Kristian's Dr. Who Theme >> |
I know enough about web programming to be dangerous: this site is run by code I’ve cobbled together over the last 5 years. My home Mac G5 tower runs a local, experimental version of the site. I installed Leopard and lots of stuff broke. I’m going to attempt to document things as I fix them.
First there was the problem that the server didn’t allow permissions to anyone. I screwed around with my httpd.conf for so long I’m no longer sure of how I fixed this.
On Leopard, Apache runs in 64-bit mode. The CGI scripts it spawns run in 64-bit mode.
So my CGI scripts’ Python modules built in C have to be rebuilt in 64-bit mode. Fortunately most Python modules are built and installed via distutils, whose idea of the architectures to build for was corrected easily with: export ARCHFLAGS="-arch ppc -arch ppc64”. (If I were on an Intel box I would have chosen i386 and x86_64). That fixed Cheetah (the templating system).
MySQL-python has a stupid compile error.
But I still couldn’t connect to the MySQL server. So now I’m forcing Apache to run in 32-bit mode. In /System/Library/LaunchDaemons/org.apache.httpd.plist I added the bold lines:
<key>ProgramArguments</key> <array> <string>arch</string> <string>-arch</string> <string>ppc</string><string>/usr/sbin/httpd</string> <string>-D</string> <string>FOREGROUND</string> </array>
This does cause Apache to run in 32-bit mode. I still can’t connect to the MySQL server, which is running ... but after updating MySQL-python to 1.2.2 everything works!
| << Grill | 2007 > October | Per Kristian's Dr. Who Theme >> |
Copyright © 1995-2006 Sonosphere LLC (CA), all rights reserved