Newbie cookie question
Hello, I recently installed mod_perl 1.24_01 and everything is fine except cookies. Specifically, my perl scripts before mod_perl would pass a cookie back and forth with the users name and password - so that each script, when called, would check for the cookie to see if the user is logged in and if not redirect to a login page, if they are logged in then display the requested page. Now that I have mod_perl installed I cannot pass any cookies like I used to. I have not changed any scripts [yet] and all use DBI connections to a postgres DB. I looked through the guide and searched the maillist archive but did not find much info to help with this. I also tried to install Apache::AuthCookieDBI, but documentation is very limited for that and never could get it right. Any help on this is greatly appreciated! Jim
RE: Newbie cookie question
a code snippet of how you set your cookies would be most helpful... My apologies : ) [snip] $user=$query-param('login'); $password=$query-param('pass'); $dbname="rspde"; $dbh=DBI-connect("dbi:Pg:dbname=$dbname",$user,$password) || sendto_main(); $page="main"; $group=check_permissions($user,$password); $username=get_username($user,$password); $fname=get_fname($user,$password); $cookie1=$query-cookie(-name='login', -value=$user); $cookie2=$query-cookie(-name='pass', -value=$password); print $query-header(-cookie=[$cookie1,$cookie2]); print $query -start_html ( do you have PerlSendHeaders On? PerlSendHeader is ON, CPAN modules such as Apache::DumpHeaders or Apache::DebugInfo I have not used Apache::DumpHeaders or Apache::DebugInfo ... YET Thanks for the response! Jim -Original Message- From: Geoffrey Young [mailto:[EMAIL PROTECTED]] Sent: Friday, January 05, 2001 2:53 PM To: 'James Hall'; [EMAIL PROTECTED] Subject: RE: Newbie cookie question -Original Message- From: James Hall [mailto:[EMAIL PROTECTED]] Sent: Friday, January 05, 2001 3:23 PM To: [EMAIL PROTECTED] Subject: Newbie cookie question Now that I have mod_perl installed I cannot pass any cookies like I used to. I have not changed any scripts [yet] and all use DBI connections to a postgres DB. a code snippet of how you set your cookies would be most helpful... be sure to check your outbound and inbound headers (either using telnet or CPAN modules such as Apache::DumpHeaders or Apache::DebugInfo) to see what is going on do you have PerlSendHeaders On? --Geoff
Newbie install help needed please
Hello, I recently installed Redhat 7, which includes/installs Apache and mod_perl. I assumed mod_perl was installed and running successfully based on the http error log (Mon Nov 13 15:37:16 2000] [notice] Apache/1.3.12 (Unix) (Red Hat/Linux) mod_ssl/2.6.6 OpenSSL/0.9.5a DAV/1.0.1 mod_perl/1.24 configured -- resuming normal operations), but when I do a httpd -l apparently its not: Compiled-in modules: http_core.c mod_so.c suexec: disabled; invalid wrapper /usr/sbin/suexec So I decided to download the tarball and [re]install mod_perl... but without the Apache source it is not happening. If anyone has any advice/urls/pointers to FAQ's to get mod_perl up and running in this situation it would be greatly appreciated! TIA! -Jim
RE: Newbie install help needed please
Phil, Thank you very much for your quick response! The reason I assumed mod_perl wasn't installed was because of a post I found searching the mail list archive. When I try to start/stop httpd manually I receive the following error: Syntax error on Line 896 of /etc/httpd/conf/httpd.conf: Invalid command 'PerlRequire' , perhaps misspelled or defined by a module not included in server configuration. I noticed someone else with the same problem, and the replies pointed to the fact that mod_perl was not installed. So I guess I can eliminate a bad install as part of the problem... but that's leaves me back at square one. I'm going to continue to hunt through the mail list archives and FAQ's for a solution... but if anyone can think of anything in the meantime, I would love to hear it! Thanks again!! -Jim -Original Message- From: Philip Jacob [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 15, 2000 4:25 PM To: James Hall Cc: [EMAIL PROTECTED] Subject: Re: Newbie install help needed please James, It is installed, actually. What you're seeing is a build of Apache where pretty much everything is installed as a DSO. This makes it possible for Redhat to ship things like mod_php4 as RPMs so you can just install them piecemeal. If you look in APACHE/libexec/, you'll find all the other modules you're looking for. What you need to do in your httpd.conf file is LoadModule [ module name ], but since you're seeing mod_perl in the server headers, it's probably already done. I would advise you to learn how to build all this from source. It's not terribly difficult and Stas's mod_perl guide at perl.apache.org/guide is a great resource. Also, the software comes with instructions. phil. James Hall wrote: Hello, I recently installed Redhat 7, which includes/installs Apache and mod_perl. I assumed mod_perl was installed and running successfully based on the http error log (Mon Nov 13 15:37:16 2000] [notice] Apache/1.3.12 (Unix) (Red Hat/Linux) mod_ssl/2.6.6 OpenSSL/0.9.5a DAV/1.0.1 mod_perl/1.24 configured -- resuming normal operations), but when I do a httpd -l apparently its not: Compiled-in modules: http_core.c mod_so.c suexec: disabled; invalid wrapper /usr/sbin/suexec So I decided to download the tarball and [re]install mod_perl... but without the Apache source it is not happening. If anyone has any advice/urls/pointers to FAQ's to get mod_perl up and running in this situation it would be greatly appreciated! TIA! -Jim