Mac server hosting

Edition.net are offering dedicated Xserve server solutions for US$250 (presumably per month, plus US$400 setup). For that you get “MacOSX Server featuring Xserve – 1.33Ghz PowerPC G4, 60gig storage, 512MB ram, WebObjects 5”. Although the RAM (and storage) seems a bit small. There are other options available which include WebStar V, FileMaker Unlimited (version 5?), and Lasso Pro 6 (not 8!). They do offer “flat-rate pricing with no traffic surcharges”.

digital.forest offers an Enhanced plan for US$30 setup and US$19/month (+US$10/month for MySQL) with perl, PHP5, Python, Mac OS X and more, 100MB of storage, and 3Gb of data transfer. Not sure what their colocating price is like though as you need to contact a salesdroid. Digital.forest have been around since 1994 and have a long time association with Mac newsletter TidBITs.

MySQLdb lays an egg

If you’ve got a Python CGI that uses MySQLdb and it mysteriously fails to display, you may want to check /var/log/httpd/error_log where you might find something like:


Traceback (most recent call last):
File "/Library/WebServer/CGI-Executables/test2.cgi", line 12, in
import MySQLdb
File "build/bdist.macosx-10.4-i386/egg/MySQLdb/__init__.py", line 19, in
File "build/bdist.macosx-10.4-i386/egg/_mysql.py", line 7, in
File "build/bdist.macosx-10.4-i386/egg/_mysql.py", line 4, in __bootstrap__
File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 800, in resource_filename
self, resource_name
File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 1228, in get_resource_filename
self._extract_resource(manager, self._eager_to_zip(name))
File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 1250, in _extract_resource
self.egg_name, self._parts(zip_path)
File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 880, in get_cache_path
self.extraction_error()
File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 846, in extraction_error
raise err
pkg_resources.ExtractionError: Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

[Errno 13] Permission denied: '/Library/WebServer/.python-eggs/MySQL_python-1.2.2-py2.5-macosx-10.4-i386.egg-tmp'

The Python egg cache directory is currently set to:

/Library/WebServer/.python-eggs

Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.

As it says, you need to either create the directory and set the privileges (chown -R www:www /Library/WebServer/.python-eggs) or set the PYTHON_EGG_CACHE environment variable to a directory that’s writable by the user executing the cgi (probably www).