cgi

Problem in running .net framework 4.0 website on iis 7.0

一笑奈何 提交于 2019-11-29 22:43:43
Hey I got problem in running .NET framework 4.0 website on IIS7.0 . the error I got is like: HTTP Error 404.2 - Not Found "The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server". Module : IsapiModule , Notification : ExecuteRequestHandler, Handler : PageHandlerFactory-ISAPI-4.0_32bit , Error Code : 0x800704ec Go to IIS manager and click on the server name. Then click on the "ISAPI and CGI Restrictions" icon under the IIS header. Change ASP.NET 4.0 from "Not Allowed" to "Allowed". If you look in the ISAPI And CGI Restrictions , and

How can I prevent database being written to again when the browser does a reload/back?

霸气de小男生 提交于 2019-11-29 22:15:00
问题 I'm putting together a small web app that writes to a database (Perl CGI & MySQL). The CGI script takes some info from a form and writes it to a database. I notice, however, that if I hit 'Reload' or 'Back' on the web browser, it'll write the data to the database again. I don't want this. What is the best way to protect against the data being re-written in this case? 回答1: Do not use GET requests to make modifications! Be RESTful; use POST (or PUT) instead the browser should warn the user not

FastCgi与PHP-fpm关系

我怕爱的太早我们不能终老 提交于 2019-11-29 22:01:11
1 CGI (1)什么是CGI: CGI(Common Gateway Interface)公共网关接口, 是WWW技术中最重要的技术之一,有着不可替代的重要地位, CGI是外部应用程序(CGI程序)与Web服务器之间的接口标准,是在CGI程序和Web服务器之间传递消息的规程。CGI规范允许WEB服务器执行外部程序,将他们的输出发送给Web浏览器, CGI将Web的一组简单的超媒体文档变成一个完整的新的交互式媒体。 (2)CGI的目的: CGI是为了保证web server传递过来的数据是标准格式的,方便CGI程序的编写者。 (3)CGI的处理过程: web server (比如nginx)只是内容的分发者。 比如,如果请求/index.html, 那么web server会去文件系统中找到这个文件,发送给浏览器,这里分发的是静态数据。 如果现在请求的是/index.php,根据配置文件,nginx知道这个不是静态文件,需要去找PHP解析器来处理,那么它会把这个请求简单处理后交给PHP解析器。Nginx会传那些数据给(如url,查询字符串,POST数据,HTTP header)PHP解析器呢?CGI就是规定要传哪些数据、以什么样的格式传递给后方处理这个请求的协议。 当web server收到/index.php这个请求后,会启动对应的CGI程序,这里就是PHP的解析器

【转】关于cgi、FastCGI、php-fpm、php-cgi

依然范特西╮ 提交于 2019-11-29 22:00:42
转自 知乎 的 一个回答 首先,CGI是干嘛的?CGI是为了保证web server传递过来的数据是标准格式的,方便CGI程序的编写者。 web server(比如说nginx)只是内容的分发者。比如,如果请求/index.html,那么web server会去文件系统中找到这个文件,发送给浏览器,这里分发的是静态数据。好了,如果现在请求的是/index.php,根据配置文件,nginx知道这个不是静态文件,需要去找PHP解析器来处理,那么他会把这个请求简单处理后交给PHP解析器。Nginx会传哪些数据给PHP解析器呢?url要有吧,查询字符串也得有吧,POST数据也要有,HTTP header不能少吧,好的,CGI就是规定要传哪些数据、以什么样的格式传递给后方处理这个请求的协议。仔细想想,你在PHP代码中使用的用户从哪里来的。 当web server收到/index.php这个请求后,会启动对应的CGI程序,这里就是PHP的解析器。接下来PHP解析器会解析php.ini文件,初始化执行环境,然后处理请求,再以规定CGI规定的格式返回处理后的结果,退出进程。web server再把结果返回给浏览器。 好了,CGI是个协议,跟进程什么的没关系。那fastcgi又是什么呢?Fastcgi是用来提高CGI程序性能的。 提高性能,那么CGI程序的性能问题在哪呢?"PHP解析器会解析php

概念了解:CGI,FastCGI,PHP-CGI与PHP-FPM

爱⌒轻易说出口 提交于 2019-11-29 22:00:30
CGI CGI全称是“公共网关接口”(Common Gateway Interface),HTTP服务器与你的或其它机器上的程序进行“交谈”的一种工具,其程序须运行在网络服务器上。 CGI可以用任何一种语言编写,只要这种语言具有标准输入、输出和环境变量。如php,perl,tcl等。 FastCGI FastCGI像是一个常驻(long-live)型的CGI,它可以一直执行着,只要激活后,不会每次都要花费时间去fork一次(这是CGI最为人诟病的fork-and-execute 模式)。它还支持分布式的运算,即 FastCGI 程序可以在网站服务器以外的主机上执行并且接受来自其它网站服务器来的请求。 FastCGI是语言无关的、可伸缩架构的CGI开放扩展,其主要行为是将CGI解释器进程保持在内存中并因此获得较高的性能。众所周知,CGI解释器的反复加载是CGI性能低下的主要原因,如果CGI解释器保持在内存中并接受FastCGI进程管理器调度,则可以提供良好的性能、伸缩性、Fail- Over特性等等。 FastCGI特点 FastCGI具有语言无关性. FastCGI在进程中的应用程序,独立于核心web服务器运行,提供了一个比API更安全的环境。APIs把应用程序的代码与核心的web服务器链接在一起,这意味着在一个错误的API的应用程序可能会损坏其他应用程序或核心服务器。

