cgi

Why do I get “redefine” warnings with “use constant” under mod_perl?

懵懂的女人 提交于 2019-12-05 17:42:31
I run CGI script with apache2 and I have this warning lines in error.log ( I removed all similar lines from the output ): [Thu Jul 30 09:39:37 2009] upload.pl: Constant subroutine ModPerl::ROOT::ModPerl::Registry::home_stanislav_cgi_perl_upload_2epl::UPLOAD_DIR redefined at /usr/share/perl/5.10/constant.pm line 115, line 133. Constant subroutine ModPerl::ROOT::ModPerl::Registry::home_stanislav_cgi_perl_upload_2epl::BUFFER_SIZE redefined at /usr/share/perl/5.10/constant.pm line 115, line 133 (#1) [Thu Jul 30 09:39:37 2009] upload.pl: Constant subroutine ModPerl::ROOT::ModPerl::Registry::home

Environment variables are not passed from .htaccess to PHP

会有一股神秘感。 提交于 2019-12-05 17:36:43
问题 I am trying to pass an environment variable from .htaccess through to PHP. This works just fine on my local WAMP server, but on the server where my website is hosted, it fails without reason. Here's my test configuration: .htaccess: SetEnv TEST_VARIABLE test_value test.php: <pre> getenv('TEST_VARIABLE') = <?php print getenv('TEST_VARIABLE'); ?> getenv('REDIRECT_TEST_VARIABLE') = <?php print getenv('REDIRECT_TEST_VARIABLE'); ?> </pre> On my local server, getting test.php correctly returns:

How can I run Perl scripts using FastCGI on Nginx?

北城余情 提交于 2019-12-05 17:25:02
问题 So I am following this guide: http://technotes.1000lines.net/?p=23 and I am going through the steps. I have a VPN (slicehost.com) with Debian Etch, serving a website (static so far) with nginx. I used wget to download FastCGI and I did the usual make make install routine. So I guess since FastCGI can't normally run CGI scripts you have to use some type of perl wrapper to interpret the perl. Now I run this script http://technotes.1000lines.net/fastcgi-wrapper.pl and I run into the exact same

How to deploy a gSOAP Web Service in Ubuntu?

不打扰是莪最后的温柔 提交于 2019-12-05 15:30:06
I have a doubt concerning the deployment of a Web Service in Ubuntu. It was implemented using gSOAP and it should be deployed, e.g. be accessible from websites (which are developed in e.g. ASP .NET). I got confused with the whole CGI, Ubuntu, Apache topics. Until now I was able to implement a Web Service in ASP .NET and deploy it on Microsoft ISS. Other than that I can also access a gSOAP Web Service described in a WSDL, using ASP .NET What are the steps to deploy my own Web Service? I have some more specific questions: Do I have to compile the WS as CGI? Do I have to install Apache in Ubuntu

Web

佐手、 提交于 2019-12-05 15:13:19
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应用程序能够与浏览器进行交互作用

Rails vs Ruby CGI [closed]

笑着哭i 提交于 2019-12-05 14:21:39
I have a boss who is convinced learning Rails is too steep a learning curve and not cost effective from a labor standpoint when straight Ruby running as a CGI app on Apache is available. He is proposing, for our rewrite, that we use straight Ruby w/ no framework rather than Rails (or Merb, Sinatra, etc.) I believe in my heart that this is a bad idea but I'm having trouble putting my case into words. Some ideas I've come up with so far: Rails promotes better code reuse and better separation of concerns via MVC A shop running rails will look more attractive to the qualified job seeker, since

Redirecting CGI error output from STDERR to a file (python AND perl)

与世无争的帅哥 提交于 2019-12-05 13:32:52
I'm moving a website to Hostmonster and asked where the server log is located so I can automatically scan it for CGI errors. I was told, "We're sorry, but we do not have cgi errors go to any files that you have access to." For organizational reasons I'm stuck with Hostmonster and this awful policy, so as a workaround I thought maybe I'd modify the CGI scripts to redirect STDERR to a custom log file. I have a lot of scripts (269) so I need an easy way in both Python and Perl to redirect STDERR to a custom log file. Something that accounts for file locking either explicitly or implicitly would

Is cgi dead? [closed]

陌路散爱 提交于 2019-12-05 13:25:36
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . Ok, let's put it in a more mildly: Is cgi (common gateway interface) legacy? yes? no? Under what circumstances would a project starting today (one that does noot have to interact with legacy systems or libraries) use cgi? 回答1: It's far from dead actually. Despite the

Segmenting AJAX responses in perl CGI?

这一生的挚爱 提交于 2019-12-05 12:33:30
Is it possible for a perl cgi script to segment its AJAX responses into numerous individual HTTP responses? Say I have this code: xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { onDataReceived(xmlhttp.responseText); } else if(xmlhttp.status!=200 && xmlhttp.status!=0) { } } xmlhttp.open("POST","script.cgi",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send(toURLString(options)); as javascript (dont tell me about xml object compatibility issues with ie, I know, and don't care)

How can I implement server-side rate limiting for a Perl web service?

蓝咒 提交于 2019-12-05 12:33:01
I have a Perl-based CGI/Fast CGI web service and want to rate-limit clients by IP address to stop aggressive clients causing too much work. I have looked around for some code and found Algorithm::TokenBucket in CPAN but that is for client requests; it has no persistence and has no per-user config so is not really useful for server-side rate limiting. I am looking for suggestions for something that already exists, otherwise I'll need to roll my own based on some simple persistence such as tie to DB_File per-IP address and some batch job that does the token management. I've used Cache::FastMmap