You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by as...@epfl.ch on 2004/11/06 11:01:06 UTC
CGI_GATEWAY - modperl version 2
Hi,
I have probelms with modperl installation; have read through the manuals and
also mailing lists but was not able to solve the probelm. Any help will be
highly appreciated :)
I installed modperl and apache, and configured it in httpd.conf like
LoadModule perl_module modules/mod_perl.so
PerlModule Apache2
Alias /perl/ /programs/apache/perl/
<Location /perl/>
SetHandler perl-script
PerlHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
</Location>
When my server starts ; I see following messages;
Apache/2.0.52 (Unix) mod_perl/1.99_17 Perl/v5.8.0 mod_ssl/2.0.52 OpenSSL/0.9.7a
configured -- resuming normal operations
I tried to execute perl scripts from the /perl dir and it works. But when I
print the environment; the GATEWAY_INTERFACE prints CGI/1.1. I beleive something
is wrong somewhere; I tried different things as mentioned in mod_perl 2 server
configuration document from Apache but was not able to solve it.
Following is the print of env variables;
'SCRIPT_NAME' => '/perl/test.pl',
'SERVER_NAME' => 'localhost',
'SERVER_ADMIN' => 'you@example.com',
'HTTP_ACCEPT_ENCODING' => 'gzip,deflate',
'HTTP_CONNECTION' => 'keep-alive',
'REQUEST_METHOD' => 'GET',
'HTTP_ACCEPT' =>
'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1',
'SCRIPT_FILENAME' => '/programs/apache/perl/test.pl',
'SERVER_SOFTWARE' => 'Apache/2.0.52 (Unix) mod_perl/1.99_17 Perl/v5.8.0
mod_ssl/2.0.52 OpenSSL/0.9.7a',
'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'QUERY_STRING' => '',
'REMOTE_PORT' => '33708',
'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3)
Gecko/20040803',
'SERVER_PORT' => '80',
'SERVER_SIGNATURE' => '<address>Apache/2.0.52 (Unix) mod_perl/1.99_17
Perl/v5.8.0 mod_ssl/2.0.52 OpenSSL/0.9.7a Server at localhost Port 80</address>
',
'HTTP_CACHE_CONTROL' => 'max-age=0',
'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5',
'REMOTE_ADDR' => '127.0.0.1',
'HTTP_KEEP_ALIVE' => '300',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'PATH' =>
'/programs/apache/bin:/download/j2sdk1.4/bin:/bin:/download/j2sdk1.4/bin/://download/tomcat_old/bin:/programs/ant-1.6.2/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/programs/root/bin',
'REQUEST_URI' => '/perl/test.pl',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'SERVER_ADDR' => '127.0.0.1',
'DOCUMENT_ROOT' => '/programs/apache/htdocs',
'HTTP_HOST' => 'localhost:80',
'MOD_PERL' => 'mod_perl/1.99_17'
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: CGI_GATEWAY - modperl version 2
Posted by Markus Wichitill <ma...@gmx.de>.
> I tried to execute perl scripts from the /perl dir and it works. But when I
> print the environment; the GATEWAY_INTERFACE prints CGI/1.1. I beleive something
> is wrong somewhere; I tried different things as mentioned in mod_perl 2 server
> configuration document from Apache but was not able to solve it.
http://perl.apache.org/docs/2.0/user/porting/compat.html#C__ENV_GATEWAY_INTERFACE__
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: CGI_GATEWAY - modperl version 2
Posted by Tom Schindl <to...@gmx.at>.
asif.jan@epfl.ch wrote:
>
>'SCRIPT_NAME' => '/perl/test.pl',
>'SERVER_NAME' => 'localhost',
>'SERVER_ADMIN' => 'you@example.com',
>'HTTP_ACCEPT_ENCODING' => 'gzip,deflate',
>'HTTP_CONNECTION' => 'keep-alive',
>'REQUEST_METHOD' => 'GET',
>'HTTP_ACCEPT' =>
>'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1',
>
>'SCRIPT_FILENAME' => '/programs/apache/perl/test.pl',
>'SERVER_SOFTWARE' => 'Apache/2.0.52 (Unix) mod_perl/1.99_17 Perl/v5.8.0
>mod_ssl/2.0.52 OpenSSL/0.9.7a',
>
>'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
>'QUERY_STRING' => '',
>'REMOTE_PORT' => '33708',
>'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3)
>Gecko/20040803',
>'SERVER_PORT' => '80',
>'SERVER_SIGNATURE' => '<address>Apache/2.0.52 (Unix) mod_perl/1.99_17
>Perl/v5.8.0 mod_ssl/2.0.52 OpenSSL/0.9.7a Server at localhost Port 80</address>
>',
> 'HTTP_CACHE_CONTROL' => 'max-age=0',
>'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5',
> 'REMOTE_ADDR' => '127.0.0.1',
>'HTTP_KEEP_ALIVE' => '300',
>'SERVER_PROTOCOL' => 'HTTP/1.1',
> 'PATH' =>
>'/programs/apache/bin:/download/j2sdk1.4/bin:/bin:/download/j2sdk1.4/bin/://download/tomcat_old/bin:/programs/ant-1.6.2/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/programs/root/bin',
>
>'REQUEST_URI' => '/perl/test.pl',
>'GATEWAY_INTERFACE' => 'CGI/1.1',
>'SERVER_ADDR' => '127.0.0.1',
>'DOCUMENT_ROOT' => '/programs/apache/htdocs',
>'HTTP_HOST' => 'localhost:80',
>'MOD_PERL' => 'mod_perl/1.99_17'
>
>
>
and what's wrong about that?
Tom
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: CGI_GATEWAY - modperl version 2
Posted by Cure <cu...@cureable.com>.
Thxs Stas for the right answer. I thought => I was right sorry :)
I never knew that PerlHandler would work in mod_perl 2. Good to know, thxs
Stas Bekman wrote:
> Cure wrote:
>
>> PerlHandler is a mod_perl 1 directive.
>>
>> PerlResponseHnalder is a mod_perl 2 directive.
>
>
> Both work just fine under mp2, unless compiled with MP_COMPAT_1X=0
> http://perl.apache.org/docs/2.0/user/install/install.html#MP_COMPAT_1X
>
>> replace --> PerlHandler ModPerl::Registry with
>> PerlResponseHandler ModPerl::Registry
>
>
> It won't make any difference to the asked question :) The link posted
> earlier:
> http://perl.apache.org/docs/2.0/user/porting/compat.html#C__ENV_GATEWAY_INTERFACE__
>
> is the right answer...
>
>
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: CGI_GATEWAY - modperl version 2
Posted by Stas Bekman <st...@stason.org>.
Cure wrote:
> PerlHandler is a mod_perl 1 directive.
>
> PerlResponseHnalder is a mod_perl 2 directive.
Both work just fine under mp2, unless compiled with MP_COMPAT_1X=0
http://perl.apache.org/docs/2.0/user/install/install.html#MP_COMPAT_1X
> replace --> PerlHandler ModPerl::Registry with
> PerlResponseHandler ModPerl::Registry
It won't make any difference to the asked question :) The link posted earlier:
http://perl.apache.org/docs/2.0/user/porting/compat.html#C__ENV_GATEWAY_INTERFACE__
is the right answer...
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: CGI_GATEWAY - modperl version 2
Posted by Cure <cu...@cureable.com>.
PerlHandler is a mod_perl 1 directive.
PerlResponseHnalder is a mod_perl 2 directive.
replace --> PerlHandler ModPerl::Registry with
PerlResponseHandler ModPerl::Registry
asif.jan@epfl.ch wrote:
>Hi,
>I have probelms with modperl installation; have read through the manuals and
>also mailing lists but was not able to solve the probelm. Any help will be
>highly appreciated :)
>
>I installed modperl and apache, and configured it in httpd.conf like
>
>LoadModule perl_module modules/mod_perl.so
>PerlModule Apache2
>
>Alias /perl/ /programs/apache/perl/
><Location /perl/>
> SetHandler perl-script
> PerlHandler ModPerl::Registry
> PerlOptions +ParseHeaders
> Options +ExecCGI
></Location>
>
>When my server starts ; I see following messages;
>Apache/2.0.52 (Unix) mod_perl/1.99_17 Perl/v5.8.0 mod_ssl/2.0.52 OpenSSL/0.9.7a
>configured -- resuming normal operations
>
>I tried to execute perl scripts from the /perl dir and it works. But when I
>print the environment; the GATEWAY_INTERFACE prints CGI/1.1. I beleive something
>is wrong somewhere; I tried different things as mentioned in mod_perl 2 server
>configuration document from Apache but was not able to solve it.
>
>Following is the print of env variables;
>
>
>'SCRIPT_NAME' => '/perl/test.pl',
>'SERVER_NAME' => 'localhost',
>'SERVER_ADMIN' => 'you@example.com',
>'HTTP_ACCEPT_ENCODING' => 'gzip,deflate',
>'HTTP_CONNECTION' => 'keep-alive',
>'REQUEST_METHOD' => 'GET',
>'HTTP_ACCEPT' =>
>'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1',
>
>'SCRIPT_FILENAME' => '/programs/apache/perl/test.pl',
>'SERVER_SOFTWARE' => 'Apache/2.0.52 (Unix) mod_perl/1.99_17 Perl/v5.8.0
>mod_ssl/2.0.52 OpenSSL/0.9.7a',
>
>'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
>'QUERY_STRING' => '',
>'REMOTE_PORT' => '33708',
>'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3)
>Gecko/20040803',
>'SERVER_PORT' => '80',
>'SERVER_SIGNATURE' => '<address>Apache/2.0.52 (Unix) mod_perl/1.99_17
>Perl/v5.8.0 mod_ssl/2.0.52 OpenSSL/0.9.7a Server at localhost Port 80</address>
>',
> 'HTTP_CACHE_CONTROL' => 'max-age=0',
>'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5',
> 'REMOTE_ADDR' => '127.0.0.1',
>'HTTP_KEEP_ALIVE' => '300',
>'SERVER_PROTOCOL' => 'HTTP/1.1',
> 'PATH' =>
>'/programs/apache/bin:/download/j2sdk1.4/bin:/bin:/download/j2sdk1.4/bin/://download/tomcat_old/bin:/programs/ant-1.6.2/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/programs/root/bin',
>
>'REQUEST_URI' => '/perl/test.pl',
>'GATEWAY_INTERFACE' => 'CGI/1.1',
>'SERVER_ADDR' => '127.0.0.1',
>'DOCUMENT_ROOT' => '/programs/apache/htdocs',
>'HTTP_HOST' => 'localhost:80',
>'MOD_PERL' => 'mod_perl/1.99_17'
>
>
>
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html