给PHPSTORM添加XDEBUG调试功能

强颜欢笑 提交于 2019-11-29 20:42:28
1、运行环境 nginx 1.0.14 php with fpm-cgi 5.5.9 mac os X 2、安装步骤 1)install xdebug wget http://xdebug.org/files/xdebug-2.2.3.tgz tar xzvf xdebug-2.2.3.tgz && cd xdebug-2.2.3 /path-to-your-php-root/bin/phpize ./configure –enable-xdebug –with-php-config=/path-to-your-php-root/bin/php-config 修改你的php.ini配置,添加: zend_extension=/server/php/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so xdebug.idekey=”PHPSTORM” xdebug.remote_host=127.0.0.1 ;注意端口为9001,默认为9000,因为跟fpm冲突所以要修改 xdebug.remote_port=9001 xdebug.remote_enable=on */path-to-your-php-root/ 指你电脑里php的安装根目录,注意替换。 2)重启fpm和nginx kill -USR2 fpm主进程id

Fast CGI 工作原理

我的未来我决定 提交于 2019-11-29 19:11:27
CGI的历史 早期的webserver只处理html等静态文件,但是随着技术的发展,出现了像php等动态语言。 webserver处理不了了,怎么办呢?那就交给php解释器来处理吧! 交给php解释器处理很好,但是,php解释器如何与webserver进行通信呢? 为了解决不同的语言解释器(如php、python解释器)与webserver的通信,于是出现了cgi协议。只要你按照cgi协议去编写程序,就能实现语言解释器与webwerver的通信。如php-cgi程序。 FastCGI的改进 有了cgi协议,解决了php解释器与webserver通信的问题,webserver终于可以处理动态语言了。但是,webserver每收到一个请求,都会去fork一个cgi进程,请求结束再kill掉这个进程。这样有10000个请求,就需要fork、kill php-cgi进程10000次。 有没有发现很浪费资源? 于是,出现了cgi的改良版本,fast-cgi。fast-cgi每次处理完请求后,不会kill掉这个进程,而是保留这个进程,使这个进程可以一次处理多个请求。这样每次就不用重新fork一个进程了,大大提高了效率。 PHP-FPM是什么 php-fpm即php-Fastcgi Process Manager. php-fpm是 FastCGI 的实现,并提供了进程管理的功能。 进程包含

HTTP

走远了吗. 提交于 2019-11-29 19:10:16
HTTP WEB服务 tcp80 使apache支持html 开启httpd并查看有效内容 服务器操作 1.#yum insall httpd 2.#echo “test page” >/var/www/html/index.html #systemctl restart httpd 客户端测试 #yum install elinks #links http://192.168.10.5 查看Apache当前工作模式 #httpd -V | grep “Server MPM” 修改Apache工作模式 #vim /etc/httpd/conf.modules.d/00-mpm.conf ----------------------------------------------------------------------------------------------------------------------------- HTTP WEB服务 使apache支持perl脚本 服务器操作 1.#yum install perl perl-CGI -y[安装perl支持程序] 2.#vim /etc/httpd/conf [修改httpd.conf配置] ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"[确认247行对cgi的支持] 3

How does cgi.FieldStorage store files?

妖精的绣舞 提交于 2019-11-29 14:07:49
问题 So I've been playing around with raw WSGI, cgi.FieldStorage and file uploads. And I just can't understand how it deals with file uploads. At first it seemed that it just stores the whole file in memory. And I thought hm, that should be easy to test - a big file should clog up the memory!.. And it didn't. Still, when I request the file, it's a string, not an iterator, file object or anything. I've tried reading the cgi module's source and found some things about temporary files, but it returns

Illegal operation on WrappedNative prototype object

一曲冷凌霜 提交于 2019-11-29 13:34:11
I'm sorry if this answer seems similar to other questions in this website, but I couldn't find what I need. I have this code: $.ajax({ url: '../../cgi-bin/executeQuery', type: 'GET', data: ({siid:5185,of:"xmlWithColID"}), dataType: 'xml', success: function(xmlR){ try{ $.ajax({ url: '../../cgi-bin/authList.py', type: 'GET', data: ({xmlToFormat:xmlR,service:"paperList"}), dataType: 'xml', success: function(data){ try{ displayResult(data,loadXMLDoc("js/authList/paperTableStyle.xsl"),"divPaperTable"); }catch(e){ console.log(e.message); } }, complete: function(XMLHttpRequest, textStatus){ $('