V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
yingluck
V2EX  ›  Python

apache下令人困惑的问题

  •  
  •   yingluck ·
    zhao-ji · 2014-01-11 11:36:18 +08:00 · 2738 次点击
    这是一个创建于 3763 天前的主题,其中的信息可能已经有所发展或是发生改变。
    apache下fastcgi+webpy搭建了两个程序代码差不多一模一样,其中一个运行正常,另一个就是死活不行,这是apache错误日志
    [Fri Jan 10 22:24:59.757885 2014] [fcgid:warn] [pid 23626] (104)Connection reset by peer: [client 111.11.86.132:2086] mod_fcgid: error reading data from FastCGI server
    [Fri Jan 10 22:24:59.757962 2014] [core:error] [pid 23626] [client :ip:2086] End of script output before headers: code.py


    这是000-default.conf:

    https://gist.github.com/zhao-ji/8366650

    网上查了一下 发现这个问题很罕见 已有的答案已经看过了 没什么帮助
    3 条回复    1970-01-01 08:00:00 +08:00
    xiaket
        1
    xiaket  
       2014-01-12 12:44:47 +08:00 via iPhone
    报错写明code.py里有问题哦
    txlty
        2
    txlty  
       2014-01-12 18:42:40 +08:00
    根据我的经验,你的程序有警告级别的错误,发到输出流里了。描述可能不太准确,反正大概就是这个意思。
    在程序里 或者 配置文件里,把警告级别的错误关掉,应该就好了。

    比如,php的话,在出错文件里加上error_reporting(0)就ok了。
    yingluck
        3
    yingluck  
    OP
       2014-01-13 14:58:56 +08:00
    @xiaket 您是说这个吗? [End of script output before headers: code.py] 确实是代码里的问题 改正后能运行了
    @txlty 搞定了 感谢!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   959 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 18:38 · PVG 02:38 · LAX 11:38 · JFK 14:38
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.