[mod_python] Question

Michael Robokoff mike.robokoff at apioutsourcing.com
Tue Oct 9 11:22:55 EDT 2007

I have just compiled pyton-2.5.1, mod_python-3.3.1,
tomcat-connectors-1.2.23, MySQL-python-1.2.2, SQLAlchemy-0.3.9 and


I know all are not associated with this problem but I wanted you to be aware
of them just incase there may be a compatibility issue.

Anyway when I run with a previously good config I get the following when
trying to access our page.


ProcessId:      7989
Interpreter:    ''
ServerName:     ''
DocumentRoot:   '/usr/local/apache2/htdocs'
URI:            '/test/standard/'
Location:       '/test/standard/'
Directory:      None
Filename:       ''
PathInfo:       None
Phase:          'PythonAccessHandler'
Handler:        'access'
Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/mod_python/importer.py", line
1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)
  File "/usr/local/lib/python2.5/site-packages/mod_python/importer.py", line
1229, in _process_target
    result = _execute_target(config, req, object, arg)
  File "/usr/local/lib/python2.5/site-packages/mod_python/importer.py", line
1128, in _execute_target
    result = object(arg)
  File "/usr/local/apache2/htdocs/test/standard/access.py", line 39, in
  File "/usr/local/apache2/htdocs/test/standard/db_module.py", line 88, in
    apache.log_error("Error %d: %s" % (e.orig.args[0], e.orig.args[1]))
NameError: global name 'apache' is not defined
Accessed:       Tue Oct  9 10:02:57 2007
Generation:     0
_mp_3318e5527a8f6da0ffb4f529361e3d2e {
  FileName:     '/usr/local/apache2/htdocs/test/standard/access.py'
  Instance:     1 [IMPORT]
  Generation:   2
  Modified:     Mon Aug 20 15:11:00 2007
  Imported:     Tue Oct  9 10:02:57 2007
  Children:     '/usr/local/apache2/htdocs/test/standard/db_module.py'
_mp_8ef5cf081b949f7d69d523216e25838d {
  FileName:     '/usr/local/apache2/htdocs/test/standard/db_module.py'
  Instance:     1 [IMPORT]
  Generation:   1
  Modified:     Mon Aug 20 15:10:42 2007
  Imported:     Tue Oct  9 10:02:57 2007

If anyone could give me some idea's on where to look next it would be really

I don't know python. So I may be missing something simple. 


Thanks for your help!



Michael Robokoff


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20071009/0d63abae/attachment.html

More information about the Mod_python mailing list