Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

headers_out

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


woff3_ at hotmail

Dec 1, 2007, 5:56 AM

Post #1 of 6 (4107 views)
Permalink
headers_out

Hi.

I had Apache 2.0 and mod_perl.

Now I upgraded to Apache 2.2.6 and mod_perl2.

I have html-pages where I use mason code.

[code]
$r->header_out("Refresh" => "5; url=$url");
This code worked fine in my previous system.
Now when run my application, I get this error:
Can't locate object method "header_out" via package"Apache::RequestRec"
[/code]

This is strange error, because in my httpd.conf file
I haven't load module Apache::RequestRec

I have load just these modules:
[code]
PerlModule Apache2::AuthCookieDBI
PerlModule Apache2::DBI
PerlModule HTML::Mason::ApacheHandler
PerlModule Apache2::Request
PerlModule Config2::IniFiles
[/code]

Does someone information, how I could fix this problem?
--
View this message in context: http://www.nabble.com/headers_out-tf4928260.html#a14105449
Sent from the mod_perl - General mailing list archive at Nabble.com.


roberto at connexer

Dec 1, 2007, 6:14 AM

Post #2 of 6 (3988 views)
Permalink
Re: headers_out [In reply to]

On Sat, Dec 01, 2007 at 05:56:31AM -0800, Woff3 wrote:
>
> Hi.
>
> I had Apache 2.0 and mod_perl.
>
> Now I upgraded to Apache 2.2.6 and mod_perl2.
>
> I have html-pages where I use mason code.
>
> [code]
> $r->header_out("Refresh" => "5; url=$url");
> This code worked fine in my previous system.
> Now when run my application, I get this error:
> Can't locate object method "header_out" via package"Apache::RequestRec"
> [/code]
>
> This is strange error, because in my httpd.conf file
> I haven't load module Apache::RequestRec
>
> I have load just these modules:
> [code]
> PerlModule Apache2::AuthCookieDBI
> PerlModule Apache2::DBI
> PerlModule HTML::Mason::ApacheHandler
> PerlModule Apache2::Request
> PerlModule Config2::IniFiles
> [/code]
>
> Does someone information, how I could fix this problem?

Have you tried adding "PerlModule Apache2::compat" in your httpd.conf?

Regards,

-Roberto
--
Roberto C. Sánchez
http://people.connexer.com/~roberto
http://www.connexer.com
Attachments: signature.asc (0.18 KB)


adam.prime at utoronto

Dec 1, 2007, 7:17 AM

Post #3 of 6 (3991 views)
Permalink
Re: headers_out [In reply to]

Roberto C. Sánchez wrote:
>
> Have you tried adding "PerlModule Apache2::compat" in your httpd.conf?
>

Or you can use $r->headers_out. $r->header_out is no longer supported. see:

http://perl.apache.org/docs/2.0/user/porting/compat.html#C__r_E_gt_err_header_out_

Adam


gozer at ectoplasm

Dec 2, 2007, 10:51 PM

Post #4 of 6 (3982 views)
Permalink
Re: headers_out [In reply to]

Woff3 wrote:
> Hi.
>
> I had Apache 2.0 and mod_perl.

You possibly meant Apache 1.3.xx and mod_perl-1.xx ?

> Now I upgraded to Apache 2.2.6 and mod_perl2.
>
> I have html-pages where I use mason code.
>
> [code]
> $r->header_out("Refresh" => "5; url=$url");
> This code worked fine in my previous system.
> Now when run my application, I get this error:
> Can't locate object method "header_out" via package"Apache::RequestRec"
> [/code]

Have you tried preloading Apache2::RequestRec ?

PerlModule Apache2::RequestRec

(http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html#C_headers_out_)

And to improve the odds of folks being able to assist, try
and copy error messages verbatim, instead of paraphrasing them.

When migrating from mod_perl-1.x to 2.x you'll run into various little
annoyances like the one you are reporting. The whole process if fairly
well documented, and your exact issue is discussed, for instance, here:

http://perl.apache.org/docs/2.0/user/porting/compat.html#C__r_E_gt_header_out_



> This is strange error, because in my httpd.conf file
> I haven't load module Apache::RequestRec
>
> I have load just these modules:
> [code]
> PerlModule Apache2::AuthCookieDBI
> PerlModule Apache2::DBI
> PerlModule HTML::Mason::ApacheHandler
> PerlModule Apache2::Request
> PerlModule Config2::IniFiles
> [/code]
>
> Does someone information, how I could fix this problem?

--
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
Attachments: signature.asc (0.24 KB)


woff3_ at hotmail

Dec 3, 2007, 8:26 AM

Post #5 of 6 (3977 views)
Permalink
Re: headers_out [In reply to]

Thanks you very much.

I added that module and it worked !



Roberto C. Sanchez-6 wrote:
>
> On Sat, Dec 01, 2007 at 05:56:31AM -0800, Woff3 wrote:
>>
>> Hi.
>>
>> I had Apache 2.0 and mod_perl.
>>
>> Now I upgraded to Apache 2.2.6 and mod_perl2.
>>
>> I have html-pages where I use mason code.
>>
>> [code]
>> $r->header_out("Refresh" => "5; url=$url");
>> This code worked fine in my previous system.
>> Now when run my application, I get this error:
>> Can't locate object method "header_out" via package"Apache::RequestRec"
>> [/code]
>>
>> This is strange error, because in my httpd.conf file
>> I haven't load module Apache::RequestRec
>>
>> I have load just these modules:
>> [code]
>> PerlModule Apache2::AuthCookieDBI
>> PerlModule Apache2::DBI
>> PerlModule HTML::Mason::ApacheHandler
>> PerlModule Apache2::Request
>> PerlModule Config2::IniFiles
>> [/code]
>>
>> Does someone information, how I could fix this problem?
>
> Have you tried adding "PerlModule Apache2::compat" in your httpd.conf?
>
> Regards,
>
> -Roberto
> --
> Roberto C. Sánchez
> http://people.connexer.com/~roberto
> http://www.connexer.com
>
>
>

--
View this message in context: http://www.nabble.com/headers_out-tf4928260.html#a14133279
Sent from the mod_perl - General mailing list archive at Nabble.com.


woff3_ at hotmail

Dec 3, 2007, 8:27 AM

Post #6 of 6 (3984 views)
Permalink
Re: headers_out [In reply to]

Yes, Apache2::compat did the job.



Adam Prime wrote:
>
> Roberto C. Sánchez wrote:
>>
>> Have you tried adding "PerlModule Apache2::compat" in your httpd.conf?
>>
>
> Or you can use $r->headers_out. $r->header_out is no longer supported.
> see:
>
> http://perl.apache.org/docs/2.0/user/porting/compat.html#C__r_E_gt_err_header_out_
>
> Adam
>
>
>
>
>
>
>

--
View this message in context: http://www.nabble.com/headers_out-tf4928260.html#a14133281
Sent from the mod_perl - General mailing list archive at Nabble.com.

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.