Sponsored Content
Operating Systems Linux Configure apache to run with perl ... while running from browser it asks to save .pl Post 302234018 by ankurjain on Tuesday 9th of September 2008 01:16:39 AM
Old 09-09-2008
i think the solution lies in the line starting with addhandler in the following

<Location /perl>
allow from all
SetHandler perl-script
AddHandler cgi-script .cgi .pl
#PerlHandler Apache::Registry
#PerlHandler Apache::PerlRun
PerlResponseHandler ModPerl::PerlRun
Options +ExecCGI
PerlSendHeader On
</Location>

tryout and post the results ...

-Regards
AJ
 

10 More Discussions You Might Find Interesting

1. Cybersecurity

Run browser over VPN

Dear All , I have a web Application which I used in my work it's installed on an AIX machine . I need to access this application from my home when I connect to my work via VPN , but the browser not work at all . I did a work around by installing mozilla broswer on the AIX machine and make... (2 Replies)
Discussion started by: habuzahra
2 Replies

2. UNIX for Advanced & Expert Users

configure php with postgresql and apache

Hi, I'm trying to configure php4 to run alongside postgresql and apache. Postgres and apache are already installed and running, but I am getting an error when doing: host84:~/php-4.4.9#./configure --with-apache=/usr/local/apache --with-postgresql=/usr/local/pgsql loading cache ./config.cache... (5 Replies)
Discussion started by: sdbeng
5 Replies

3. Linux

Configure apache prefork MPM

Hello, i want to know the basics to configure prefork.c module to high Apache performance and i think it's depends on the server hardware details (RAM and Processors) Thanks :) (0 Replies)
Discussion started by: LinuxCommandos
0 Replies

4. UNIX for Dummies Questions & Answers

run shell script from browser

my shell script is to reset user menu: #!/bin/ksh echo "Type in login id: \c" read username if then echo "....." echo "You have not entered any INPUT value." echo "...Goodbye..." sleep 10 exit else echo $username rm -f... (3 Replies)
Discussion started by: tjmannonline
3 Replies

5. Solaris

Apache 2 configure not recognizing options

Hello all. I am trying to compile Apache 2 (again!) and the configure script keeps telling me it does not recognize the options. Everything I am including is in the --help list. For example: --enable-so. First I will put in the LD flags, then configure with the --enable-so option. ... (2 Replies)
Discussion started by: RobertSubnet
2 Replies

6. Shell Programming and Scripting

Save cURL verbose output to file or do it like browser "save as.."

hi there ! i have exactly the same problem like this guy here https://www.unix.com/shell-programming-scripting/127668-getting-curl-output-verbose-file.html i am not able to save the curl verbose output.. the sollution in this thread (redirecting stderr to a file) does not work for me.... (0 Replies)
Discussion started by: crabmeat
0 Replies

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

8. IP Networking

configure apache to work with ssl

Hi, I need help to configure the apache to work with ssl. I have managed to create self-signed certificate according to the instruction in the following link. So I have the crt file and the key file. however when I add: <Virtualhost *:443> SSLEngine on ... (1 Reply)
Discussion started by: programAngel
1 Replies

9. AIX

Can I run this thing in a web browser?

Old AS/400 guy here now administering an AIX system. We have an application that runs on 3151 emulator. Is it possible via an program or other to run a 3151 session in a web browser? I would like to have some of my user be able to work from home without having to install an emulation program, and... (1 Reply)
Discussion started by: jeveretts
1 Replies

10. SCO

How to Launch Apache Web Browser?

This should be trivial, but it's not. I have Apache installed and running on my SCO UNIX OpenServer 5.0.7 system; Apache says its enabled and started. But I cannot for the life of me figure out how to launch it from a command line or from X-Windows! Maybe JTG or someone else knows the answer.... (2 Replies)
Discussion started by: Transpower
2 Replies
libapache2-mod-perl2-2.0.7::docs::api::ModPerl::RegistryUser)Contributed Perl Documenlibapache2-mod-perl2-2.0.7::docs::api::ModPerl::Registry(3pm)

