【问题标题】:Getting Error when trying to setup mod_python [closed]尝试设置 mod_python 时出错 [关闭]
【发布时间】:2013-05-20 00:09:48
【问题描述】:

安装 mod_python 并更改后

/etc/apache2/sites-available/default
文件。尝试运行时出现以下错误
tail -f /var/log/apache2/error.log
ai-System-Product-Name ws_code # tail -f /var/log/apache2/error.log
Fatal Python error: PyEval_AcquireThread: NULL new thread state
Fatal Python error: PyEval_AcquireThread: NULL new thread state
Fatal Python error: PyEval_AcquireThread: NULL new thread state
Fatal Python error: PyEval_AcquireThread: NULL new thread state
Fatal Python error: PyEval_AcquireThread: NULL new thread state
Fatal Python error: PyEval_AcquireThread: NULL new thread state
[Fri May 24 16:45:29 2013] [notice] caught SIGTERM, shutting down
[Fri May 24 16:45:30 2013] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Fri May 24 16:45:30 2013] [notice] mod_python: using mutex_directory /tmp 
[Fri May 24 16:45:30 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.6-1ubuntu1.2 mod_python/3.3.1 Python/2.7.3 mod_wsgi/3.4 configured -- resuming normal operations

此外,现在每当我尝试在浏览器上运行我的代码时,它只会直接显示原始代码。如何消除错误?我正在使用 Linux Mint 14 Nadia。

【问题讨论】:

    标签: python apache apache2 mod-python linux-mint


    【解决方案1】:

    mod_python 包不再被开发或支持,并且多年没有更新。如果它仍然适用于最新的 Python 2.X 版本,那你就很幸运了。 mod_python 包没有正确使用 Python 线程 API。在 Python 3.X 中,他们改变了关于如何使用线程 API 的义务。如果其中任何一个被移植回 Python 2.7,那么 mod_python 可能会因为其不正确的线程 API 使用而中断。

    简短的回答是你现在不想使用 mod_python。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-03-31
      • 2014-01-27
      • 2014-12-08
      • 1970-01-01
      • 2021-03-31
      • 2017-05-15
      • 1970-01-01
      相关资源
      最近更新 更多