Re: Problem with mod_ssl and mod_perl on Windows
On Tue, 10 Jun 2003, Mustafa Tan wrote: > Hi, > I was trying to setup Apache (with mod_perl and > mod_ssl) on Windows ME, and I had a weird problem. > > Before the problem, let me talk about more about some > details. I have installed Apache from > http://perl.apache.org/dist/win32-bin/. I installed > the perl 5.6 version, which is perl-win32-bin.exe. > THis file contains Perl 5.6 and Apache 1.3.27. It also > contains mod_perl and mod_ssl. > > After installation I did not use the perl that the > package came with. I used my ActivePerl (which is > 5.6), because I already installed lots of packages > there and there is no difference anyway. > > In my previous installation of Perl (activeperl) I had > mod_perl installed, however that mod_perl was not for > eapi, so I removed it and installed the one for eapi > from the canadian web site. I installed > mod_perl-eapi.ppd. > > http://theoryx5.uwinnipeg.ca/ppmpackages/ > > So anyway, I had mod_perl setup for perl and apache. > > I configured my apache so that it listens both on 443 > for secure connections and 80 too. > > Now, let me talk about how I use mod_perl for my site. > I use AuthCookieURL for authentication and > authorization. What I do is essentially, get the > user's name and password in a page and then authorize > the user for the other pages. This works fine, until I > used mod_ssl for secure connections. > > When I tested the apache, it works just fine for port > 80. However, it doesn't work very well, on port 443. > The second request to the https port crashes Apache. > Now as far I as I understood the second request > crashes the child process. I am not sure about the > internals of Apache. What happens is that, the first > request is always fine, only the second request > crashes the server. The child process dies, Apache > parent process creates the child process again and > then everything works fine again until the next 2 > requests, except of course I have to press Ok to > shutdown the Apache's error box. That is the error > does prevent me using Apache for secure connections. I'm not really sure why this happens, but it might be worth trying to track down if it's a problem with AuthCookieURL particularly, or is a symptom of a more general problem. Does this crash occur only when you've used AuthCookieURL? Or does it generally occur with other, or no, login methods? Do you load any Apache modules (eg, php) that you could try disabling, to see if they're contributing to the problem? What about Perl modules - are you loading, in particular, any XS based modules that you could temporarily do without to see if that makes a difference? Is it easy to test your setup with Apache::AuthCookie - does that work? Might you happen to have any openssl dlls lying around your system other than the ones that came with the distribution? -- best regards, randy kobes
Problem with mod_ssl and mod_perl on Windows
Hi, I was trying to setup Apache (with mod_perl and mod_ssl) on Windows ME, and I had a weird problem. Before the problem, let me talk about more about some details. I have installed Apache from http://perl.apache.org/dist/win32-bin/. I installed the perl 5.6 version, which is perl-win32-bin.exe. THis file contains Perl 5.6 and Apache 1.3.27. It also contains mod_perl and mod_ssl. After installation I did not use the perl that the package came with. I used my ActivePerl (which is 5.6), because I already installed lots of packages there and there is no difference anyway. In my previous installation of Perl (activeperl) I had mod_perl installed, however that mod_perl was not for eapi, so I removed it and installed the one for eapi from the canadian web site. I installed mod_perl-eapi.ppd. http://theoryx5.uwinnipeg.ca/ppmpackages/ So anyway, I had mod_perl setup for perl and apache. I configured my apache so that it listens both on 443 for secure connections and 80 too. Now, let me talk about how I use mod_perl for my site. I use AuthCookieURL for authentication and authorization. What I do is essentially, get the user's name and password in a page and then authorize the user for the other pages. This works fine, until I used mod_ssl for secure connections. When I tested the apache, it works just fine for port 80. However, it doesn't work very well, on port 443. The second request to the https port crashes Apache. Now as far I as I understood the second request crashes the child process. I am not sure about the internals of Apache. What happens is that, the first request is always fine, only the second request crashes the server. The child process dies, Apache parent process creates the child process again and then everything works fine again until the next 2 requests, except of course I have to press Ok to shutdown the Apache's error box. That is the error does prevent me using Apache for secure connections. Anyway, I spent quite some time on it, and I tracked down the problem to the following. There are two problems, and let me describe how I solved the first one and how I couldn't solve the second one. The first one was that, when the user first requests a page, he/she has to login. In this phase, the AuthCookieURL module shows the custom login page. This happens by a redirection, using custom_message or something like that. I forgot its name now. Anyway, this method as you know receives a return value (in this case it is FORBIDDEN) and a messsage or a relative url. Normally it is a relative url, like /public/login.pl. This is the default way I use this module, and it normally works fine. However, in https requests the second request causes Apache crash, unless I change this method so that it actually returns the output as string. That is instead of a redirection to login.pl, I send the login page in the second argument using the custom_error method. If I make this change, Apache doesn't crash anymore. Ok, now the next step is fixing the authorization phase. Assuming that the user already supplied the correct user/password, he/she can enter to the site. However once he/she enters, the user can not make two subsequent requests without crashing the Apache. I tracked down this problem to the return value of the authorize method of AuthCookieURL. If this method returns OK, which means that the user can enter, it crashes, if the method returns DECLINED, it doesn't crash, but it certainly doesn't show anything either, cause it says "Forbidden , you don't have access" message. I couldn't fix this problem. It just seems that there is no way around this. What I found in the ssl.log is that, basically OpenSSL crashes with I/O errors. It says like expected to read 5 bytes The error somehow indicate to me that, maybe I added the modules in the wrong way. I have changed them, but again, it didn't work. That is I added mod_perl last, mod_ssl last and so on, but the net result was the same. Overall, the problem seem to be somewhat related with the phases. If anybody can help me to fix the problem, I would be thankful. Thanks __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com
Re: mod_perl on windows
Great! It worked now thanks! I only had to "install --force libapreq" and it worked. - Original Message - From: "Randy Kobes" <[EMAIL PROTECTED]> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, March 23, 2002 12:35 AM Subject: Re: mod_perl on windows > On Fri, 22 Mar 2002, [EMAIL PROTECTED] wrote: > > > Hi. > > my $erver: Apache/1.3.22 (Win32) PHP/4.0.6 mod_perl/1.26_01-dev > > perl v5.6.1 > > Consider this sample script: > > > > use Apache::Request; > > use strict; > > use warnings; > > > > my $r=Apache->request; > > my $apr = Apache::Request->new($r); > > $r->send_http_header('text/html'); > > > > The first time i run the script the error is: > > " Can't locate loadable object for module Apache::Request in @INC " > > > > Any trials after that would give: > > " Can't locate object method "new" via package "Apache::Request" " > > > > I saw some other guy in the list had a similar program but in > > his case installing the libapreq pragma solved his problem.My > > problem is that the pragma seems already installed using ppm > > (!) but can't be installed using perl -MCPAN -e shell because > > it needs me to build mod_perl first.. However I've installed > > the BINARY mod_perl version using the ppm method described in > > the mod_perl cookbook listing 1.2 so the second method fails. > > Did you install the libapreq ppm package from ActiveState's > repository, or from the repository at > http://theoryx5.uwinnipeg.ca/ppmpackages/? If it was > from Activestate's, maybe try the latter. > > best regards, > randy kobes > >
Re: mod_perl on windows
On Fri, 22 Mar 2002, [EMAIL PROTECTED] wrote: > Hi. > my $erver: Apache/1.3.22 (Win32) PHP/4.0.6 mod_perl/1.26_01-dev > perl v5.6.1 > Consider this sample script: > > use Apache::Request; > use strict; > use warnings; > > my $r=Apache->request; > my $apr = Apache::Request->new($r); > $r->send_http_header('text/html'); > > The first time i run the script the error is: > " Can't locate loadable object for module Apache::Request in @INC " > > Any trials after that would give: > " Can't locate object method "new" via package "Apache::Request" " > > I saw some other guy in the list had a similar program but in > his case installing the libapreq pragma solved his problem.My > problem is that the pragma seems already installed using ppm > (!) but can't be installed using perl -MCPAN -e shell because > it needs me to build mod_perl first.. However I've installed > the BINARY mod_perl version using the ppm method described in > the mod_perl cookbook listing 1.2 so the second method fails. Did you install the libapreq ppm package from ActiveState's repository, or from the repository at http://theoryx5.uwinnipeg.ca/ppmpackages/? If it was from Activestate's, maybe try the latter. best regards, randy kobes
mod_perl on windows
Hi. my $erver: Apache/1.3.22 (Win32) PHP/4.0.6 mod_perl/1.26_01-dev perl v5.6.1 Consider this sample script: use Apache::Request;use strict;use warnings; my $r=Apache->request;my $apr = Apache::Request->new($r);$r->send_http_header('text/html'); The first time i run the script the error is: " Can't locate loadable object for module Apache::Request in @INC " Any trials after that would give: " Can't locate object method "new" via package "Apache::Request" " I saw some other guy in the list had a similar program but in his case installing the libapreq pragma solved his problem.My problem is that the pragma seems already installed using ppm (!) but can't be installed using perl -MCPAN -e shell because it needs me to build mod_perl first.. However I've installed the BINARY mod_perl version using the ppm method described in the mod_perl cookbook listing 1.2 so the second method fails. I'm a little confused right now. Should i try to find another way to build mod_perl using the sources or is there maybe a trick or something i've missed that would help me bypass this problem and use the modules? (Apache::Cookie fails to load too) Any help would be appreciated. Thanks in advance.
RE: Running Mod_Perl on Windows
In general, questions on installation, etc are best directed to the mod_perl list ([EMAIL PROTECTED]) after searching through the other resources available to you from http://perl.apache.org especially http://perl.apache.org/guide and http://perl.apache.org/#maillists using a binary distribution for mod_perl on win32 seems to be the solution of choice: http://perl.apache.org/distributions.html but if you need to compile from source, check out INSTALL.win32 in the mod_perl distribution HTH --Geoff -Original Message-From: Antoine E. Hall [mailto:[EMAIL PROTECTED]]Sent: Friday, June 08, 2001 2:14 AMTo: [EMAIL PROTECTED]Subject: Running Mod_Perl on Windows Geoff, I got your information off of the take23.org website. I am trying to configure Mod_Perl to run under Apache. I installed the ActiveState Perl Build 626 and I Installed Apache 1.3.20. I also downloaded Mod_Perl 1.25, but I cannot figure out how to configure my httpd.conf file for Apache. When I try to make a reference to PerlHandler or PerlRequire, I get an error saying something like, I didn't load a module. Any idea what I may be doing wrong? Thanks, Antoine
Compiling mod_perl on Windows NT
Hi, I've just been building Perl 5.6.0 / mod_perl 1.23 / Apache 1.3.12 on Windows NT and found something which may be of some use. The Apache installation does not seem to copy the headers and library files from the build directory into the install directory (which it DOES on Unix), so to build mod_perl you need to keep that Apache build build directory handy. I found that manually copying apache_1.3.12\src\include apache_1.3.12\src\os\win32\*.h apache_1.3.12\src\CoreR\ApacheCore.lib into the install directory and then pointing the DevStudio include/library paths at these locations in the install directory works fine, thus removing the need to keep the build directory floating about. This presumably means that I can now ditch the build directory and still be able to build mod_perl 1.24 when it comes using only my Apache install directory. - Steve Hay