I have a Perl CGI program in which I designed an HTML form.
If somebody clicks on a button in this form, a CGI/Perl subroutine in this file is executed.
Because I have more than one buttons in the form, I set their types as "Button", not "Submit".
This is a bookstore website, I have three buttons each for a kind of books (for example,...
Hello, I am writing a CGI script that will process form data, and it should print the name of the input, along with its value, in a table. When I have one or more values with the same name, the name should span rows to accommodate all values that correspond to that name. For example, if I have a name "color" with its values at "red", "gr...
I am trying to write a Perl script that takes data from a user, creates a HTML file on the basis of that data, redirects to this HTML file and then performs some computations. The problem I am facing is that the browser does not redirect to the new HTML page unless the computations are completed. Please suggest a solution.
...
I have this code:
use CGI;
use File::Basename;
use Image::Magick;
use Time::HiRes qw(gettimeofday);
my $query = new CGI;
my $upload_dir = "../images"; #location on our server
my $filename=$query->param("img");
my $timestamp = int (gettimeofday * 1000);
my ( $name, $path, $extension ) = fileparse ( $filena...
i have an applicaiton that runs at actionengineers.com:3000. How do i reqwite the application to a subdomain or directory (actionengineers.com/myapp) without disturbing the main site of course. i tried to use .htaccess file but i allways get eror 404. here is the code in the .htaccess file.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www...
I'm in a web scripting class, and honestly and unfortunately, it has come second to my networking and design and analysis classes. Because of this I find I encounter problems that may be mundane but can't find the solution to it easily.
I am writing a CGI form that is supposed to work with a MySQL DB. I can insert and delete into the DB...
Sometimes my media server does not update its database, the only way to fix it is to restart the daemon.
I would like users to be able to simply run an executable or script to do so without revealing any login information to them (which might result in inadvertent headaches).
I feel the easiest way to do this would be to have an exec...
The session loads fine for the most part but it is randomly clearing all of the data some times and I don't know why:
Create my new session:
$session = CGI::Session->new( "driver:file",undef,{Directory => '/tmp'} );
$session->param('logged_in', 1);
$session->expire('logged_in', '+10m');
$session->expire('+1h');
Now when I go to ano...
Is there a good reason why I shouldn't be mixing POST and GET?
For example:
<form action="http://example.com/?param1=foo&param2=bar" method="post">
...
It appears that a cgi app (in C, VS C++) does not inherit the COMSPEC environmental variable.
When adding the variable to the application:
_putenv( "COMSPEC=C:\\WINDOWS\\system32\\cmd.exe" ); // C4996
the cgi application no longer executes from the browser but is interpreted as a file for download. (i.e. - Save this file?)
My quest...
I have a C# program that is running as a CGI app in IIS on XP Pro SP3. It runs fine until I reference a library assembly class and use it in the program's code. If I run the CGI program by hand it loads and executes. But when it is run by IIS the referenced assembly fails to bind despite it being right in the same directory as the parent...
Hello everyone!
I am trying to pass arguments to this CGI form (http://www.westegg.com/inflation/) through the URL, so I don't have to manually type them in, and so that I can generate URLs through other means for faster use.
Here is the CGI form code from the site:
<form action="infl.cgi" method="post">
Enter the amount of money: <i...
Hi.
There is a CGI-script that provides some API for our customers. Call syntax is:
script.cgi?module=<str>&func=<str>[&other-options]
The task is to make different authentiction rules for different modules.
Optionally, it will be great to have nice URLs.
My config:
<VirtualHost *:80>
DocumentRoot /var/www/example
ServerNa...
I have to migrate a web server from Windows + IIS to Linux + Apache, but there are some webpages rely on .exe CGI applications (some financial calculators) to generate the outputs. Is there an easy way to get this job done?
BTW, I don't have the access to the source code of those .exe file. Even though I have, it would take a long time...
First, here is the code I am using (you'll need version 0.42 of HTTP::Server::Simple to run it):
#!/usr/bin/perl
package My::HTTP::Server;
use strict; use warnings;
use parent 'HTTP::Server::Simple::CGI';
sub handle_request {
my $server = shift;
my ($cgi) = @_;
print $cgi->header('text/plain'), $cgi->state, "\n";
}
packa...
I found the quoted text in Programming Python 3rd edition by Mark Lutz from Chapter 16: Server-Side Scripting (page 987):
Forms also include a method option to specify the encoding style to be used to send data over a socket to the target server machine. Here, we use the post style, which contacts the server and then ships it a strea...
I came across an approach to encode just the following 4 characters in the POST parameter's value: # ; & +. What problems can it cause, if any?
Personally I dislike such hacks. The reason why I'm asking about this one is that I have an argument with its inventor.
Update. To clarify, this question is about encoding parameters in the POS...
Hi, I want to write a header and footer perl scrip that will return the headers and footers of my individual webpages. I was assuming I would do some sort of include of that file in the part of the html file I want it to appear. Is that the way I should go about this, if so how do I do that? If anyone has any other suggestions for bet...
I'm having a bugger of a time with a CGI wrapper for PHP. I know very little about CGI and PHP as CGI.
Here's what I know about the system:
Solaris 10 on a 386
Suhosin
PHP normally running as CGI, with cgiwrap (http://cgiwrap.sourceforge.net/). I am not able to find an example wrapper.cgi on the server to look at.
Shared hosting (vi...
Hi,
I would like to automatically generate image from *.gv files in a browser.
I am using webdot CGI script to do this.
This works with URLs like these:
http://localhost/cgi-bin/webdot/path_to_file/file.gv.dot.png
location of the CGI script:
http://localhost/cgi-bin/webdot/
file to render:
/path_to_file/file.gv
rende...