zoukankan      html  css  js  c++  java
  • windows 通过appache链接cgi程序

    1 #!D:Python27
    2 
    3 print 'Content-type: text/plain'
    4 print
    5 
    6 print 'Hello, world'
    出现错误
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server                                         and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.
     
    查看appache的错误日志发现

    [Mon Aug 11 14:51:18 2014] [error] [client 127.0.0.1] File does not exist: C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/favicon.ico
    [Mon Aug 11 14:53:11 2014] [error] [client 127.0.0.1] (OS 2)系统找不到指定的文件。 : couldn't create child process: 720002: listing15-4.py
    [Mon Aug 11 14:53:11 2014] [error] [client 127.0.0.1] (OS 2)系统找不到指定的文件。 : couldn't spawn child process: C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin/listing15-4.py

    一样一样来! 第一个error:favicon.ico文件没找  google后才知道这是个 在地址栏最左边 显示的图片, 个人觉得有没有应该没多大问题, 但还是在线做了个,在线做favicon.ico的网站还蛮多的, 傻瓜式操作。

    第二个error:couldn't create child process。  这个是主要的错误, 同时也导致了下面   couldn't spawn child process。   上网搜了一下, 说原因可能是没找到解释器。

    于是在开头

    1 #!D:Python27
    2 
    3 print 'Content-type: text/plain'
    4 print
    5 
    6 print 'Hello, world'
    1 #!D:Python27python.exe
    2 
    3 print 'Content-type: text/plain'
    4 print
    5 
    6 print 'Hello, world'
  • 相关阅读:
    log4net(c#) 配置及使用
    【转】JMeter试用手记
    【转】性能测试工具JMeter的使用技巧
    【转】JMeter基础之——录制脚本
    【转】Jmeter基础之——jmeter基础概念
    【转】JMeter基础之——一个简单的性能测试
    【转】JMeter入门
    【转】Jmeter压力测试模拟并发
    【转】JMeter Tutorial的安装和具体操作
    【转】JMeter代理录制脚本
  • 原文地址:https://www.cnblogs.com/yeahpeng/p/3904862.html
Copyright © 2011-2022 走看看