Re: Cookie Code
On Thu, 2003-09-04 at 16:56, Tim Edwards wrote: > I'm sending 3 cookies. The first one goes properly. The second two get print > to the screen. Same script run under normal perl works fine. Suggestions? Show us the mod_perl part of your apache config. - Perrin Running Apache 1.3.27 and mod_perl 1.26. The script I'm using is running in the CGI-BIN directory till I can spend time and pull out all the sub routine to put in seperate files then I'll move them to the PERL directory. AddModule mod_perl.c SetHandler perl-script PerlHandler Apache::PerlRun AllowOverride None Options ExecCGI PerlSendHeader On Order allow,deny Allow from all SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI PerlSendHeader on _ Express yourself with MSN Messenger 6.0 -- download now! http://www.msnmessenger-download.com/tracking/reach_general -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Cookie Code
The code I've been using to handle cookies ate it's self when I start using ModPerl. I've set my script directory to PerlHandler Apache::PerlRun while I converts scripts. I'm sending 3 cookies. The first one goes properly. The second two get print to the screen. Same script run under normal perl works fine. Suggestions? Here the tester code I have for the cookies: @cookies=('session_id', $sessionid, 'URL',$http_referer, 'COMMENT', $cooknot); print "Content-type: text/html\n"; while( ($cookie,$value) = @cookies ) { print 'Set-Cookie: ' . $cookie . '=' . $value . ';'; if ($Cookie_Exp_Date) { print ' expires=' . $Cookie_Exp_Date . ';'; } if ($Cookie_Path) { print ' path=' . $Cookie_Path . ';'; } if ($Cookie_Domain) { print ' domain=' . $Cookie_Domain . ';'; } if ($Secure_Cookie) { print ' secure'; } print "\n"; } print "\n\n"; print "test"; _ Use custom emotions -- try MSN Messenger 6.0! http://www.msnmessenger-download.com/tracking/reach_emoticon -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Modules Problem
I in the process of switching my scripts over to Mod Perl. I decide since Mod Perl doesn't like Sub routine in the the main program I'd export make Modules out of the more come ones. Simple process I thought. However no mater what I do I get an error. I tried making a simple one using the example code from the site and failed stil. Error: Undefined subroutine &main::CISCHeader called at /var/www/perl/test.pl line 5. Here the Module Located in the ModPerl Directory under the a directory listed int eh @inc: package ModPerl::Rules1; sub CISCHeader { print "Content-type: text/plain\n\n"; print "mod_perl rules!\n"; return 1; } 1; The Script: #!/usr/bin/perl -w use strict; use ModPerl::Rules1; CISCHeader(); I'm Stumpped and would love some advise or suggestions. _ Enter for your chance to IM with Bon Jovi, Seal, Bow Wow, or Mary J Blige using MSN Messenger http://entertainment.msn.com/imastar -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html