cgi

Differences and uses between WSGI, CGI, FastCGI, and mod_python in regards to Python?

守給你的承諾、 提交于 2019-11-26 11:48:38
问题 I\'m just wondering what the differences and advantages are for the different CGI\'s out there. Which one would be best for python scripts, and how would I tell the script what to use? 回答1: A part answer to your question, including scgi. What's the difference between scgi and wsgi? Is there a speed difference between WSGI and FCGI? How Python web frameworks, WSGI and CGI fit together CGI vs FCGI Lazy and not writing it on my own. From the wikipedia: http://en.wikipedia.org/wiki/FastCGI

Why can't python find some modules when I'm running CGI scripts from the web?

拥有回忆 提交于 2019-11-26 11:35:11
问题 I have no idea what could be the problem here: I have some modules from Biopython which I can import easily when using the interactive prompt or executing python scripts via the command-line. The problem is, when I try and import the same biopython modules in a web-executable cgi script, I get a \"Import Error\" : No module named Bio Any ideas here? 回答1: Here are a couple of possibilities: Apache (on Unix) generally runs as a different user, and with a different environment, to python from

What is Common Gateway Interface (CGI)?

瘦欲@ 提交于 2019-11-26 11:27:10
CGI is a Common Gateway Interface. As the name says, it is a "common" gateway interface for everything. It is so trivial and naive from the name. I feel that I understood this and I felt this every time I encountered this word. But frankly, I didn't. I'm still confused. I am a PHP programmer with web development experience. user (client) request for page ---> webserver(->embedded PHP interpreter) ----> Server side(PHP) Script ---> MySQL Server. Now say my PHP Script can fetch results from MySQL server & MATLAB server & some other server. So, now PHP Script is the CGI? Because its interface for

How to parse $QUERY_STRING from a bash CGI script?

放肆的年华 提交于 2019-11-26 08:24:42
问题 I have a bash script that is being used in a CGI. The CGI sets the $QUERY_STRING environment variable by reading everything after the ? in the URL. For example, http://example.com?a=123&b=456&c=ok sets QUERY_STRING=a=123&b=456&c=ok . Somewhere I found the following ugliness: b=$(echo \"$QUERY_STRING\" | sed -n \'s/^.*b=\\([^&]*\\).*$/\\1/p\' | sed \"s/%20/ /g\") which will set $b to whatever was found in $QUERY_STRING for b . However, my script has grown to have over ten input parameters. Is

What is Common Gateway Interface (CGI)?

筅森魡賤 提交于 2019-11-26 02:25:42
问题 CGI is a Common Gateway Interface. As the name says, it is a \"common\" gateway interface for everything. It is so trivial and naive from the name. I feel that I understood this and I felt this every time I encountered this word. But frankly, I didn\'t. I\'m still confused. I am a PHP programmer with web development experience. user (client) request for page ---> webserver(->embedded PHP interpreter) ----> Server side(PHP) Script ---> MySQL Server. Now say my PHP Script can fetch results from

剖析LNMP架构

独自空忆成欢 提交于 2019-11-26 01:48:12
一、什么是LNMP? LNMP指的是一个基于Centos/Debian编写的NGINX、PHP、MySQL、PHPmyadmin、eaccelerator集成的一键安装包。可以在VPS、独立的(云)主机上轻松地安装生产环境。 1、软件服务解释: Linux:一套免费试用和自由传播的类Unix操作系统,是一个基于POSIX和Unix的多用户、多任务、支持多线程和多CPU的操作系统。代表linux版本有: NGINX:一个高性能的HTTP和反向代理服务器,也是一个IMAP/pop3/SMTP代理服务器。 PHP:一种在服务端执行的嵌入HTML文档的脚本语言。 MySQL:一个关系型数据库管理系统(RDBMS)。 PHPmyadmin:一个以PHP为基础和web-base方式架构在网站主机上的MySQL的数据库管理工具,能让管理者可用web接口管理MySQL数据库。 eaccelerator:一个自由开源的PHP加速器,优化和动态内容缓存,提高PHP脚本的缓存性能,使PHP脚本在编译的状态下,对服务器的开销几乎完全消除。能使PHP程序代码执效提高1-10倍。 2、LNMP工作原理 lnmp简化版原理: 第一步、用户在浏览器输入域名或者IP访问网站 第二步、用户在访问网站的时候,向web服务器发出http request请求,服务器响应并处理web请求,返回静态网页资源,如CSS

How can I troubleshoot my Perl CGI script?

和自甴很熟 提交于 2019-11-25 22:02:36
问题 I have a Perl script that isn\'t working and I don\'t know how to start narrowing down the problem. What can I do? Note: I\'m adding the question because I really want to add my very lengthy answer to Stackoverflow. I keep externally linking to it in other answers and it deserves to be here. Don\'t be shy about editing my answer if you have something to add. 回答1: This answer is intended as a general framework for working through problems with Perl CGI scripts and originally appeared on

Web

偶尔善良 提交于 2019-11-25 21:02:12
web(World Wide Web)即全球广域网,也称为万维网,它是一种基于超文本和HTTP的、全球性的、动态交互的、跨平台的分布式图形信息系统。是建立在Internet上的一种网络服务,为浏览者在Internet上查找和浏览信息提供了图形化的、易于访问的直观界面,其中的文档及超级链接将Internet上的信息节点组织成一个互为关联的网状结构。 体系结构: 简述 Web体系结构 传统的Web数据库系统一般实现Web数据库系统的连接和应用可采取两种方法,一种是在Web服务器端提供中间件来连接Web服务器和数据库服务器,另一种是把应用程序下载到客户端并在客户端直接访问数据库。中间件负责管理Web服务器和数据库服务器之间的通信并提供应用程序服务,它能够直接调用外部程序或脚本代码来访问数据库,因此可以提供与数据库相关的动态HTML页面,或执行用户查询,并将查询结果格式化成HTML页面。通过Web服务器返回给Web浏览器。最基本的中间件技术有通过网关接口CGI和应用程序接口API两种。 公共网关接口 CGI是外部应用程序(CGI程序)与Web服务器之间的接口标准,是WWW服务器运行时外部程序的规范,按照CGI编写的程序可以扩展服务器的功能,完成服务器本身不能完成的工作,外部程序执行时间可以生成HTML文档,并将文档返回WWW服务器。CGI应用程序能够与浏览器进行交互作用