cgi

What's the best way to write a Perl CGI application?

匆匆过客 提交于 2019-12-03 12:55:16
Every example I've seen of CGI/Perl basically a bunch of print statements containing HTML, and this doesn't seem like the best way to write a CGI app. Is there a better way to do this? Thanks. EDIT: I've decided to use CGI::Application and HTML::Template, and use the following tutorial: http://docs.google.com/View?docid=dd363fg9_77gb4hdh7b . Thanks! Absolutely (you're probably looking at tutorials from the 90s). You'll want to pick a framework. In Perl-land these are the most popular choices: CGI::Application - very lightweight with lots of community plugins Catalyst - heavier with more bells

Any good C/C++ web toolkit? [closed]

為{幸葍}努か 提交于 2019-12-03 12:23:50
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. I've been looking around and came across the WT toolkit, Is it stable? Any good? I was stumped on how to go about this in C++, given the lack of libraries and resources concerning web developement. (CGI/Apache) The purpose of my application is to populate some data from a Sybase ASE15 database running GNU/Linux & Apache Hence allow some user interactions. I am going to use Sybase open client library (libct) to retrieve

Apache (2) throws “No such file or directory: exec of '/usr/lib/cgi-bin/fst.cgi' failed”

孤者浪人 提交于 2019-12-03 10:37:30
I am working in Ubuntu 10.10 (Maverick Meerkat) and running my CGI script under Apache , but it is showing me the following error... [Sat errorNo such file or directory: exec of '/usr/lib/cgi-bin/fst.cgi' failed [Sat Oct 22 02:56:45 2011] [error] [client 127.0.0.1] Premature end of script headers: fst.cgi My script is #!/usr/bin/perl print "Content-type:text/html\n\n"; print "hello world"; I have set the permissions of the file... I have also added the following line in file apache.conf : ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory /usr/lib/cgi-bin/> Options +ExecCGI </Directory>

Tomcat7 开启CGI,并配置awstats日志监控(转载,并完善内容)

半世苍凉 提交于 2019-12-03 09:30:07
1. 搭建环境 Apache Tomcat 7.x JDK 1.6+ Perl 5.2+ (awstats是使用perl开发的) Linux (自带Perl环境) 2. 修改<Tomcat_HOME>\conf\web.xml配置文件,取消 cgi servlet 和对应的 mapping 注释,让Tomcat支持cgi程序执行: <servlet> <servlet-name>cgi</servlet-name> <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> <init-param> <param-name>cgiPathPrefix</param-name> <param-value>WEB-INF/cgi</param-value> </init-param> <init-param> <param-name>passShellEnvironment</param-name> <param-value>true</param-value> </init-param> <load-on-startup>5<

Apache CGI in user directory “End of script output before headers”

≡放荡痞女 提交于 2019-12-03 09:14:22
I know there are some questions about this topic, but none seems to solve my issue. See this or this or this . I'm on Linux, Fedora21, and I'm trying to enable per user directory CGI script. I followed these instructions, but without success. I get the error: [cgi:error] End of script output before headers: test.cgi test.cgi is an executable sh file, containing a very simple script: #!/usr/bin/sh echo "Content-type: text/plain" echo "" echo "Hello" which has executable flag and runs without problems from shell. I also tried with Python: same result. I also disabled selinux for good measure. I

“…/auto/List/Util/Util.so: undefined symbol: PL_stack_sp at …/XSLoader.pm” only when running test suite with CGI::Test _and_ on Travis CI

匿名 (未验证) 提交于 2019-12-03 08:59:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a Perl module called CGI::Github::Webhook whose test suite works fine on Travis CI so far on the branch master . But since it's a module for writing CGI scripts, I wanted to test it with CGI::Test as this would be closer to real-life scenarios. But every Travis CI run in the branch cgi-test failed so far . Except for the runs with Perl 5.24 and above, every failed run contained these lines, just with different Perl version numbers in the paths: Attempt to reload List/Util.pm aborted. Compilation failed in require at /home/travis/perl5

Is PHP or vanilla Perl CGI faster?

匿名 (未验证) 提交于 2019-12-03 08:56:10
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm developing a web app for an Apache shared hosting server. I have already written some code in Perl but I recently found out, to my surprise, the shared hosting provider does not provided mod_perl or a way to install it. I have been a bit worried that running a Perl web app through CGI without mod_perl would make it very slow? Should I switch all of my code to PHP instead, would that be faster? The reason I chose Perl in the first place is, I'm very familiar with Perl more than PHP. Also I wanted to be able to use my Perl

Lighttpd and cgi python

匿名 (未验证) 提交于 2019-12-03 08:54:24
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to execute some python scripts through lighttpd but when I try to run it, I only get a blank file which I'm asked to download. lighttpd.conf server.modules = ( "mod_access", "mod_alias", "mod_accesslog", "mod_compress", "mod_rewrite" ) server.port = 8080 server.bind = "127.0.0.1" server.document-root = "/var/www" server.upload-dirs = ( "/var/cache/lighttpd/uploads" ) server.errorlog = "/var/log/lighttpd/error.log" server.pid-file = "/var/run/lighttpd.pid" server.username = "www-data" server.groupname = "www-data" index-file.names

Java CGI vs. Servlets [closed]

陌路散爱 提交于 2019-12-03 08:51:58
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . What are the main differences between CGI and Java servlets? 回答1: Servlets are run in one process (HTTP server with additional

what is cgi programming

匿名 (未验证) 提交于 2019-12-03 08:36:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: What is exactly meant by CGI programming . If I am writing a cgi program in 'C' , in that context , what does the 'cgi' mean ? Is the servelt environment is an abstraction of classical cgi programming ? 回答1: Abbreviation of Common Gateway Interface, a specification for transferring information between a World Wide Web server and a CGI program. A CGI program is any program designed to accept and return data that conforms to the CGI specification. The program could be written in any programming language, including C, Perl, Java, or Visual