cgi

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 putting a "Timeout 120" directive in my A...

Creating SOAP web service for VC++ dll

I have been using a VC++ dll in a Dialog based application so far. Now, I am trying to provide the dll as a web service without re-writing or migrating the code. I was researching on various ways to set up the web service, I have setup the web service using C++ cgi in IIS. But it sounds like old way of doing things. My second option...

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=>$start_date}); print textfield({-name=>...

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, I like it better than php. The query wo...

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 this: use CGI; my $cgi = new CGI; print $c...

CGIemail script working in Safari but not Firefox or Opera

Here is the text file I am linking to: To: [email protected] Subject: DDD Message From: [name] Email: [emailaddress] Message: [comments] [$HTTP_USER_AGENT] and here is the html I am using: <form id="myform" action="http://darrondavisdesign.com/cgi-bin/cgiemail/cgiemail/myform.txt" method="post" enctype="text/plain" name="info" t...

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; my @time; my @data; my ($csv_file,...

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 equivalent of jsp:forward in CGI? [2] Suppose if fo...

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. Thanks... ...

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

Hello 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 by the way. But I guess the issue i...

Problem with digest authentication using .htaccess file.

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 server ... but not on my remote server (hoste...

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? ...

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. ...

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 <<"EOF"; <FORM ACTION=$ENV{'SCRIPT_NAME'} METHOD=POST>...

Help making my root directory not executable for CGI scripts

I'm trying to make the root directory for a virtual host so that it can execute CGI scripts. I put the following in my virtual host declaration: <VirtualHost *:80> <Directory /> Options +ExecCGI </Directory> DocumentRoot /path/to/root ServerName servername AddHandler cgi-script .pl </VirtualHost> But when I tr...

Is a cgi different from a console application?

I am having some problems in running cgi on my Apache (Windows, XAMPP), but the exe runs smoothly on the command prompt. Reading the logs on Apache folder it gives no information about the error. Any ideas about this? ...

How can I access parameters passed in the URL when a form is POSTed to my script?

I've run into an issue with mod_rewrite when submitting forms to our site perl scripts. If someone does a GET request on a page with a url such as http://www.example.com/us/florida/page-title, I rewrite that using the following rewrite rule which works correctly: RewriteRule ^us/(.*)/(.*)$ /cgi-bin/script.pl?action=Display page in this...

Why does my Perl CGI script showing up as plain text in the browser?

I've been playing around with making my mac a webserver, and now I'm trying to make a simple html form, and a perl script that prints out the input. I have /Library/WebServer/Documents symlinked to ~/Sites/, so I have my index.html and display.cgi both there. But when I press submit, the perl file just shows up as text. Any cgi file I ha...

Ruby CGI Stream Audio

What I want to do is use a CGI script (written in Ruby) to read a binary file off of the filesystem (audio, specifically) and stream it to the browser. This is how I am doing that so far, require 'config' ENV['REQUEST_URI'] =~ /\?(.*)$/ f= $config[:mdir] + '/' + $1.url_decode f = File.open f, 'rb' print "Content-Type: audio/mpeg\r\n"...

Can't see WSDL on Delphi CGI with IIS7

I created a very simple Delphi 2010 CGI web service and am able to get the exact same problem on Delphi 2007. My invokable interface looks like this: ISimpleTest = interface(IInvokable) ['{4E318A9A-D361-4A18-A963-EE6D7F70E9C5}'] function SayHello(const S: string; N: Integer): string; stdcall; end; And the function is implemented in...