#!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. std::weak_ptr

    weak_ptr 是一种不控制对象生命周期的智能指针, 它指向一个 shared_ptr 管理的对象. 进行该对象的内存管理的是那个强引用的 shared_ptr. weak_ptr只是提供了对管理对 ...

  2. [七年技术总结系列][理论篇]-RBAC权限模型由浅入深

    权限部分将分两章介绍,第一章由浅入深介绍权限理论知识及应用,第二章介绍具体实现.后期再讲述中间件的使用时,还会插入一些权限内容,本质上属于中间件的应用. 权限模块是业务系统最常见.最基本的子集.本章假 ...

  3. python方法是什么?

    python方法是什么? 方法用来描述对象所具有的行为. 在类中定义的方法可以粗略分为四大类:公有方法.私有方法.静态方法.类方法. 公有方法.私有方法一般所指属于对象的实例方法, 私有方法的名字以两 ...

  4. 基于MVC的RESTful风格的实现

    基于MVC的RESTful风格的实现 1.RESTful风格阐述 REST服务是一种ROA(Resource-Oriented Architecture,面向资源的架构)应用.主要特点是方法信息存在于 ...

  5. OptimalSolution(1)--递归和动态规划(2)矩阵的最小路径和与换钱的最少货币数问题

    一.矩阵的最小路径和 1 3 5 9 1 4 9 18 1 4 9 18 8 1 3 4 9 9 5 8 12 5 0 6 1 14 14 5 11 12 8 8 4 0 22 22 13 15 12 ...

  6. SpringBoot之配置文件的注入

    @PropertySource&@ImportResource&@Bean @PropertySource:加载指定的配置文件: /** * 将配置文件中配置的每一个属性的值,映射到这 ...

  7. SpringBoot整合MybatisPlus3.X之Wrapper(五)

    官方文档说明: 以下出现的第一个入参boolean condition表示该条件是否加入最后生成的sql中 以下代码块内的多个方法均为从上往下补全个别boolean类型的入参,默认为true 以下出现 ...

  8. SpringCloud之整合Zipkin+Sleuth(十四)

    1.添加依赖 在项目的pom.xml文件中添加下面依赖 <!--里面包含两个依赖--> <dependency> <groupId>org.springframew ...

  9. OpenSSL aes加解密实例+base64编解码

    OpenSSL aes加解密简单实例+base64编解码 #include <stdio.h> #include <string.h> #include <memory. ...

  10. CSPS模拟 73

    被T3坑了 忘记考虑$atan$只会返回正数导致无法区分方向相反模长相等的两个向量 直接把向量拆成ab两个上三角函数干出来就对了 真的exhausted