Bruce123

Active Member
Jul 19, 2005
39
1
158
We are a small software/web/app shop and maintain this server for our clients and are not so hot at server admin. After attempting to install python, django, mod_wsgi, and a couple of related pkgs and failing, we hired someone who has always done great work in the past to do this, but we just can't seem to get it running, although he claims it is. The client for whom we need the installation is running out of patience (I don't blame him - it's been months), and so any and all help will be HIGHLY appreciated.

Server is WHM 11.32.2 & CENTOS 5.8 i686 std

The initial installation attempts by us and also by our hired hand, and our feeble attempts at repair, were made in consideration of these resources -

/http://toic.org/blog/2011/03/27/wsgi-on-cpanel-improved/
/http://birdhouse.org/blog/2011/08/11/building-mod_wsgi-easyapache-for-whmcpanel/
/http://sdkit.com/tutorial/how-to-install-python-2-7-with-mod_wsgi-on-centos-5-6-with-cpanel/
/http://forums.cpanel.net/f5/how-install-python-my-cpanel-webhosting-174842.html
/http://code.google.com/p/modwsgi/issues/detail?id=214
/http://code.google.com/p/modwsgi/wiki/InstallationIssues#Lack_Of_Python_Shared_Library
/http://forums.cpanel.net/f5/python-python-2-7-1-installation-187531.html
/http://stackoverflow.com/questions/6946413/interesting-problem-with-python-2-7-on-centos-is-this-an-issue-with-my-build

Installation included python, django, mod_wsgi, unicode csv for python: (https://github.com/jdunck/python-unicodecsv) and mySQL python (http://sourceforge.net/projects/mysql-python)

The hired hand reported this following his installation -
----------------
Done, 2.7 is installed in /usr/local/python2.7 Had to hack wsgi "custom cPanel config" to force wsgi to use python 2.7.

Before:

[email protected] [/usr/src]# ldd /usr/local/apache/modules/mod_wsgi.so | grep python

libpython2.4.so.1.0 => /usr/lib/libpython2.4.so.1.0 (0xb7dee000) after hacking, and recompiling:

[email protected] [/usr/src]# ldd /usr/local/apache/modules/mod_wsgi.so | grep python

libpython2.7.so.1.0 => /usr/local/python2.7/lib/libpython2.7.so.1.0 (0xb7da1000)

Django is in ~legarein/.local/lib/python2.7/site-packages/django/

The rest of packages, including setuptools are globally installed in python 2.7 lib

------------------------------------
- the mod_wsgi he's talking about is from the google code link above.

I can see the selection in WHM easy apache, it is checked, and it did build OK. The client who uses python & django tells me that he doesn't think apache knows what to do with the requests. The installer says all is OK and working. The client is a brilliant guy and I have known him for years. He has software and other patents. I'm going with his assessment.

When attempting to run anything python/django in his domain, he gets a 500 error and error log output like what is below.

Thanks for your attention. BTW, I am willing to work on this with support from the kind folks here, but I am also willing to pay someone to go into the server and fix it.

Thanks again.

Bruce

error log extract:

Code:
File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 162, in _fetch
File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 185, in translation
File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 276, in do_translate

File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 286, in ugettext

File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 81, in ugettext

File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/functional.py", line 206, in __unicode_cast

File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/encoding.py", line 71, in force_unicode

 File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/dateformat.py", line 30, in format

File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/dateformat.py", line 191, in r

File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/dateformat.py", line 30, in format

File "/home/legarein/.local/lib/python2.7/site-packages/django/utils/dateformat.py", line 285, in format

File "/home/legarein/.local/lib/python2.7/site-packages/django/template/defaultfilters.py", line 695, in date

File "/home/legarein/.local/lib/python2.7/site-packages/django/template/base.py", line 536, in resolve

 File "/home/legarein/.local/lib/python2.7/site-packages/django/template/debug.py", line 90, in render

File "/home/legarein/.local/lib/python2.7/site-packages/django/template/debug.py", line 73, in render_node

 File "/home/legarein/.local/lib/python2.7/site-packages/django/template/base.py", line 744, in render

  File "/home/legarein/.local/lib/python2.7/site-packages/django/template/base.py", line 117, in _render

  File "/home/legarein/.local/lib/python2.7/site-packages/django/template/base.py", line 123, in render

 File "/home/legarein/.local/lib/python2.7/site-packages/django/views/debug.py", line 151, in get_traceback_html

 File "/home/legarein/.local/lib/python2.7/site-packages/django/views/debug.py", line 59, in technical_500_response

 File "/home/legarein/.local/lib/python2.7/site-packages/django/core/handlers/base.py", line 203, in handle_uncaught_exception

 File "/home/legarein/.local/lib/python2.7/site-packages/django/core/handlers/base.py", line 169, in get_response

File "/home/legarein/.local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 272, in __call__
[Sun Apr 22 12:46:06 2012] mod_wsgi (pid=10948): Exception occurred processing WSGI script '/home/legarein/djangosites/legareinfo.wsgi