cgi

Handle Web Server with multiple clients

旧时模样 提交于 2019-12-12 01:57:44
问题 I am working on a web application which can serve only one client.Now I need to include functionality to serve multiple clients. For that one mechanism should be there in which all the clients can see OR will be notified if any changes are done by some another client in the application. So my job is now to notify all the clients once any changes are done from the back end by another client. I found one solution in which I will call one cgi script from javascript at a particular period of time

Subrequest for PHP-CGI

被刻印的时光 ゝ 提交于 2019-12-12 01:28:52
问题 virtual() can be used only when running PHP as an apache module. My shared hosting runs it as CGI so it doesn't work. Is there any other method to do it? Note: the subrequest is for static files that I'd like to let Apache serve (for performance, HTTP-headers caching, etc.). Right now this is handled by using an HTTP redirect (that I want to get rid of) issued by the PHP script. 回答1: If they're static files, why not just include() them? Forcing apache to make a subrequest seems like a waste.

LWP Get Large File Download Headers Missing

你。 提交于 2019-12-11 21:33:47
问题 This post is follow on work related to LWP GET large file download. That post was regarding an error from LWP when trying to pass arguments in the header incorrectly. Now I am posting the changes I made and how I am trying to debug the approach. This discussion should be very informative for those interested in POST vs GET header formation, and what the server receives while using the CGI package. It is not information easily found on the net. Here is my client code snip: my $bytes_received =

Debian + Lightppd + PHP 安装与配置

大兔子大兔子 提交于 2019-12-11 20:14:07
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 主题:Debian + Lightppd + PHP 安装与配置 时间:2009-12-09 作者:cookphp 部分依赖包 ------------------------------------------- apt-get install gcc apt-get install libxml2-dev apt-get install make ------------------------------------------- 一 lighttpd apt-get install lighttpd 二 php 1 下载 wget http://cn2.php.net/distributions/php-5.2.11.tar.gz 2 解压 tar -zxvf php-5.2.11.tar.gz 3 编译 ./configure --enable-fastcgi --enable-force-cgi-redirect make | make install 三 lighttpd + php 1 检查 php-cgi 是否已经安装 php-cgi -v -----------------------------------------------------------------------------

Missing output when running system command in perl/cgi file

∥☆過路亽.° 提交于 2019-12-11 20:11:05
问题 I need to write a CGI program and it will display the output of a system command: script.sh echo "++++++" VAR=$(expect -c " spawn ssh -o StrictHostKeyChecking=no $USER@$HOST $CMD match_max 100000 expect \"*?assword:*\" send -- \"$PASS\r\" send -- \"\r\" expect eof ") echo $VAR echo "++++++" In CGI file: my $command= "ksh ../cgi-bin/script.sh"; my @output= `$command`; print @output; Finally, when I run the CGI file in unix, the $VAR is a very long string including \n and some delimiters.

Why does my Perl CGI complain “Can't locate Mysql.pm”?

南楼画角 提交于 2019-12-11 17:52:38
问题 I have two folders php and perl . They contain index.php and index.pl , respectively. My Perl code looks like: #!/usr/bin/perl use Mysql; print "Content-type: text/html\n\n"; print "<h2>PERL-mySQL Connect</h2>"; print "page info"; $host = "localhost"; $database = "cdcol"; $user = "root"; $password = ""; $db = Mysql->connect($host, $database, $user, $password); $db->selectdb($database); When i run above code (by typing http://localhost:88/perl/ in the browser), I get the following error: Can't

Ajax readyState always equals one

女生的网名这么多〃 提交于 2019-12-11 17:50:43
问题 Hello I'm working with ajax that submits to a C++ cgi program. The problem that I am having is the readyState is always 1. I don't get what I am doing wrong. var asyncRequest; // XMLHttpRequest object try { asyncRequest = new XMLHttpRequest(); // Register event handler asyncRequest.onreadystatechange = StateChange; // Prepare to post data to URL asynchronously asyncRequest.open("POST", "save_vote.cgi", true); //Data to be sent to cgi program postData="star=1&movie=test"; // Set the

Different behavior of web app in different IE8 versions

有些话、适合烂在心里 提交于 2019-12-11 17:47:51
问题 I am facing a strange issue of different behavior of a same web application in different IE8 versions.One version is like IE 8 CO ( corporate administrator ) i.e version A and another is normal IE 8 version. i.e version B The issue is in version A, I am calling one cgi on the onload event which is responsible to flash a file on a board. But in vA it is not getting called at all which I can figure out from the logs of apache web server and also from internal logging methods. In case of vB, it

IP address of domain on shared host

廉价感情. 提交于 2019-12-11 17:42:21
问题 I have domain on a shared hosting provider. How do I find the direct IP address of my domain using Python? Is it possible to post to a script on my domain using the IP address and not the website itself? Thanks. 回答1: I guess the IP should be static so do you really need to look it up more than once? You need to specify the domain name so that the webserver knows which host configuration to use if you don't have a dedicated IP or your host is the default for that webserver 回答2: import socket

Improving the Secuity of a Python CGI Script that Creates User Accounts

五迷三道 提交于 2019-12-11 17:27:21
问题 Below is the code to a CGI script for the creation of user accounts. The script will check if a username for a new account is taken and will, if a the username is not taken, create a file with information (i.e. username and password) about a new user. Previously, a question was asked about giving CGI scripts created by this file certain privileges (link: Running a Python CGI Script with Sudo Privileges on the Apache Server). Feedback was given about potential security problems with this