I am using Apache 1.3.33 and mod_perl 1.26 under Macintosh machine.
does this configuration is creating problem??
Even I am able to print messages just bu using CGI::Application with CGI i.e
using ScriptAlias.
I am unable to print them when configured CGI::Application with mod_perl i.e
using Alias and when I set it to Apache::Registry
I am strongly suspecting that it is due to Macintosh
And one more thing, when I added PerlOptions attribute, the conf is showing
as syntax error:
Enterprise:/etc/httpd root# apachectl configtest
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/csparrow.conf
Processing config file: /private/etc/httpd/users/dileep.conf
Processing config file: /private/etc/httpd/users/roderick.conf
Processing config file: /private/etc/httpd/users/webdeveloper.conf
[Mon Oct 29 11:19:55 2007] [warn] module mod_php4.c is already added,
skipping
Syntax error on line 1132 of /etc/httpd/httpd.conf:
Invalid command 'PerlOptions', perhaps mis-spelled or defined by a module
not included in the server configuration
Anthony Gardner wrote:
>
> Dileep, sorry for the delay in answering but I had to do fresh installs
> after a recent ubuntu upgrade.
>
> Okay, with a fresh, default Apache2/MP2 install (from source) I can easily
> print using CGI::Application
>
> <Directory "/opt/httpd/cgi-bin">
> SetHandler perl-script
> PerlResponseHandler ModPerl::Registry
> PerlOptions +ParseHeaders
> Options +ExecCGI
>
> AllowOverride None
> ##Options None
> Order allow,deny
> Allow from all
> </Directory>
>
> #!/usr/bin/perl
>
> use strict;
> use lib '/opt/httpd/cgi-bin';
>
> use MyTest;
> my $app = MyTest->new();
> $app->run()
>
>
> package MyTest;
>
> use strict;
> use base 'CGI::Application';
>
> sub setup {
> my $self = shift;
> $self->start_mode('mode1');
> $self->run_modes( 'mode1' => 'greet',);
>
> }
>
> sub greet {
> my $self = shift;
> my $q = $self->query();
>
> my $output = '';
> $output .= $q->start_html(-title => 'MyTest');
>
> foreach my $key ( keys %ENV ) {
> $output .= "$key => $ENV{$key}<br/>";
> }
>
> $output .= 'Hello, world!!';
> $output .= $q->end_html();
>
> return $output;
> }
>
>
> 1;
>
>
> I guess this isn;t what you wanted to hear. Maybe my config will help.
>
> -Ants
>
>
>
>
>
> Dileep Eduri <[EMAIL PROTECTED]> wrote:
> I added PerlSendHeader Off to config file and removed send_http_header
> call
> and print call.
> Now I am returning $var.
>
> Nothing got printed...
> Thanks
>
>
> Michael Peters wrote:
>>
>>
>>
>> Dileep Eduri wrote:
>>> No change. still getting headers in browser.
>>> this one is pretty annoying.
>>
>> Make that change to your config, take out the send_http_headers and the
>> CGI->print().
>>
>> --
>> Michael Peters
>> Developer
>> Plus Three, LP
>>
>>
>>
>
>
> -----
>
> With Best regards,
> Dileep.
>
> ***************************************************
>
> --
> View this message in context:
> http://www.nabble.com/mod_perl-and-CGI%3A%3AApplication..-Strange-Behaviour-tf4697759.html#a13435321
> Sent from the mod_perl - General mailing list archive at Nabble.com.
>
>
>
>
> Disclaimer: Technically, I'm always wrong!!
>
> ---------------------------------
> For ideas on reducing your carbon footprint visit Yahoo! For Good this
> month.
>
-----
With Best regards,
Dileep.
***************************************************
--
View this message in context:
http://www.nabble.com/mod_perl-and-CGI%3A%3AApplication..-Strange-Behaviour-tf4697759.html#a13469807
Sent from the mod_perl - General mailing list archive at Nabble.com.