missing __init__.py = segfault
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libapache2-mod-python (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: libapache2-
It is probably more like "raise EnvironmentError" causes segfault, but I'm note expert enough.
I found this testing https:/
These 2 are not dependent on each other -
if 175230 isn't fixed, then the rm __init__.py steps below don't need to be done.
Steps:
Install Ubuntu-Server (only openssh-server)
sudo apt-get install libapache2-
sudo rm /usr/share/
sudo vim /etc/apache2/
<Location "/">
SetHandler python-program
PythonHandler django.
PythonDebug On
PythonPath "['/usr/
SetEnv DJANGO_
</Location>
sudo a2dissite default
sudo a2ensite django-example
sudo /etc/init.d/apache2 reload
hit box with browser
juser@cp333:~$ tail -f /var/log/
[Sun Dec 09 23:30:33 2007] [notice] child pid 5414 exit signal Segmentation fault (11)
[Sun Dec 09 23:30:33 2007] [notice] child pid 5415 exit signal Segmentation fault (11)
[Sun Dec 09 23:30:33 2007] [notice] child pid 5416 exit signal Segmentation fault (11)
[Sun Dec 09 23:30:33 2007] [notice] child pid 5417 exit signal Segmentation fault (11)
[Sun Dec 09 23:30:33 2007] [notice] child pid 5420 exit signal Segmentation fault (11)
[Sun Dec 09 23:30:33 2007] [notice] child pid 5421 exit signal Segmentation fault (11)
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] mod_python (pid=5423, interpreter=
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] ServerName: 'cp333.
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] DocumentRoot: '/htdocs'
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] URI: '/'
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] Location: '/'
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] Directory: None
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] Filename: '/htdocs'
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] PathInfo: '/'
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] Traceback (most recent call last):
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] File "/usr/lib/
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] File "/usr/lib/
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] File "/usr/lib/
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] File "/var/lib/
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] File "/var/lib/
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] File "/var/lib/
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] File "/var/lib/
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] File "/var/lib/
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] File "/var/lib/
[Sun Dec 09 23:30:34 2007] [error] [client 192.168.1.48] EnvironmentError: Could not import settings 'examples.settings' (Is it on sys.path? Does it have syntax errors?): No module named examples.settings
bug vanished for no reason.
I think all I did was create/remove the file:
sudo touch /usr/share/ doc/python- django/ examples/ __init_ _.py doc/python- django/ examples/ __init_ _.pyc
sudo rm /usr/share/
but now when I hit with browser, I get an error page and no segfault.
MOD_PYTHON ERROR
ProcessId: 4059 personnelware. com'
Interpreter: 'cp333.
ServerName: 'cp333. personnelware. com'
DocumentRoot: '/htdocs'
URI: '/'
Location: '/'
Directory: None
Filename: '/htdocs'
PathInfo: '/'
Phase: 'PythonHandler' core.handlers. modpython'
Handler: 'django.
Traceback (most recent call last):
File "/usr/lib/ python2. 5/site- packages/ mod_python/ importer. py", line 1537, in HandlerDispatch default_ handler, arg=req, silent= hlist.silent)
default=
File "/usr/lib/ python2. 5/site- packages/ mod_python/ importer. py", line 1229, in _process_target target( config, req, object, arg)
result = _execute_
File "/usr/lib/ python2. 5/site- packages/ mod_python/ importer. py", line 1128, in _execute_target
result = object(arg)
File "/var/lib/ python- support/ python2. 5/django/ core/handlers/ modpython. py", line 177, in handler r()(req)
return ModPythonHandle
File "/var/lib/ python- support/ python2. 5/django/ core/handlers/ modpython. py", line 145, in __call__ load_middleware ()
self.
File "/var/lib/ python- support/ python2. 5/django/ core/handlers/ base.py" , line 22, in load_middleware MIDDLEWARE_ CLASSES:
for middleware_path in settings.
File "/var/lib/ python- support/ python2. 5/django/ conf/__ init__. py", line 28, in __getattr__ _import_ settings( )
self.
File "/var/lib/ python- support/ python2. 5/django/ conf/__ init__. py", line 55, in _import_settings settings_ module)
self._target = Settings(
File "/var/lib/ python- support/ python2. 5/django/ conf/__ init__. py", line 83, in __init__ MODULE, e)
raise EnvironmentError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_
EnvironmentError: Could not import settings 'examples.settings' (Is it on sys.path? Does it have syntax errors?): No module named examples.settings