Все вопросы: [cgi]

220 вопросов

похожие теги: cgi-bincgi-application
-1
голосов
1ответов
430 просмотров

How do I process the data submitted from HTML Form?

I have written code to create a form to select multiple values. Below are some lines of my code to create a form to select multiple values. my $parser = Text::CSV->new(); open($csv_fh, '<', $csv_file) or die $!; my @headers = $parser->column_names( $parser->getline($csv_fh) ); print ...

0
голосов
1ответов
36 просмотров

does cgi-bin have something like servlet filters

Does cgi scripts have something like servlet filters. I.e. a piece of code that is given the opportunity to see and or modify a request before and or after it is processes by the "real" script.

4
голосов
2ответов
5423 просмотров

python: interact with the session in cgi scripts

Can python cgi scripts write and read data to the session? If so how? Is there a high-level API or must I roll my own classes?

0
голосов
2ответов
1116 просмотров

Digest authentication refuses to accept valid credentials

I'm trying to protect a folder with Digest Authentication through a .htaccess file: AuthType Digest AuthName "Restricted Area" AuthUserFile /web/htdocs/www.domain.com/.../.htdigest Require valid-user I've created the file of passwords with the comand "htdigest". All works fine on my local ser...

0
голосов
1ответов
166 просмотров

CGI application throws “System.Security.Permissions.SecurityPermission”

I'm working on a simple .NET application which is supposed to run under IIS6 through CGI. First of all everything works great on my Windows 7 development machine under IIS 7.5. But I'm stuck with “System.Security.Permissions.SecurityPermission” under IIS6. I've already tried to sign the assembly...

1
голосов
4ответов
555 просмотров

How widespread is CGI usage today?

In a book I'm reading, the author says "Most dynamic Web pages on the Internet are created with CGI and scripting languages". This isn't true anymore, is it? Aren't other technologies like PHP or ASP more widely used than CGI nowadays? I'm not sure how to find out stats for something like this. T...

0
голосов
2ответов
633 просмотров

Is request forwarding possible when using CGI?

I'm writing a small content server as a web service. There are 2 units - one authenticates the application requesting content and when authentication succeeds, the request is forwarded to the other unit that serves the content. [1] If I want to do this using CGI scripts, is there any equivalen...

0
голосов
1ответов
2282 просмотров

How can I create an HTML drop-down menu from a CSV file in Perl?

I'm creating a web page to select some options from a CSV file: CSV File Sample: Time,h1,h2,h3,.... 00:00:00,n1,n2,n3..... .....so on h -> header n -> numbers Below is the Perl code subroutine I have written to filter the header and values and return: sub TimeData { use Text::CSV...

3
голосов
2ответов
2202 просмотров

Should I sanitize file upload input field in my Perl CGI HTML form?

I understand the need to sanitize inputs from a HTML form, but when I sanitized the file upload field in a recent module of mine, the file upload started failing. It's important to sanitize all form inputs, right? Even the special file upload field? My form output code looks something like t...

5
голосов
6ответов
281 просмотров

How do I serve image with Perl with some security and least resources?

I found some posts related here but, nothing right on.. I need to serve up an image (humm) "correctly" and using as little resources as possible. I was working on a sub (below) but, is not too resource friendly just by the fact I use CGI. That is just my assumption though. I am a Perl newbie but...

2
голосов
5ответов
674 просмотров

How do I validate dates in a Perl CGI-script?

I'm creating a small reporting script in Perl CGI. I want to have the start/end date there to filter the events on the report. So now I wonder how to validate the input in some easy, Perl-way. The way I generate the form with those fields is: print textfield({-name=>'start_date', -value...

2
голосов
2ответов
6729 просмотров

Make Apache wait longer before delivering HTTP 408 request timeout

My configuration: Apache 2.2.4 PHP 5.2.4 (fastCGI) Windows XP pro I have a script that takes more than a minute to run but after exactly 60 seconds (proven by Fiddler) the server always delivers a 408 timeout. My PHP max execution time is set to 120 seconds. After doing some reading I've tried...

0
голосов
4ответов
137 просмотров

What does a HTTP Request that references a file in the middle of the path?

I'm writting a HTTP server and when i tried the Serendipity PHP Blog i get requests from the browser like this one: GET /serendipity_admin.php/templates/default/admin/pluginmanager.css HTTP/1.1 The "/serendipity_admin.php" file does exist so the "/serendipity_admin.php/templates/default/admin/...

1
голосов
4ответов
786 просмотров

How can I get the browser's screen height?

Does anyone know how to get the screen height in a Perl CGI script? I know that Perl is a server-side language but is there any way to get the screen height (pixels) of the users screen? Thanks

1
голосов
2ответов
272 просмотров

CGI and PHP why? and when?

