喜欢首先建议我是新手,而我的网页设计师不在国外。我有以下问题并寻求一些建议。我已经重新安装了 mysqldb 并升级了软件包。我和我的托管公司谈过,他们建议他们升级到 mysql 5.5。
我搜索了网络和 stackoverflow,并尝试了许多不同的解决方案,如上所述。
这是服务器上错误日志中的错误:
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: Traceback (most recent call last):
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: File "/home1/elitejdm/python/lib/python2.5/site-packages/flup-1.0.3.dev_20110405-py2.5.egg/flup/server/fcgi_base.py", line 574, in run
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: protocolStatus, appStatus = self.server.handler(self)
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: File "/home1/elitejdm/python/lib/python2.5/site-packages/flup-1.0.3.dev_20110405-py2.5.egg/flup/server/fcgi_base.py", line 1159, in handler
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: result = self.application(environ, start_response)
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: File "/home/elitejdm/python/lib/python2.5/site-packages/django/core/handlers/wsgi.py", line 194, in __call__
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: self.load_middleware()
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: File "/home/elitejdm/python/lib/python2.5/site-packages/django/core/handlers/base.py", line 38, in load_middleware
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: mod = __import__(mw_module, {}, {}, [''])
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: File "/home/elitejdm/python/lib/python2.5/site-packages/django/contrib/flatpages/middleware.py", line 1, in
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: from django.contrib.flatpages.views import flatpage
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: File "/home/elitejdm/python/lib/python2.5/site-packages/django/contrib/flatpages/views.py", line 1, in
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: from django.contrib.flatpages.models import FlatPage
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: File "/home/elitejdm/python/lib/python2.5/site-packages/django/contrib/flatpages/models.py", line 2, in
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: from django.db import models
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: File "/home/elitejdm/python/lib/python2.5/site-packages/django/db/__init__.py", line 17, in
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: backend = __import__('%s%s.base' % (_import_path, settings.DATABASE_ENGINE), {}, {}, [''])
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: File "/home/elitejdm/python/lib/python2.5/site-packages/django/db/backends/mysql/base.py", line 12, in
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: ImproperlyConfigured: Error loading MySQLdb module: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory
这是同样的错误,但通过python:
python jdm_cars.fcgi
WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI!
WSGIServer: missing FastCGI param SERVER_NAME required by WSGI!
WSGIServer: missing FastCGI param SERVER_PORT required by WSGI!
WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI!
/home1/elitejdm/python/lib/python2.5/site-packages/MySQL_python_embedded-1.2.3-py2.5-linux-x86_64.egg/_mysql.py:3: UserWarning: Module _mysql was already imported from /home1/elitejdm/python/lib/python2.5/site-packages/MySQL_python_embedded-1.2.3-py2.5-linux-x86_64.egg/_mysql.py, but /home1/elitejdm/public_html/new_elitejdm/MySQL-python-1.2.3 is being added to sys.path
import sys, pkg_resources, imp
Traceback (most recent call last):
File "/home1/elitejdm/python/lib/python2.5/site-packages/flup-1.0.3.dev_20110405-py2.5.egg/flup/server/fcgi_base.py", line 574, in run
protocolStatus, appStatus = self.server.handler(self)
File "/home1/elitejdm/python/lib/python2.5/site-packages/flup-1.0.3.dev_20110405-py2.5.egg/flup/server/fcgi_base.py", line 1159, in handler
result = self.application(environ, start_response)
File "/home/elitejdm/python/lib/python2.5/site-packages/django/core/handlers/wsgi.py", line 194, in __call__
self.load_middleware()
File "/home/elitejdm/python/lib/python2.5/site-packages/django/core/handlers/base.py", line 38, in load_middleware
mod = __import__(mw_module, {}, {}, [''])
File "/home/elitejdm/python/lib/python2.5/site-packages/django/contrib/flatpages/middleware.py", line 1, in <module>
from django.contrib.flatpages.views import flatpage
File "/home/elitejdm/python/lib/python2.5/site-packages/django/contrib/flatpages/views.py", line 1, in <module>
from django.contrib.flatpages.models import FlatPage
File "/home/elitejdm/python/lib/python2.5/site-packages/django/contrib/flatpages/models.py", line 2, in <module>
from django.db import models
File "/home/elitejdm/python/lib/python2.5/site-packages/django/db/__init__.py", line 17, in <module>
backend = __import__('%s%s.base' % (_import_path, settings.DATABASE_ENGINE), {}, {}, [''])
File "/home/elitejdm/python/lib/python2.5/site-packages/django/db/backends/mysql/base.py", line 12, in <module>
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
ImproperlyConfigured: Error loading MySQLdb module: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory
Status: 500 Internal Server Error
Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>Unhandled Exception</title>
</head><body>
<h1>Unhandled Exception</h1>
<p>An unhandled exception was thrown by the application.</p>
</body></html>
在写这篇文章时,我从我的托管公司那里找到了更多信息,我被告知以下内容
基本上我们将 libmysqlclient 更新为:libmysqlclient_r.so.18
来自:libmysqlclient_r.so.16
由于处于共享托管环境中,我们必须不时进行这些更新。看来这就是导致您悲伤/问题的原因。
您要么需要在服务器上本地重新安装 libmysqlclient_r.so.16,而无需 root 访问权限。(没有百胜)
或 B 配置您的脚本以处理新的 .18 版本。
如果您执行第一种方式,则将来不需要更新它。如果您采用第二种方式,我们决定再次更新。它将要求您再次更新脚本
对此很新,所以我不知道该怎么做,但愿意学习......请任何帮助表示赞赏。