Re: sethandlers question
On Sun 12 Oct 2008, André Warnier wrote: Location /some/url SetHandler jakarta-servlet SetEnvIf REQUEST_URI \.(htm|web|css|gif|jpg|js|html?)$ no-jk PerlXXXHandler My::Module-some_method ... /Location (jakarta-servlet above means mod_jk -- Tomcat) (and PerlXXXHandler being any kind of Perl HTTP Handler running soon enough) The Question : Is it possible, in the PerlXXXHandler, on a request-by-request base, to disable the jakarta-servlet handler, and install the following instead SetHandler modperl PerlResponseHandler My::Module-some_other_method ? I know that I can do something like the above for regular static pages, and I use this already : $r-handler('modperl'); $r-set_handlers(PerlAuthzHandler = []); # stop authorization from running $r-set_handlers(PerlResponseHandler = \_send_login_form); However, when I try to do the same in a Location like the above, it seems that the jakarta-servlet handler runs anyway, and my PerlResponseHandler is never called. Does that piece of code run in a /Perl(PostReadRequest|Trans| MapToStorage)Handler/ ? Please, have a look again at the ap_process_request_internal() function in httpd-2.x.y/server/request.c. This function implements almost the complete request cycle (save PostReadRequest, Response and Log). Just after ap_run_translate_name(), that is the PerlTransHandler, you'll see this piece: /* Reset to the server default config prior to running map_to_storage */ r-per_dir_config = r-server-lookup_defaults; if ((access_status = ap_run_map_to_storage(r))) { /* This request wasn't in storage (e.g. TRACE) */ return access_status; } /* Rerun the location walk, which overrides any map_to_storage config. */ if ((access_status = ap_location_walk(r))) { return access_status; } /* Only on the main request! */ if (r-main == NULL) { if ((access_status = ap_run_header_parser(r))) { return access_status; } } ... The line r-per_dir_config = r-server-lookup_defaults; resets all request specific configurations applied so far. After that line the request is configured as if no Directory/Location or other container were present in your httpd.conf. Next comes MapToStorage. Here Directory, DirectoryMatch, Files and FilesMatch containers are applied to the request. Then, and this is what I think hits you, comes an ap_location_walk. Here Location containers are applied. So, your SetHandler inside the Location overrides any $r-handler seen before. After the ap_location_walk comes the PerlHeaderParserHandler. But it is skipped for subrequests. A further examination will show you that the next phase that is run by all requests is the PerlTypeHandler just before Fixup. So, move your $r-handler('modperl'); to one of those and it will work. I prefer Fixup but that is based only on the fact that it is documented as do-what-you-want phase. There are directives that change the handler in the type-checker phase. In fact the AddHandler directive works that way. Mod_mime looks at the file extension and adjusts the handler, e.g AddHandler cgi-script .pl. So using Fixup your module is the last to kick in. To carry state around use pnotes, notes or subprocess_env. Torsten -- Need professional mod_perl support? Just hire me: [EMAIL PROTECTED]
Re: auto configuration
I think i'm failing in something but i can't understard where my error is, googling I'didn't found any clue. May some sage help me? I just had a look at this stuff, and it seems like there is one big whole in the documentation which is how exactly Apache::Test finds the packages that it needs to create Location blocks for. I tried a couple of things (including them directly in the .t file, in a plain path in the t/ directory) but they didn't work. Perhaps Fred or Geoff, or someone else with a little more experience with Apache::Test can shed some light onto this feature. Adam You've just descripted exalty where my problem is! Actually I image that all the problem is where placing those packages that should create the dynamic configuration. In order i tried in: 1) t/ directory 2) inside the text itself 3) in a package directory that followed package convention ( TestResponse::TestHandler2 i put in TestResponse/TestHandler2 path) 4) in t/conf Unfortunately those weren't successful ideas ...
FAIL!!!
hello, I'm trying to get mod_perl running under Windows. I used the latest perl from ActiveState (5.8.8.824), Apache 2.2.9 from apache.org, and mod_perl 2.0.4, installed from ppm. When I ran a simple perl script and had 20 simulated users hitting the page, it eventually said Out of memory! and restarted with a status of 0. The second time it happened, it tried to restart, but couldn't. Does anyone know if these versions actually work together? If they do, any thoughts on what could be wrong? code: use strict; my $err = 'eh'; my $body; my $errstr = int(rand(2)); print 'Content-type: text/html',\n\n,$err,': ',$errstr,\nSERVER_ADDR: ,($ENV{'SERVER_ADDR'} || $ENV{'COMPUTERNAME'}),\n; if($errstr){ $errstr =~ s/\://g; $errstr =~ s/\n/ /g; $body = 'Error Text: ',$errstr,\n; } print \n; print scalar(localtime()); if($body){ $body =~ s/\n//g; } print $body; Apache error.log Out of memory! [Fri Oct 10 14:25:34 2008] [notice] Parent: child process exited with status 0 -- Restarting. [Fri Oct 10 14:25:34 2008] [notice] Apache/2.2.9 (Win32) mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations [Fri Oct 10 14:25:34 2008] [notice] Server built: Jun 13 2008 04:04:59 [Fri Oct 10 14:25:34 2008] [notice] Parent: Created child process 1712 [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(487): Parent: Sent the scoreboard to the child [Fri Oct 10 14:25:34 2008] [notice] Disabled use of AcceptEx() WinSock2 API [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Child process is running [Fri Oct 10 14:25:34 2008] [info] Parent: Duplicating socket 244 and sending it to child process 1712 [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(408): Child 1712: Retrieved our scoreboard from the parent. [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(605): Parent: Sent 1 listeners to child 1712 [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(564): Child 1712: retrieved 1 listeners from parent [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Acquired the start mutex. [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Starting 250 worker threads. [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Listening on port 80. Out of memory! [Fri Oct 10 15:07:14 2008] [notice] Parent: child process exited with status 0 -- Restarting. _ See how Windows connects the people, information, and fun that are part of your life. http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/
Error While installing Mod_perl
Hi All, I am installing mod_perl in my machine but getting some error below is the procedures which I followed for installing the mod_perl Step1 : perl Makefile.PL MP_APR_CONFIG=/usr/local/apache2/bin/ asked for apache path given : /usr/local/apache2 Step2: make Step 3: make test In the above step I am getting error below is the part of error /usr/bin/perl -Iblib/arch -Iblib/lib \ t/TEST -clean [warning] setting ulimit to allow core files ulimit -c unlimited; /usr/bin/perl /home/Documents/mod_perl-2.0.4/t/TEST -clean APACHE_TEST_GROUP= APACHE_TEST_HTTPD= APACHE_TEST_PORT= APACHE_TEST_USER= APACHE_TEST_APXS= \ /usr/bin/perl -Iblib/arch -Iblib/lib \ t/TEST -bugreport -verbose=0 [warning] setting ulimit to allow core files ulimit -c unlimited; /usr/bin/perl /home/Documents/mod_perl-2.0.4/t/TEST -bugreport -verbose=0 mod_perl 2 was built against Apache sources, we don't know where httpd/apxs executables are, therefore skipping the test suite execution at /home/Documents/mod_perl-2.0.4/Apache-Test/lib/Apache/TestConfig.pm line 382. ++ | Please file a bug report: http://perl.apache.org/bugs/ | ++ make: *** [run_tests] Error 2 linux/home/Documents/mod_perl-2.0.4 # perl Makefile.PL MP_APR_CONFIG=/usr/l help me if I am doing anything wrong. Thanks Jack -- View this message in context: http://www.nabble.com/Error-While-installing-Mod_perl-tp19956109p19956109.html Sent from the mod_perl - General mailing list archive at Nabble.com.
Re: Sleepycat::DbXml problem httpd: symbol lookup error
2008/10/11 Fred Moyer [EMAIL PROTECTED] Felipe de Jesús Molina Bravo wrote: Try rebuilding apache and mod_perl - it may be trying to load a version of DbXML at runtime different than what it was built with. I've seen similar problems in the past and rebuilding mp/httpd is usually a good fix after eliminating the duplicate libs. thanks ... i did it, but the problem continue... any idea? maybe is important to say how compile apache and modperl (it was very difficult): Can you try compiling mod_perl as a shared object? Static module support for mp2 is not as well supported. perl Makefile.PL MP_APXS=/path/to/httpd/apxs I will try it . mmm maybe it is another thread... but I prefer static modper for the next arguments: 1. I guess the static modperl is faster than dynamic I know that dynamic is more maintainable that static; for my aplication i require modperl more soon; 2. When modperl is dynamic i had some segment fault when i share objects at the start of apache; when is static i don't have problem ... (maybe i some errors in my code) there are things that worry me: 1. In my linux distribution (gentoo) there are not any package with static modperl 2. I see that most of the community uses modperl as dynamic ... maybe is it a sign of die the static modperl? what is the opinion of community ? greetings
Re: sethandlers question
Hi Torsten. Once again, I thank you for the time spent researching and answering my question(s). Unfortunately, I am less fluent in C than you (which is why after all I like and use mod_perl), so sometimes referring me to the C code is not as enlightening to me as it undoubtedly is to you. But I am trying to follow, nevertheless. Torsten Foertsch wrote: On Sun 12 Oct 2008, André Warnier wrote: Location /some/url SetHandler jakarta-servlet SetEnvIf REQUEST_URI \.(htm|web|css|gif|jpg|js|html?)$ no-jk PerlXXXHandler My::Module-some_method ... /Location (jakarta-servlet above means mod_jk -- Tomcat) (and PerlXXXHandler being any kind of Perl HTTP Handler running soon enough) The Question : Is it possible, in the PerlXXXHandler, on a request-by-request base, to disable the jakarta-servlet handler, and install the following instead SetHandler modperl PerlResponseHandler My::Module-some_other_method ? I know that I can do something like the above for regular static pages, and I use this already : $r-handler('modperl'); $r-set_handlers(PerlAuthzHandler = []); # stop authorization from running $r-set_handlers(PerlResponseHandler = \_send_login_form); However, when I try to do the same in a Location like the above, it seems that the jakarta-servlet handler runs anyway, and my PerlResponseHandler is never called. Does that piece of code run in a /Perl(PostReadRequest|Trans| MapToStorage)Handler/ ? No, at the moment it runs in a PerlAuthenHandler. As explained the other thread (requests and subrequests), I thought it was more elegant and mod_perl-ish, instead of doing a re-direct to a login page if the user needed authentifying, to having the login page returned by a content handler. (One main reason is that it allows me, in that content handler,to filter the login page and insert in it, things I have stored previously in $r-pnotes().) For that thus, when the user is not authenticated when the request hits the PerlAuthenHandler, this handler tries to set the content handler (PerlResponseHandler) to the method send_login_form() in the same module. This works fine when the previous content handler is Apache's default, iow for static pages. But it fails miserably when there is already a specific content handler (like mod_jk) for this Location. Please, have a look again at the ap_process_request_internal() function in httpd-2.x.y/server/request.c. I would first have to know where this thing is. I have never so far looked at the Apache source code, so I need some pointers there. Not that if I look, I would necessarily understand much of it, but I can try. Now, why would I, since you provide the nice explanation below ? This function implements almost the complete request cycle (save PostReadRequest, Response and Log). Just after ap_run_translate_name(), that is the PerlTransHandler, you'll see this piece: /* Reset to the server default config prior to running map_to_storage */ r-per_dir_config = r-server-lookup_defaults; if ((access_status = ap_run_map_to_storage(r))) { /* This request wasn't in storage (e.g. TRACE) */ return access_status; } /* Rerun the location walk, which overrides any map_to_storage config. */ if ((access_status = ap_location_walk(r))) { return access_status; } /* Only on the main request! */ if (r-main == NULL) { if ((access_status = ap_run_header_parser(r))) { return access_status; } } ... The line r-per_dir_config = r-server-lookup_defaults; resets all request specific configurations applied so far. After that line the request is configured as if no Directory/Location or other container were present in your httpd.conf. Next comes MapToStorage. Here Directory, DirectoryMatch, Files and FilesMatch containers are applied to the request. So, you mean that for every and each request, Apache re-configures itself ? If that is so, it is quite amazing the speed at which it can serve a page.. Then, and this is what I think hits you, comes an ap_location_walk. Here Location containers are applied. So, your SetHandler inside the Location overrides any $r-handler seen before. Well, I am not sure : The handler set in the configuration file for that Location, is originally jakarta-servlet (as per the snippet below). It is I, in my PerlAuthenHandler, who is trying to reset this to modperl, and in mod_perl, to my send_login_page() method. Before I do that, there is no $r-handler nor PerlResponseHandler set. I may be misunderstanding what you say above of course.. After the ap_location_walk comes the PerlHeaderParserHandler. But it is skipped for subrequests. That's fine, we are always in a main request here. A further examination will show you (probably not) that the next phase that is run by all requests is the PerlTypeHandler just before Fixup. So, move your $r-handler('modperl'); to one of those and
RE: Windows settings cause crash (originally: FAIL!!!)
Also, the ThreadsPerChild is 250 and MaxRequestsPerChild 5 From: [EMAIL PROTECTED] To: modperl@perl.apache.org Subject: FAIL!!! Date: Mon, 13 Oct 2008 07:47:35 -0500 hello, I'm trying to get mod_perl running under Windows. I used the latest perl from ActiveState (5.8.8.824), Apache 2.2.9 from apache.org, and mod_perl 2.0.4, installed from ppm. When I ran a simple perl script and had 20 simulated users hitting the page, it eventually said 'Out of memory!' and restarted with a status of 0. The second time it happened, it tried to restart, but couldn't. Does anyone know if these versions actually work together? If they do, any thoughts on what could be wrong? code: use strict; my $err = 'eh'; my $body; my $errstr = int(rand(2)); print 'Content-type: text/html','\n\n',$err,': ',$errstr,'\nSERVER_ADDR: ',($ENV{'SERVER_ADDR'} || $ENV{'COMPUTERNAME'}),'\n'; if($errstr){ $errstr =~ s/\://g; $errstr =~ s/\n/ /g; $body = 'Error Text: ',$errstr,'\n'; } print '\n'; print scalar(localtime()); if($body){ $body =~ s/\n//g; } print $body; Apache error.log Out of memory! [Fri Oct 10 14:25:34 2008] [notice] Parent: child process exited with status 0 -- Restarting. [Fri Oct 10 14:25:34 2008] [notice] Apache/2.2.9 (Win32) mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations [Fri Oct 10 14:25:34 2008] [notice] Server built: Jun 13 2008 04:04:59 [Fri Oct 10 14:25:34 2008] [notice] Parent: Created child process 1712 [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(487): Parent: Sent the scoreboard to the child [Fri Oct 10 14:25:34 2008] [notice] Disabled use of AcceptEx() WinSock2 API [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Child process is running [Fri Oct 10 14:25:34 2008] [info] Parent: Duplicating socket 244 and sending it to child process 1712 [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(408): Child 1712: Retrieved our scoreboard from the parent. [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(605): Parent: Sent 1 listeners to child 1712 [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(564): Child 1712: retrieved 1 listeners from parent [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Acquired the start mutex. [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Starting 250 worker threads. [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Listening on port 80. Out of memory! [Fri Oct 10 15:07:14 2008] [notice] Parent: child process exited with status 0 -- Restarting. _ See how Windows connects the people, information, and fun that are part of your life. http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/ _ Get more out of the Web. Learn 10 hidden secrets of Windows Live. http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008
Re: sethandlers question
On Mon 13 Oct 2008, André Warnier wrote: As explained the other thread (requests and subrequests), I thought it was more elegant and mod_perl-ish, instead of doing a re-direct to a login page if the user needed authentifying, to having the login page returned by a content handler. The apache-way to do this has a name: ErrorDocument or in mod_perl $r-custom_response. Configure an ErrorDocument for 403 and return HTTP_FORBIDDEN in your A...Handler. That has the benefit that the 403 status is logged and that the browser (think about search engines) sees it. But the custom response page must be larger than 512 bytes or you'll encounter problems with IE. If you don't care about that you can use $r-internal_redirect. That is a bit less work to do for your server. Please, have a look again at the ap_process_request_internal() function in httpd-2.x.y/server/request.c. I would first have to know where this thing is. I have never so far looked at the Apache source code, so I need some pointers there. Not that if I look, I would necessarily understand much of it, but I can try. Now, why would I, since you provide the nice explanation below ? Out of curiosity! Just download the apache source untar it and open in in your favorite editor. C is not that much different from perl and the request.c file is really easy to read. You don't have to modify it, just try to understand what is going on! So, you mean that for every and each request, Apache re-configures itself ? If that is so, it is quite amazing the speed at which it can serve a page.. Just keep in mind for the following that apache is originally designed to have a static configuration. So at start it splits the configuration into blocks, one holds the basic config that is outside all containers and others for each Location/Directory/etc. From those blocks it generates pre-parsed configuration vectors. At runtime each request starts with the basic config fetched from r-server-lookup_defaults then it looks for other vectors matching the request and merges them. But there is another configuration source, .htaccess. Those are read in, compiled and merged in the same function (ap_directory_walk() (hard to understand)) that applies Directory containers (called from ap_run_map_to_storage()). With mod_perl comes yet another configuration source, $r-add_config. This is implemented very similar to .htaccess only the directives are not read from a file but from memory and they are compiled and merged at the time $r-add_config is called. Well, I am not sure : The handler set in the configuration file for that Location, is originally jakarta-servlet (as per the snippet below). It is I, in my PerlAuthenHandler, who is trying to reset this to modperl, and in mod_perl, to my send_login_page() method. Before I do that, there is no $r-handler nor PerlResponseHandler set. So, why not issue a $r-internal_redirect. I don't exactly know when the SetHandler directive sets $r-handler. Maybe it is done in the type checker phase. So perhaps you have to move your code to Fixup or use $r-add_config(['SetHandler modperl']). I don't think I can do that, unless I want the PerlTypeHandler or PerlFixupHandler to become an authentication handler. That would probably for one upset Adam, for two be kind of funky, no ? Why not? if( $override_handler ) { $r-push_handlers( PerlFixupHandler=__PACKAGE__.'::fixup' ); $r-pnotes-{override_handler}='modperl'; } ... sub fixup { $_[0]-handler($_[0]-pnotes-{override_handler}; return Apache2::Const::OK; } Now, in summary : This is a very specialised authentication module, meant to be used in very specific circumstances and not for general usage. I control the environment, so I can pretty much do what I want as long as it does not crash the system or present some big security hole or the like. In my case, that Location containing the sethandler jakarta-servlet is pretty much unique: it is not a sub- or super-location of anything else, and it fulfills only one very narrow purpose. To my knowledge, there will be no other module playing a role there, other than the jakarta-servlet initial handler, plus whatever I decide to put in there as mod_perl modules and methods. This for the entire duration of one request. Now, assuming I have no other stuff in there than the following lines LocationMatch /servlet.xyz$ SetHandler jakarta-servlet SetEnvIf REQUEST_URI \.(htm|web|css|gif|jpg|js|html?)$ no-jk AuthType MyModule AuthName MyXyzApp PerlSetVar MyModule_var1 value PerlAccessHandler My::Module-some_access_method PerlAuthenHandler My::Module-some_auth_method PerlAuthzHandler My::Module-some_authz_method require valid-user /Location then, if I understand correctly what you write above, since I have no PerlTransHandler, nor Fixup, etc.. I should be able to do the same in the PerlAuthenHandler, is it no so ? Or
Re: 64-bit mod_perl 2 on Mac OSX 10.5 (Leopard)
On Oct 9, 2008, at 7:08 PM, Fred Moyer wrote: Which is what leads me to believe that I need to build x86_64 perl and mod_perl to make it work. Are my assumptions correct? I have found Leopard's default builds to not be that developer friendly (perhaps a good indicator is that you have to install XCode tools to get gcc and do anything). I build perl, mod_perl, and httpd from source on my Leopard platforms. Maybe I don't need to do this, but I've suffered at the hands of Apple's system upgrades enough times that I have found it is worth my while. I ask because I'm having trouble building perl.. When you go through the perl configure process and it asks if you want to specify any additional CFLAGS, type '-fPIC' - this is needed for 64 bit mod_perl. I always build perl with the prefix option, and then add the bin location to my PATH variable, and use that to build mod_perl. Thanks, I figured as much. Perl compilation broke with the following: /perl installperl --destdir= Can't load 'lib/auto/File/Glob/Glob.bundle' for module File::Glob: dlopen(lib/auto/File/Glob/Glob.bundle, 1): no suitable image found. Did find: lib/auto/File/Glob/Glob.bundle: mach-o, but wrong architecture at lib/ XSLoader.pm line 70. at lib/File/Glob.pm line 96 Compilation failed in require at installperl line 132. BEGIN failed--compilation aborted at installperl line 132. make[1]: *** [install.perl] Error 2 make: *** [install] Error 2 Going to configure it and try again. Not sure if I screwed up one of the thousand options or not... chetan
Re: Sleepycat::DbXml problem httpd: symbol lookup error
Felipe de Jesús Molina Bravo wrote: maybe is important to say how compile apache and modperl (it was very difficult): Can you try compiling mod_perl as a shared object? Static module support for mp2 is not as well supported. perl Makefile.PL MP_APXS=/path/to/httpd/apxs I will try it . mmm maybe it is another thread... but I prefer static modper for the next arguments: 1. I guess the static modperl is faster than dynamic I know that dynamic is more maintainable that static; for my aplication i require modperl more soon; Maybe it is faster, maybe it isn't. Either way, it is very unlikely that you would run up against this difference as a bottleneck in your application. 2. When modperl is dynamic i had some segment fault when i share objects at the start of apache; when is static i don't have problem ... (maybe i some errors in my code) That could be - if you could post those faults and also your startup.pl program we may be able to help. there are things that worry me: 1. In my linux distribution (gentoo) there are not any package with static modperl 2. I see that most of the community uses modperl as dynamic ... maybe is it a sign of die the static modperl? Building mod_perl as a static module was the defacto standard with mod_perl1, just as building as a dynamic module is defacto with mod_perl2. I would not try to get caught up in the differences though and suggest that you try to get a working build as a dynamically loaded module. If you encounter problems there, they will definitely be of interest to the rest of us who build mod_perl as a shared object. what is the opinion of community ? greetings
RE: 64-bit mod_perl 2 on Mac OSX 10.5 (Leopard)
45% commission is offered. see below -- My team can work for you and for your projects. http://www.gecpvt.com/NoIpResume.pdf http://gecpvt.com/future_patents/ http://www.gecpvt.com/Jobs http://www.gecpvt.com/Sales srinivas -- CC: modperl@perl.apache.org From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: 64-bit mod_perl 2 on Mac OSX 10.5 (Leopard) Date: Mon, 13 Oct 2008 14:30:43 -0400 On Oct 9, 2008, at 7:08 PM, Fred Moyer wrote: Which is what leads me to believe that I need to build x86_64 perl and mod_perl to make it work. Are my assumptions correct? I have found Leopard's default builds to not be that developer friendly (perhaps a good indicator is that you have to install XCode tools to get gcc and do anything). I build perl, mod_perl, and httpd from source on my Leopard platforms. Maybe I don't need to do this, but I've suffered at the hands of Apple's system upgrades enough times that I have found it is worth my while. I ask because I'm having trouble building perl.. When you go through the perl configure process and it asks if you want to specify any additional CFLAGS, type '-fPIC' - this is needed for 64 bit mod_perl. I always build perl with the prefix option, and then add the bin location to my PATH variable, and use that to build mod_perl. Thanks, I figured as much. Perl compilation broke with the following: /perl installperl --destdir= Can't load 'lib/auto/File/Glob/Glob.bundle' for module File::Glob: dlopen(lib/auto/File/Glob/Glob.bundle, 1): no suitable image found. Did find: lib/auto/File/Glob/Glob.bundle: mach-o, but wrong architecture at lib/ XSLoader.pm line 70. at lib/File/Glob.pm line 96 Compilation failed in require at installperl line 132. BEGIN failed--compilation aborted at installperl line 132. make[1]: *** [install.perl] Error 2 make: *** [install] Error 2 Going to configure it and try again. Not sure if I screwed up one of the thousand options or not... chetan _ Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie. http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008
Re: Windows settings cause crash (originally: FAIL!!!)
You may want to try 2 options: 1. Use an older version of the Apache build like 2.2.6. It has been known to be fairly stable. 2. Try the build from ApacheLounge. It's generally not favoured, but it seems to handle some things better. greg augustine wrote: Also, the ThreadsPerChild is 250 and MaxRequestsPerChild 5 From: [EMAIL PROTECTED] To: modperl@perl.apache.org Subject: FAIL!!! Date: Mon, 13 Oct 2008 07:47:35 -0500 hello, I'm trying to get mod_perl running under Windows. I used the latest perl from ActiveState (5.8.8.824), Apache 2.2.9 from apache.org, and mod_perl 2.0.4, installed from ppm. When I ran a simple perl script and had 20 simulated users hitting the page, it eventually said 'Out of memory!' and restarted with a status of 0. The second time it happened, it tried to restart, but couldn't. Does anyone know if these versions actually work together? If they do, any thoughts on what could be wrong? code: use strict; my $err = 'eh'; my $body; my $errstr = int(rand(2)); print 'Content-type: text/html','\n\n',$err,': ',$errstr,'\nSERVER_ADDR: ',($ENV{'SERVER_ADDR'} || $ENV{'COMPUTERNAME'}),'\n'; if($errstr){ $errstr =~ s/\://g; $errstr =~ s/\n/ /g; $body = 'Error Text: ',$errstr,'\n'; } print '\n'; print scalar(localtime()); if($body){ $body =~ s/\n//g; } print $body; Apache error.log Out of memory! [Fri Oct 10 14:25:34 2008] [notice] Parent: child process exited with status 0 -- Restarting. [Fri Oct 10 14:25:34 2008] [notice] Apache/2.2.9 (Win32) mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations [Fri Oct 10 14:25:34 2008] [notice] Server built: Jun 13 2008 04:04:59 [Fri Oct 10 14:25:34 2008] [notice] Parent: Created child process 1712 [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(487): Parent: Sent the scoreboard to the child [Fri Oct 10 14:25:34 2008] [notice] Disabled use of AcceptEx() WinSock2 API [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Child process is running [Fri Oct 10 14:25:34 2008] [info] Parent: Duplicating socket 244 and sending it to child process 1712 [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(408): Child 1712: Retrieved our scoreboard from the parent. [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(605): Parent: Sent 1 listeners to child 1712 [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(564): Child 1712: retrieved 1 listeners from parent [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Acquired the start mutex. [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Starting 250 worker threads. [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Listening on port 80. Out of memory! [Fri Oct 10 15:07:14 2008] [notice] Parent: child process exited with status 0 -- Restarting. _ See how Windows connects the people, information, and fun that are part of your life. http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/ Get more out of the Web. Learn 10 hidden secrets of Windows Live. Learn Now http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_getmore_092008
Re: Windows settings cause crash (originally: FAIL!!!)
Before changing either detail that Foo JH pointed out, first try backing down to activestate perl 5.8 build 820(?). It seemed to be a very stable build for most people's use. Foo JH wrote: You may want to try 2 options: 1. Use an older version of the Apache build like 2.2.6. It has been known to be fairly stable. 2. Try the build from ApacheLounge. It's generally not favoured, but it seems to handle some things better. greg augustine wrote: Also, the ThreadsPerChild is 250 and MaxRequestsPerChild 5 From: [EMAIL PROTECTED] To: modperl@perl.apache.org Subject: FAIL!!! Date: Mon, 13 Oct 2008 07:47:35 -0500 hello, I'm trying to get mod_perl running under Windows. I used the latest perl from ActiveState (5.8.8.824), Apache 2.2.9 from apache.org, and mod_perl 2.0.4, installed from ppm. When I ran a simple perl script and had 20 simulated users hitting the page, it eventually said 'Out of memory!' and restarted with a status of 0. The second time it happened, it tried to restart, but couldn't. Does anyone know if these versions actually work together? If they do, any thoughts on what could be wrong? code: use strict; my $err = 'eh'; my $body; my $errstr = int(rand(2)); print 'Content-type: text/html','\n\n',$err,': ',$errstr,'\nSERVER_ADDR: ',($ENV{'SERVER_ADDR'} || $ENV{'COMPUTERNAME'}),'\n'; if($errstr){ $errstr =~ s/\://g; $errstr =~ s/\n/ /g; $body = 'Error Text: ',$errstr,'\n'; } print '\n'; print scalar(localtime()); if($body){ $body =~ s/\n//g; } print $body; Apache error.log Out of memory! [Fri Oct 10 14:25:34 2008] [notice] Parent: child process exited with status 0 -- Restarting. [Fri Oct 10 14:25:34 2008] [notice] Apache/2.2.9 (Win32) mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations [Fri Oct 10 14:25:34 2008] [notice] Server built: Jun 13 2008 04:04:59 [Fri Oct 10 14:25:34 2008] [notice] Parent: Created child process 1712 [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(487): Parent: Sent the scoreboard to the child [Fri Oct 10 14:25:34 2008] [notice] Disabled use of AcceptEx() WinSock2 API [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Child process is running [Fri Oct 10 14:25:34 2008] [info] Parent: Duplicating socket 244 and sending it to child process 1712 [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(408): Child 1712: Retrieved our scoreboard from the parent. [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(605): Parent: Sent 1 listeners to child 1712 [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(564): Child 1712: retrieved 1 listeners from parent [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Acquired the start mutex. [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Starting 250 worker threads. [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Listening on port 80. Out of memory! [Fri Oct 10 15:07:14 2008] [notice] Parent: child process exited with status 0 -- Restarting. _ See how Windows connects the people, information, and fun that are part of your life. http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/ Get more out of the Web. Learn 10 hidden secrets of Windows Live. Learn Now http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_getmore_092008