[mod_python] Breaking things after upgrading MySQLdb (to 1.2.2)

Graham Dumpleton graham.dumpleton at gmail.com
Thu Jun 7 20:38:21 EDT 2007


Glad to see you worked out my instructions. :-)

I probably suggest not using /var/tmp though because if this is a
shared machine, too easy for some one to place in /var/tmp a Python
module which overrides some important standard Python module. Ie.,
would be used in place of the real one. Thus, someone could either
inadvertently or deliberately interfere with your application.

Graham

On 08/06/07, Dirk van Oosterbosch, IR labs <labs at ixopusada.com> wrote:
>
> Thanks a bunch!
>
> Making a egg_cache_module.py file containing:
> import os
> os.environ['PYTHON_EGG_CACHE'] = '/var/tmp'
>
> and just adding
> PythonImport /full/path/to/some/egg_cache_module.py
> mynetworkname.lan
> to httpd.conf. And restarting fixed the MySQLdb problem.
> (and after I rebuild & reinstalled all my other python modules, since I'm
> now with python 2.5.1, my original web-app works again!)
>
> once again you solved some mysterious problem, ;-)
> Thanks Graham!
>
> dirk
>
>
>
>
> On 7-jun-2007, at 13:27, Graham Dumpleton wrote:
>
>
>
> After I restarted my machine, it first gave:
>
>
>
>
> [Thu Jun 07 10:05:54 2007] [error] [client ::1] ExtractionError: Can't
>
> extract file(s) to egg cache\n\nThe following error occurred while trying to
>
> extract file(s) to the Python egg\ncache:\n\n  [Errno 13] Permission denied:
>
> '/var/empty/.python-eggs'\n\nThe Python egg cache directory
>
> is currently set to:\n\n
>
> /var/empty/.python-eggs\n\nPerhaps your account does not
>
> have write access to this directory?  You can\nchange the cache directory by
>
> setting the PYTHON_EGG_CACHE environment\nvariable to point to an accessible
>
> directory.\n
>
>
>
>
> To get rid of this problem, create a new Python code module somewhere
>
> containing:
>
>
>
>
>  import os
>
>  os.environ['PYTHON_EGG_CACHE'] = '/some/path'
>
>
>
>
> The directory /some/path must be writable to the user that Apache runs as.
>
>
>
>
> Then add to Apache global configuration:
>
>
>
>
>  PythonImport interpreter_name module_name
>
>
>
>
> Where interpreter_name is the name of the interpreter your mod_python
>
> application is running in, found by query req.interpreter in a request
>
> handler. And module_name is the name of the module you created above.
>
> If that module not in standard place, if using mod_python 3.3, use
>
> absolute path to code file instead.
>
>
>
> -----------------------------
> Dirk van Oosterbosch
> de Wittenstraat 225
> 1052 AT Amsterdam
> the Netherlands
>
> http://labs.ixopusada.com
> -----------------------------
>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>
>


More information about the Mod_python mailing list