one day I chat with a experienced programmer about devloping file hosting system, he tell me it's need to use cgi in your program to work in best way. so what is cgi ? whay to use? and when?

1
голосов
1ответов
291 просмотров

CGI program that outputs a gif image, and other non-HTML content

I am writing a CGI program (in C++) that will output the following data in its response: (inline) GIF image (i.e. octect stream) JSON Javascript XHTML All the CGI examples I have seen are "trivial" and return only one data type. How can I return a response that contains all of the above ?

9
голосов
6ответов
31472 просмотров

internal server error (500) in simple cgi script

I am trying to run a simple cgi script after configuring my server. My script looks like this: print "Content-type: text/html" print print "<html><head><title>CGI</title></head>" print "<body>" print "hello cgi" print "</body>" print "</html>" W...

18
голосов
5ответов
3893 просмотров

Is cgi dead?

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?

2
голосов
4ответов
1628 просмотров

How to improve performance of python cgi that reads a big file and returns it as a download?

I have this python cgi script that checks if it hasn't been accessed to many times from the same IP, and if everything is ok, reads a big file form disk (11MB) and then returns it as a download. It works,but performance sucks. The bottleneck seems to be reading this huge file over and over: de...

0
голосов
1ответов
92 просмотров

Which version of Rebol 2 do I use on CentOS?

Can somebody please tell me which version of Rebol 2 to use on CentOS? There are a couple of Linux versions on this page: http://www.rebol.com/platforms.html I'm going to have a go at this tutorial: Quick and Easy CGI - A Beginner's Tutorial and Guide By Carl Sassenrath. Thanks

2
голосов
4ответов
373 просмотров

How do I create CGI scripts with Perl?

I am creating a website and done with some HTML stuff, but I am thinking to create site using CGI and Perl scripting. I don't have much idea on CGI scripting. Can anyone please suggest me how to create a CGI script and how to create web pages with that?

6
голосов
4ответов
1904 просмотров

What python web frameworks work well with CGI (e.g. on nearlyfreespeech.net)?

From nearlyfreespeech's website, they state that the following don't work well: mod_python Web application frameworks that depend on persistent processes, including: Ruby On Rails, Django, Zope, and others (some of these will run under CGI, but will run slowly and are suitable only for develop...

0
голосов
1ответов
1111 просмотров

Time out error while creating cgi.FieldStorage object

Hey, any idea about what is the timeout error which I am getting here: Error trace: File "/array/purato/python2.6/lib/python2.6/site-packages/cherrypy/_cprequest.py", line 606, in respond cherrypy.response.body = self.handler() ...

12
голосов
3ответов
6217 просмотров

Detecting the http request type (GET, HEAD, etc) from a python cgi

How can I find out the http request my python cgi received? I need different behaviors for HEAD and GET. Thanks!

1
голосов
3ответов
2133 просмотров

I want to start developing CGI, but I am very new at this

I want to develop my next web project in C++ as FastCGI but I don't know how to start and google wasn't very friendly about this. I really don't know much about fastCGI or others libraries that makes cgi persistent... Tried to read some stuff, but it seems to be used along Linux with all those .c...

18
голосов
2ответов
10855 просмотров

Python CGI returning an http status code, such as 403?

How can my python cgi return a specific http status code, such as 403 or 418? I tried the obvious (print "Status:403 Forbidden") but it doesn't work.

10
голосов
6ответов
1004 просмотров

How can I improve Moose performance in non-persistent CGI processes?

Moose is a fantastic object framework. The trouble is that, taken together with its dependencies, it's very big. Our profiling indicates that on our platform, simply loading Moose will incur a 5-6 second overhead on non-persistent CGI application scripts. That's just not acceptable for these o...

1
голосов
2ответов
1090 просмотров

http POST with asp.net

I've an annoying ASP.NET problem: I have a Perl script (see below), which gets the form_info variable. Now unfortunately, it's http POST, and not http GET, so Request.Querystring doesn't work... Now I have to replace the Perl Script with an asp.net page/app, but my problem is that I cannot proc...

2
голосов
2ответов
1586 просмотров

Apache CGI redirect to absolute URI doesn't work

I have Apache 2.2.13 running in console mode on Windows. I have made an executable that handles requests. In a certain case, when it detects a URL pointing to a directory but has not trailing slash, it tries to redirect to the same URL with the missing slash appended. The exit-code is set to 301....

0
голосов
5ответов
797 просмотров

How can I programmatically get the image on this page?

The URL http://www.fourmilab.ch/cgi-bin/Earth shows a live map of the Earth. If I issue this URL in my browser (FF), the image shows up just fine. But when I try 'wget' to fetch the same page, I fail! Here's what I tried first: wget -p http://www.fourmilab.ch/cgi-bin/Earth Thinking, that pr...