#!D:\Python27\

 print 'Content-type: text/plain'
print 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\

 print 'Content-type: text/plain'
print print 'Hello, world'
 #!D:\Python27\python.exe

 print 'Content-type: text/plain'
print print 'Hello, world'

windows 通过appache链接cgi程序的更多相关文章

  1. 教你用shell写CGI程序

    以前用shell写过一些cgi的例子.今天向大家介绍一下. CGI是一种接口的标准,并不区分编程语言,也就是说,CGI可以用任何一种语言编写,只要这种语言具有标准输入.输出和环境变量.CGI会将标准输 ...

  2. 【Linux】Windows终端远程链接Linux服务器

    一.Windows cmd ssh链接 1.控制面板->程序->启用Telnet客户端 2.输入命令链接 cmd中输入 ssh 账号名@服务器ip地址:端口号 例如: ssh root@1 ...

  3. windows+phpstudy(apache) 以cgi方式运行python

    Apache配置 在httpd.conf中查找DocumentRoot: +ExecCGI 支持cgi DocumentRoot "F:\phpStud\PHPTutorial\WWW&qu ...

  4. Apache服务器中运行CGI程序的方法,文中以Perl脚本作为示例

    关于apache与CGI在这里就不解释了. 1.apache下面以2.0.63为例介绍运行CGI程序的配置.(http://www.nklsyy.com) 2.下载Windows下的Perl解释器Ac ...

  5. Apache运行python cgi程序

    Apache运行python cgi程序 环境 win10 x64 专业版 Apache2.4 python 2.7 Apache安装和配置 Apache服务器的安装请自行搜索.在Apache2.4中 ...

  6. windows下调用外部exe程序 SHELLEXECUTEINFO

    本文主要介绍两种在windows下调用外部exe程序的方法: 1.使用SHELLEXECUTEINFO 和 ShellExecuteEx SHELLEXECUTEINFO 结构体的定义如下: type ...

  7. cgic 写CGI程序

    CGIC是C语言CGI库函数,用于编写CGI程序 CGIC 主要完成以下功能: * 对数据进行语法分析 * 接收以 GET 和 PSOT 两种方式发送的数据 * 把 FORM 中的不同域连接成连续的串 ...

  8. C、Shell、Perl基于Tomcat开发CGI程序环境配置

    基于Tomcat7.0版本号配置CGI开发环境,步聚例如以下: 以我的Tomcat7安装文件夹为例:TOMCA_HOME = /Users/yangxin/Documents/devToos/java ...

  9. httpd cgi程序配制+.py .cgi执行

     vi /etc/httpd/conf/httpd.conf httpd默认首页配制: DirectoryIndex index.html index.html.var 首页的位置定义: Docume ...

随机推荐

  1. java读取存在src目录下和存在同级目录下的配置文件

    如果我有个文件存在src下一级的地方和存在src同级的目录应该怎么用相对路径去获取如图: 一.如果存在src同级的地方应该是InputStream in = new BufferedInputStre ...

  2. 图片放大缩小插件 zoom.js 怎么用

    代码如下: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf ...

  3. jenkins pipeline 流水线生产

    jenkins pipeline : pipeline { agent any parameters { string(name: 'git_version', defaultValue: 'v1.1 ...

  4. 百万年薪python之路 -- JS基础介绍及数据类型

    JS代码的引入 方式1: <script> alert('兽人永不为奴!') </script> 方式2:外部文件引入 src属性值为js文件路径 <script src ...

  5. 百万年薪python之路 -- 装饰器

    装饰器 1.1 开放封闭原则 开放封闭原则具体定义是这样: 1.对扩展是开放的 我们说,任何一个程序,不可能在设计之初就已经想好了所有的功能并且未来不做任何更新和修改.所以我们必须允许代码扩展.添加新 ...

  6. Solr分片机制以及Solrcloud搭建及分片操作

    Solr分片描述 分片是集合的逻辑分区,包含集合中文档的子集,这样集合中的每个文档都正好包含在一个分片中.集合中包含每个文档的分片取决于集合的整体"分片"策略. 当您的集合对于一个 ...

  7. 基于 HTML5 + Canvas 实现的 PID 可视化系统

    前言 随着工业物联网和互联网技术的普及和发展,人工填料的方式已经逐渐被机械设备取代.工业厂商减小误操作.提升设备安全以及追求高效率等制造特点对设备的要求愈加高标准.严要求.同时机械生产以后还需遵从整个 ...

  8. StackView在Android的应用

    StackView是AdapterViewAnimator的子类,它用于显示Adapter提供的一系列View.StackView将会以“堆叠”的方式来显示多个列表项.为了控制StackView现实的 ...

  9. Type of the default value for 'songs' prop must be a function

    eslint常会出现这样的错误提示,控制台打印:Type of the default value for 'songs' prop must be a function 解决办法有两种如下: 1:写 ...

  10. apply 、 call 、 bind的用法

    1.apply 方法 apply:调用一个对象的一个方法,用另一个对象替换当前对象.例如:B.apply(A, arguments);即A对象应用B对象的方法. apply方法最多只能有两个参数——新 ...