NAME
ModPerl::Registry - Run unaltered CGI scripts persistently under mod_perl Synopsis # httpd.conf PerlModule ModPerl::Registry Alias /perl/ /home/httpd/perl/ <Location /perl> SetHandler perl-script PerlResponseHandler ModPerl::Registry #PerlOptions +ParseHeaders #PerlOptions -GlobalRequest Options +ExecCGI </Location> Description URIs in the form of "http://example.com/perl/test.pl" will be compiled as the body of a Perl subroutine and executed. Each child process will compile the subroutine once and store it in memory. It will recompile it whenever the file (e.g. test.pl in our example) is updated on disk. Think of it as an object oriented server with each script implementing a class loaded at runtime. The file looks much like a "normal" script, but it is compiled into a subroutine. For example: my $r = Apache2::RequestUtil->request; $r->content_type("text/html"); $r->print("mod_perl rules!"); XXX: STOPPED here. Below is the old Apache::Registry document which I haven't worked through yet. META: document that for now we don't chdir() into the script's dir, because it affects the whole process under threads. "ModPerl::RegistryPrefork" should be used by those who run only under prefork MPM. This module emulates the CGI environment, allowing programmers to write scripts that run under CGI or mod_perl without change. Existing CGI scripts may require some changes, simply because a CGI script has a very short lifetime of one HTTP request, allowing you to get away with "quick and dirty" scripting. Using mod_perl and ModPerl::Registry requires you to be more careful, but it also gives new meaning to the word "quick"! Be sure to read all mod_perl related documentation for more details, including instructions for setting up an environment that looks exactly like CGI: print "Content-type: text/html "; print "Hi There!"; Note that each httpd process or "child" must compile each script once, so the first request to one server may seem slow, but each request there after will be faster. If your scripts are large and/or make use of many Perl modules, this difference should be noticeable to the human eye. DirectoryIndex If you are trying setup a DirectoryIndex under a Location covered by ModPerl::Registry* you might run into some trouble. META: if this gets added to core, replace with real documenation. See http://marc.theaimsgroup.com/?l=apache-modperl&m=112805393100758&w=2 Special Blocks "BEGIN" Blocks "BEGIN" blocks defined in scripts running under the "ModPerl::Registry" handler behave similarly to the normal mod_perl handlers plus: o Only once, if pulled in by the parent process via "Apache2::RegistryLoader". o An additional time, once per child process or Perl interpreter, each time the script file changes on disk. "BEGIN" blocks defined in modules loaded from "ModPerl::Registry" scripts behave identically to the normal mod_perl handlers, regardless of whether they define a package or not. "CHECK" and "INIT" Blocks Same as normal mod_perl handlers. "END" Blocks "END" blocks encountered during compilation of a script, are called after the script has completed its run, including subsequent invocations when the script is cached in memory. This is assuming that the script itself doesn't define a package on its own. If the script defines its own package, the "END" blocks in the scope of that package will be executed at the end of the interpretor's life. "END" blocks residing in modules loaded by registry script will be executed only once, when the interpreter exits. Security "ModPerl::Registry::handler" performs the same sanity checks as mod_cgi does, before running the script. Environment The Apache function `exit' overrides the Perl core built-in function. Commandline Switches In First Line Normally when a Perl script is run from the command line or under CGI, arguments on the `#!' line are passed to the perl interpreter for processing. "ModPerl::Registry" currently only honors the -w switch and will enable the "warnings" pragma in such case. Another common switch used with CGI scripts is -T to turn on taint checking. This can only be enabled when the server starts with the configuration directive: PerlSwitches -T However, if taint checking is not enabled, but the -T switch is seen, "ModPerl::Registry" will write a warning to the error_log file. Debugging You may set the debug level with the $ModPerl::Registry::Debug bitmask 1 => log recompile in errorlog 2 => ModPerl::Debug::dump in case of $@ 4 => trace pedantically Caveats ModPerl::Registry makes things look just the CGI environment, however, you must understand that this *is not CGI*. Each httpd child will compile your script into memory and keep it there, whereas CGI will run it once, cleaning out the entire process space. Many times you have heard "always use "-w", always use "-w" and 'use strict'". This is more important here than anywhere else! Some other important caveats to keep in mind are discussed on the Perl Reference page. Authors Andreas J. Koenig, Doug MacEachern and Stas Bekman. See Also "ModPerl::RegistryCooker", "ModPerl::RegistryBB" and "ModPerl::PerlRun". perl v5.14.2 2013-03-12 libapache2-mod-perl2-2.0.7::docs::api::ModPerl::Registry(3pm)
All times are GMT -4. The time now is 03:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy