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'
  • 相关阅读:
    转载 线程池 异步I/O线程 <第三篇>
    转载 线程初步了解
    gdal库中设置prj4库全路径的用法
    比较ArrayList、LinkedList、Vector
    JavaScript创建日志文件并记录时间的做法
    从length与length()开始谈Java
    Java异常处理示例
    hudson添加批处理编译命令的注意事项
    使用相对路径导入ado库的方法
    如何将字段中带逗号的SQLite数据库数据导入到MySQL
  • 原文地址:https://www.cnblogs.com/yeahpeng/p/3904862.html
Copyright © 2011-2022 走看看