running a cgi script even when browser is closed


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting running a cgi script even when browser is closed
# 1  
Old 03-03-2008
running a cgi script even when browser is closed

hii, i have a cgi script file which may take some hours to complete. The script logs the output and mails the user. so the browser need not be open for the output. But currently the script dies off the instant the browser is closed or other pages are viewed. Is there a way out .. ?

i have started a shell script which will exec this script file in background. But even then the script exits, when the browser is disturbed.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to convert my /bin/sh script with cgi and html to run it on browser!??

Hello, I want to run this script on my CentOS 6 via browser : ________________________________________________________________________________________________ #!/bin/sh echo Username? read MY_NAME echo Provisional file name? read MY_FILE echo File NAME you want to save? read MY_FILE2... (16 Replies)
Discussion started by: juta2020
16 Replies

2. IP Networking

Running process on a remote browser

Hello, I work on remote machine using the ssh protocol. I try to test a tool which is a process running on the port 5000. tcp 0 0 0.0.0.0:5000 0.0.0.0:* LISTEN 4386/python Tu visualise this process, i have to launch on http://0.0.0.0:5000/... (3 Replies)
Discussion started by: chercheur111
3 Replies

3. Web Development

problem with exporting vairable from one perl cgi to another perl cgi script while redirecting.

Can anyone tell me how to export a variable from one perl CGI script to another perl cgi script when using a redirect. Upon running the login.pl the user is prompted to enter user name and password. Upon entering the correct credentials (admin/admin) the user is redirected to welcome page. My... (3 Replies)
Discussion started by: Arun_Linux
3 Replies

4. UNIX for Dummies Questions & Answers

Running Putty from Browser

Hey All, My first posting around here, So please be patient with me. I dont have any rights on a computer that Im using right now & I was wondering if I can run putty session from the browser itself without downloading it. I looked up all over the web & I couldnt really see a place... (1 Reply)
Discussion started by: Fanxinu
1 Replies

5. UNIX for Advanced & Expert Users

My command is still running but someone closed my shell, can I get my output still?

I ran an fs_usage (based off dtrace facility) but someone closed the window I think.. But I still see the process running # 15023 I tried fg 15023 but it told me no job control.. Is there anyway I can see my output? The scan has been running an hour and the output is valuable to me. (3 Replies)
Discussion started by: glev2005
3 Replies

6. Linux

Configure apache to run with perl ... while running from browser it asks to save .pl

I have installed fedora 9 and trying to run .pl (perl files) from browser. I have below RPM installed: ---------------------------------- httpd-2.2.8-3.i386 mod_perl-2.0.3-21.i386 $cat /etc/httpd/conf.d/perl.conf LoadModule perl_module modules/mod_perl.so Alias /perl /var/www/perl... (4 Replies)
Discussion started by: sriram003
4 Replies

7. Solaris

my netscap browser automatically closed

Hi, i have just installed Sun Solaris 8 on the sun sparc server but when i run the browers and write a site to open it my browers automatically closed and when i run the browers window again it again automatically closed again. can any body help me to resolve this issue (1 Reply)
Discussion started by: adnangc
1 Replies

8. Shell Programming and Scripting

Running shell scripts from web browser

I am in need of a mechanism to run shell scripts from web browser. Could any one of you guide me as to which technology to choose? I have some scripts which take some arguments. Appreciate you response. (7 Replies)
Discussion started by: corleone
7 Replies

9. UNIX for Dummies Questions & Answers

Running cgi

I am learning about cgi and having lots of trouble. If I am on a server cs-srv2.(schoolname).edu and I want to run cgi script what would I need to do? By the way, I see $ on the command line when my server opens , if that makes a difference. I created a cgi-bin directory and put it in there. The... (3 Replies)
Discussion started by: CSGUY
3 Replies

10. Shell Programming and Scripting

CGI passing arrays/hashes to another CGI script

If I have a Perl CGI script (script01), which fills an array(s) with information and outputs a HTML page with a link to another CGI page (script02); is there anyway to pass the array(s) from "script01" to "script02" when the page visitor clicks the link? Hope that makes sense! :) (2 Replies)
Discussion started by: WIntellect
2 Replies
Login or Register to Ask a Question
Plack::App::CGIBin(3pm) 				User Contributed Perl Documentation				   Plack::App::CGIBin(3pm)

NAME
Plack::App::CGIBin - cgi-bin replacement for Plack servers SYNOPSIS
use Plack::App::CGIBin; use Plack::Builder; my $app = Plack::App::CGIBin->new(root => "/path/to/cgi-bin")->to_app; builder { mount "/cgi-bin" => $app; }; # Or from the command line plackup -MPlack::App::CGIBin -e 'Plack::App::CGIBin->new(root => "/path/to/cgi-bin")->to_app' DESCRIPTION
Plack::App::CGIBin allows you to load CGI scripts from a directory and convert them into a PSGI application. This would give you the extreme easiness when you have bunch of old CGI scripts that is loaded using cgi-bin of Apache web server. HOW IT WORKS
This application checks if a given file path is a perl script and if so, uses CGI::Compile to compile a CGI script into a sub (like ModPerl::Registry) and then run it as a persistent application using CGI::Emulate::PSGI. If the given file is not a perl script, it executes the script just like a normal CGI script with fork & exec. This is like a normal web server mode and no performance benefit is achieved. The default mechanism to determine if a given file is a Perl script is as follows: o Check if the filename ends with ".pl". If yes, it is a Perl script. o Open the file and see if the shebang (first line of the file) contains the word "perl" (like "#!/usr/bin/perl"). If yes, it is a Perl script. You can customize this behavior by passing "exec_cb" callback, which takes a file path to its first argument. For example, if your perl-based CGI script uses lots of global variables and such and are not ready to run on a persistent environment, you can do: my $app = Plack::App::CGIBin->new( root => "/path/to/cgi-bin", exec_cb => sub { 1 }, )->to_app; to always force the execute option for any files. AUTHOR
Tatsuhiko Miyagawa SEE ALSO
Plack::App::File CGI::Emulate::PSGI CGI::Compile Plack::App::WrapCGI See also Plack::App::WrapCGI if you compile one CGI script into a PSGI application without serving CGI scripts from a directory, to remove overhead of filesystem lookups, etc. perl v5.14.2 2011-11-02 Plack::App::CGIBin(3pm)