RE: client-side certificate extraction
To the next guy, To answer my question with what I have: My requirement has been pushed out 6 months, so I'm done for now. The Gunther Birznieks/www.extropia.com project has modules to do some of the things I queried about. I looked at it but ran out of time before I found what I would need. I also found where various training issues are likely because certificates may have to be bought and the browser or web server might not necessarily handle problems gracefully/friendly and the issue of revocation does not have a widely used tool for processing certificate status updates. Chuck Modssl manual on client side certs (setup only - not programming): http://www.modssl.org/docs/2.8/ssl_faq.html Quote from Gunther Birznieks (from an old post): "If you download our Perl objects @ http://www.extropia.com/development/webware2/webware2.html, I have an AuthManager::Certificate which implements client certificate authentication. Probably the best place to download the code for that is on the extropia perl project at sourceforge if you want to see the implementation. It's actually "trivial" because mod_ssl will decode the certificate into extra environment variables indicating stuff like the DN of the user. It's a requirement of SSL to make sure the certificate is valid based on the certificate's signature(s). At that point, then you need to deal with certificate revocation which is another matter. A lot of servers back up certificate authentication with LDAP. So the client sends the cert which verifies that they are who they say they are, but LDAP needs to be used to actually get the relevant authorization information out. If you use the framework we have, that is accomplished by configuring the use of AuthManager::Certificate against Auth::LDAP. Auth::Cache::Session can optionally be used to speed up the process. Chapter 20 on the link I gave you has details on why we broke up the modules the way we did. Note that this is not to be confused with a handler. This is application level logic. mod_ssl already handles certificate decoding so you really don't need a handler anymore. At that point it seems like app logic to take the user and figure out what you want them to do. Of course, you can code authorization info into a cert like the roles that they are intended for. But I think that's IMHO, a really BAD way to do it because you have to revoke the cert to change the permissions of the user. Best to leave the cert to identify the user and allow a dynamic datastore to determine what they can do in most cases. Later, Gunther PS The hard part about client certificates isn't using them, its managing them and the customers that use them." = References for Related subjects The book "Microsoft® Windows® 2000 Active Directory(tm) Programming" has several pages on programming with LDAP on Windows Active Directory. According to Gunther, LDAP is used in this process somehow. -Original Message- From: Goehring, Chuck Mr., RCI - San Diego Sent: Tuesday, September 16, 2003 10:26 AM To: [EMAIL PROTECTED] Apache. Org (E-mail) Subject: client-side certificate extraction ModPerlers, We have a requirement to change our web servers to require client-side ssl certificates by Oct 1, 2003. Can someone give me some pointers on how mod_perl might be used to extract the user's name at login time. I suspect this might require a handler. This might be used to avoid multiple logins. Thanks Chuck
client-side certificate extraction
ModPerlers, We have a requirement to change our web servers to require client-side ssl certificates by Oct 1, 2003. Can someone give me some pointers on how mod_perl might be used to extract the user's name at login time. I suspect this might require a handler. This might be used to avoid multiple logins. Thanks Chuck <>
[mp2] Content-Type not being set as expected
mp2 Guys, I am getting xml (seemingly) instead of html 3.2 out of Apache2/ModPerl::Registry/CGI.pm. I'm setting content type in my code like this: use CGI qw/:standard :html3/; ... print header(-type=>'text/html'); Has some default changed or a switch I need to set. Netscape 7.02 is barfing on this style of code. MSIE 5.5 and NN 4.79 work fine with it. I'm getting this: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml"; lang="en-US"> I'm expecting this: ... Conf file: SetHandler perl-script PerlResponseHandler ModPerl::Registry Options +ExecCGI PerlOptions +ParseHeaders Thanks in advance Chuck
RE: stopping concurrent logins
Robert, When I was designing the security for a perl/cgi system I spent a lot of time on the cookie issue. I don't have any problem myself with servers putting cookies on my machine. The subject happened to come up with one of the guys that works on the LAN at a customer of ours. He is violently against cookies. He is a technical person and works on computers but has this extreme aversion to "people tracking what he is doing". I think it's more of a baseless fear of the unknown myself. Anyway, upon further investigation into this, some of the docs I read indicated cookies aren't all that reliable and will get lost if there are too many of them or the data gets too large. Apparently, the spec allows the browser to toss the data if it wants. So, I ended up using hidden variables. It is a bit of a chore, but I have never encountered an objection from a user or a session getting dropped because the data got lost. It certainly avoids the potential controversy that may come up over cookies. Chuck -Original Message- From: Robert Landrum [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 11:53 AM To: [EMAIL PROTECTED] Subject: Re: stopping concurrent logins On Fri, Apr 04, 2003 at 03:34:25PM +0200, Frank Maas wrote: > You can set a session (see Apache::Session and related modules) that > can use the uri as session-container as well (eg > http://www.example.com/9o79876a98d7fa98d7/path/to/doc). The session > part (9o79876a98d7fa98d7) can be stored in a database. > > Success. Technically, that doesn't solve the problem either. Since the session information is in the URL, there is nothing to stop the user from IM that URL to their friend, who then has total access, without a cookie, just by using the current users session. I must not fully understand the taboo against using cookies. It's rare that an online application, e-commerce related or otherwise, works without cookies. If you're doing anything more than browsing static data, you'll quickly become fustrated at the lack of support for non-cookie-enabled browers. Anytime web based authentication is used, people are going to need cookies. Maintaining state and security within a stateless medium is almost impossible without cookies, in my experience. I've heard of, but never seen, authentication using java or flash that maintains a persistent connection in the background using sockets to the web server. This basically "registers" the user's IP address with the system, and all users with that IP are considered authenticated. I'm sure more complicated solutions exist. Sorry I don't have a solution to your problem. But perhaps the problem is the requirement to not use cookies... :) Good luck, Rob > > --Frank -- Robert Landrum Systems Programmer
RE: Oracle9.2 and mod_perl - advice sought
Jim, Easiest would be to try to connect as scott password tiger and run: select EMPNO,ENAME,JOB,MGR,HIREDATE from emp (assuming you chose to load the examples) That will save you having to load data. Chuck -Original Message- From: Jim Morrison [Mailing-Lists] [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 1:35 AM To: [EMAIL PROTECTED] Subject: RE: Oracle9.2 and mod_perl - advice sought Chris, Dmitri, Chuck, Thank you all.. Have got myself a safari bookshelf and cpan shell at the ready.. Wish me luck... Databases here I come ;-) - Jim > -Original Message- > From: Christopher Taranto [mailto:[EMAIL PROTECTED] > Sent: 25 March 2003 22:13 > To: [EMAIL PROTECTED] > Subject: Re: Oracle9.2 and mod_perl - advice sought > > > This book might be useful to you too! > > Perl for Oracle DBAs > http://www.oreilly.com/catalog/oracleperl/ > > HTH, > > Christopher Taranto > > At 06:12 PM 3/25/03 +, you wrote: > >Hello all, > > > >Quick request for advice/direction... > > > >I'm about to take receipt of an Oracle 9.2 server - for the development > >of a site/product/service.. I'm happiest writing Perl - under mod_perl > >- so I'd like to stick to that, but most importantly I need the solution > >with the lowest transaction overheads.. (The webserver and OracleDB are > >going to be on different boxes..) > > > >I'm told the best solution is to use SQLNet(?) rather than ODBC.. ?? > > > >I've managed to get my XML'ing to a level that allows me to avoid > >databases thus far ;-) So I have little experience of what the best > >direction is... Any recommendations of modules, other lists etc.. would > >be very much appreciated.. > > > >Thank you kindly :-) > > > >Jimbo
RE: Oracle9.2 and mod_perl - advice sought
Jim, ODBC is not the way to go for Oracle if you can. Early on I tried using ODBC and I had crashes and hang-ups. Performance is substantially better also. The modules below and the oci libraries in the Oracle install will get it for you. This version works with the 9i Release 2 for me. DBD-Oracle-1.12.tar.gz DBI-1.32.tar.gz Using separate boxes works fine. Chuck -Original Message- From: Jim Morrison [Mailing-Lists] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 10:13 AM To: [EMAIL PROTECTED] Subject: Oracle9.2 and mod_perl - advice sought Hello all, Quick request for advice/direction... I'm about to take receipt of an Oracle 9.2 server - for the development of a site/product/service.. I'm happiest writing Perl - under mod_perl - so I'd like to stick to that, but most importantly I need the solution with the lowest transaction overheads.. (The webserver and OracleDB are going to be on different boxes..) I'm told the best solution is to use SQLNet(?) rather than ODBC.. ?? I've managed to get my XML'ing to a level that allows me to avoid databases thus far ;-) So I have little experience of what the best direction is... Any recommendations of modules, other lists etc.. would be very much appreciated.. Thank you kindly :-) Jimbo
RE: Where do you put your stuff?
Perrin, Thanks. Sometimes the docs tell you the most complicated way to do things for academic purity. Chuck -Original Message- From: Perrin Harkins [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 3:21 PM To: Goehring, Chuck Mr., RCI - San Diego Cc: [EMAIL PROTECTED] (E-mail) Subject: Re: Where do you put your stuff? Goehring, Chuck Mr., RCI - San Diego wrote: > Where do you put your .pm files for application-specific code? Under mod_perl 1, I just put them in /lib/perl, which is automatically added to @INC by mod_perl. Can someone confirm if this still works for mp2? Of course you can just put a "use lib" in your startup.pl, assuming that you are doing this for a server where you know the locations of things. - Perrin
Where do you put your stuff?
To all, Years ago, I found a module called FindBin that at least seamed to solved many problems. I use it in mod_perl code (I'm on Win 2000) like this: use FindBin qw($Bin); use lib "$Bin/sims";# Directory for specific application. use lib "$Bin/common"; # Directory for common stuff. Under mod_perl 2 this doesn't seam to work any more. Looking at all the stuff on perl.apache.org I figured I'd finally ask you guys these questions: Where do you put your .pm files for application-specific code? Which method of lib, use lib, use etc do you use, so these modules can be found. Thanks Chuck
RE: mp2 building dependant libwin32-0.191 fails tests
Randy Yeah, I skipped the nmake install for libwin. Added all the other stuff and works much better. Thanks for all your efforts to help us. Chuck -Original Message- From: Randy Kobes [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 11, 2003 10:56 AM To: Goehring, Chuck Mr., RCI - San Diego Cc: [EMAIL PROTECTED] (E-mail) Subject: Re: mp2 building dependant libwin32-0.191 fails tests On Tue, 11 Mar 2003, Goehring, Chuck Mr., RCI - San Diego wrote: > Dear mod_perlers, I'm building mod_perl-1.99_08 for apache2. > Currently have the following built: > > httpd-2.0.44 > openssl-0.9.7a.tar.gz > perl-5.8.0.tar.gz > zlib-1.1.4.tar.gz > > In order to run the tests for mod_perl, I had to install > libwin32-0.191.tar.gz (to get Process.pm and ???). This lib bombed > its test with the following: [ .. ] The libwin32 package may not pass all the tests, depending on your Win32 flavour. You should go ahead and install it anyway, as it's needed for the mod_perl tests. > I have a directory E:\src_apache2\mod_perl-1.99_08\t\ that > contains a perl script called test. There is no t.t or test.t > in the whole heirarchy. The mod_perl tests do differ in that respect from tests in other packages, but that's by construction. > Just in case the test was bad, I went ahead and build mod_perl > anyway. It had a lot of errors also: > > Failed Test Stat Wstat Total Fail Failed List of Failed > apache\cgihandler.t22 100.00% 1-2 [ .. ] Did you install libwin32 before running the mod_perl tests? Also, have you installed the libwww-perl package and friends? -- best regards, randy kobes
mp2 building dependant libwin32-0.191 fails tests
Dear mod_perlers, I'm building mod_perl-1.99_08 for apache2. Currently have the following built: httpd-2.0.44 openssl-0.9.7a.tar.gz perl-5.8.0.tar.gz zlib-1.1.4.tar.gz In order to run the tests for mod_perl, I had to install libwin32-0.191.tar.gz (to get Process.pm and ???). This lib bombed its test with the following: ok 244 ok 245 E:\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, '. \blib\lib', '..\blib\arch')" t\test.t t\testok 4/18not ok 5 Can't add a user so there really isn't any point in continuing... t\testdubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 5-18 Failed 14/18 tests, 22.22% okay Failed Test Stat Wstat Total Fail Failed List of Failed --- t\test.t 255 6528018 14 77.78% 5-18 Failed 1/1 test scripts, 0.00% okay. 14/18 subtests failed, 22.22% okay. NMAKE : fatal error U1077: 'E:\perl\bin\perl.exe' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop. I have a directory E:\src_apache2\mod_perl-1.99_08\t\ that contains a perl script called test. There is no t.t or test.t in the whole heirarchy. Just in case the test was bad, I went ahead and build mod_perl anyway. It had a lot of errors also: Failed Test Stat Wstat Total Fail Failed List of Failed --- apache\cgihandler.t22 100.00% 1-2 apache\post.t 21 50.00% 2 apache\scanhdrs.t 9 2304 44 100.00% 1-4 apache\scanhdrs2.t 54 80.00% 1-2 4-5 api\sendfile.t 32 66.67% 2-3 compat\request_body.t 55 100.00% 1-5 compat\send_fd.t 32 66.67% 2-3 directive\perl.t 42 50.00% 2-3 directive\perlloadmodule2.t33 100.00% 1-3 directive\perlloadmodule3.t33 100.00% 1-3 directive\perlmodule.t 11 100.00% 1 directive\perlrequire.t22 100.00% 1-2 directive\setupenv.t 31 33.33% 2 filter\input_body.t22 100.00% 1-2 filter\lc.t11 100.00% 1 filter\reverse.t 22 100.00% 1-2 hooks\access.t 42 50.00% 2-3 hooks\trans.t 33 100.00% 1-3 modperl\getc.t 21 50.00% 2 modperl\readline.t 21 50.00% 2 modperl\sameinterp.t 9 230412 12 100.00% 1-12 modules\include.t 65 83.33% 1 3-6 modules\include2.t 43 75.00% 1 3-4 61 tests skipped. !!! error running tests (please examine t\logs\error_log) NMAKE : fatal error U1077: 'E:\perl\bin\perl.exe' : return code '0x1' Stop. What do I do next. Thanks Chuck
Apache version for use with SSL on Windows
To the group, I'm running the configuration listed below. I've delayed adding SSL for as long as I can, but now I have to do it. It is for a government site and they want their sites to use SSL all the time (no port 80 connections at all). So, is Apache 2.x and mod_perl ready for operating in this mode on Windows? Anybody running 2.0 in production on Windows 2000? Input greatly appreciated. Thanks Chuck Build Workstation Software: Visual C++ 6.0 Apache Modules Used: apache_1.3.26source.tar.gz mod_perl-1.27.tar.gz mod_jk1.2.0 PERL Modules Used: MIME-Lite-1.145.tar.gz perl_560_stable.zip DBD-ODBC-0.28.tar.gz ApacheDBI-0.87.tar.gz DBI-1.13.tar.gz libnet-1.0703.tar.gz Apache-Session-1.03.tar.gz MD5-1.7.tar.gz Spreadsheet-WriteExcel-0.10.tar.gz DBD-Oracle-1_03_tar.gz URI-1.07.tar.gz MIME-Base64-2_11_tar.gz Apache Tomcat: Apache Tomcat 4.1.12 Server Software: Oracle 8I 8.1.6 Oracle Client Software Oracle Programmer (for the OCI libraries) Windows 2000
RE: [mp1.27] Too much logging
Geoffrey, That and the following did the trick: use warnings; no warnings; Thanks Chuck -Original Message- From: Geoffrey Young [mailto:[EMAIL PROTECTED]] Sent: Monday, January 27, 2003 10:56 AM To: Goehring, Chuck Mr., RCI - San Diego Cc: mod perl list (E-mail) Subject: Re: [mp1.27] Too much logging Goehring, Chuck Mr., RCI - San Diego wrote: > > I'm running Apache 1.3.26/mod_perl 1.27 (Win32). This version I built in response >to one of the security alerts. New with this version, I get extremely strict error >logging like this: > > Use of uninitialized value in substitution (s///) at >e:/apache/cgi-perl/dbqueryobj/DBQUERYOBJ.pm line 1880. > Use of uninitialized value in substitution (s///) at >e:/apache/cgi-perl/dbqueryobj/DBQUERYOBJ.pm line 1881. > Use of uninitialized value in substitution (s///) at >e:/apache/cgi-perl/dbqueryobj/DBQUERYOBJ.pm line 1882. > Use of uninitialized value in length at >e:/perl/site/5.6.0/lib/Spreadsheet/WriteExcel/Worksheet.pm line 1353. > Use of uninitialized value in length at >e:/perl/site/5.6.0/lib/Spreadsheet/WriteExcel/Worksheet.pm line 1357. > Use of uninitialized value in join at >e:/perl/site/5.6.0/lib/Spreadsheet/WriteExcel/Worksheet.pm line 1105. > > This highights less that optimal perl code, which is good, but is ther a way to >toggle it on and off. it makes big fat logs. Obvoisly, the thing to do is improve >the code, but not all the code is mine and I'd rather not have the performance hit in >production. It would be good to be able to toggle it on and off while the coding is >improved. > > Can someone help please. PerlWarn Off will probably do the trick. --Geoff
[mp1.27] Too much logging
I'm running Apache 1.3.26/mod_perl 1.27 (Win32). This version I built in response to one of the security alerts. New with this version, I get extremely strict error logging like this: Use of uninitialized value in substitution (s///) at e:/apache/cgi-perl/dbqueryobj/DBQUERYOBJ.pm line 1880. Use of uninitialized value in substitution (s///) at e:/apache/cgi-perl/dbqueryobj/DBQUERYOBJ.pm line 1881. Use of uninitialized value in substitution (s///) at e:/apache/cgi-perl/dbqueryobj/DBQUERYOBJ.pm line 1882. Use of uninitialized value in length at e:/perl/site/5.6.0/lib/Spreadsheet/WriteExcel/Worksheet.pm line 1353. Use of uninitialized value in length at e:/perl/site/5.6.0/lib/Spreadsheet/WriteExcel/Worksheet.pm line 1357. Use of uninitialized value in join at e:/perl/site/5.6.0/lib/Spreadsheet/WriteExcel/Worksheet.pm line 1105. This highights less that optimal perl code, which is good, but is ther a way to toggle it on and off. it makes big fat logs. Obvoisly, the thing to do is improve the code, but not all the code is mine and I'd rather not have the performance hit in production. It would be good to be able to toggle it on and off while the coding is improved. Can someone help please. Thanks Chuck
RE: Perl Cookbook modperl chapter
Nathan, Something to keep in mind is that there are a lot of us out here that use mod_perl, but don't write handlers. Nobody wants a slow system, so mod_perl must be used. I bought "Writing Apache Modules with Perl and C" years ago, but haven't had much need for the capabilities it discusses. On the other hand, I have used the Cookbook extensively. So, an expansion of the cgi programming info from the 1998 book, with more detail on using mod_perl to improve performance and increase security, might be the appropriate level of coverage. Chuck -Original Message- From: Nathan Torkington [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 12:58 PM To: [EMAIL PROTECTED] Subject: Perl Cookbook modperl chapter I need some people with brains (instead of the warm gray mush filling my head, the effects of becoming an editor) to look over the first 1/3 or so of a mod_perl chapter for the upcoming Perl Cookbook. I need people to read the work for accuracy. If you're interested, send me mail: <[EMAIL PROTECTED]>. I also need help on content. I'm not competing with Geoff, Randy, and Paul's excellent book (mod_perl Developer's Cookbook)--they have 630 pages to cover way more topics than I do. Their book will always be the definitive place for a hard-core mod_perl developer to go--in fact, I'll have them in the See Also sections of the Perl Cookbook. But I need to cover 15-20 topics that most people of beginning to intermediate mod_perl use will encounter. Current recipe list: [gnat:~] grep head1 Ora/pcb2/ch21.pod =head1 Introduction =head1 Authenticating in mod_perl =head1 Setting Cookies in mod_perl =head1 Accessing Cookie Values from mod_perl =head1 Redirecting the Browser from mod_perl =head1 Interrogating Headers in mod_perl Handlers =head1 Accessing Form Parameters from mod_perl =head1 Receiving Uploaded Files in mod_perl All suggestions appreciated. Thanks, Nat
RE: win32 testing only?
Jon, A similar attitude is expressed in the Apache Server documentation for the past 4+ years. Chuck -Original Message- From: Jon Reinsch [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 9:19 AM To: [EMAIL PROTECTED] Subject: win32 testing only? At http://perl.apache.org/docs/1.0/guide/getwet.html#Installing_mod_perl_for_Window it says: "we recommend that mod_perl on Windows be used only for testing purposes, not in production" Does this apply to mod_perl 1.0 only, or to 2.0 as well? If both, is it likely to change anytime soon? (I reached the page above by going to http://perl.apache.org/start/index.html, clicking on "Get Your Feet Wet", and then on "Installing mod_perl for Windows".)
RE: can't fine ModuleConfig.c.
Thanks. You are the hero of us lonely Windows Apache users. Chuck -Original Message- From: Randy Kobes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 14, 2002 11:10 PM To: Goehring, Chuck Mr., RCI - San Diego Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: can't fine ModuleConfig.c. On Mon, 12 Aug 2002, Goehring, Chuck Mr., RCI - San Diego wrote: > Randy, > > I'm using Perl 5.6.0 for this. Should I be using 5.8.0? Does > that affect ModuleConfig.c? > > Having problems running things with the version I put out last > week. It complains about the dumbest things and is overly > strict. > > Thanks > Chuck I'm not sure if this will help, but an error you had in an earlier message for 'perl Makefile.PL' indicated you didn't have touch() on your system (which is typical for Win32). You might want to try the attached patch to Makefile.PL, which uses a perl command for touch(). -- best regards, randy
RE: can't fine ModuleConfig.c.
Randy, My server barfed and I had to re-format. Do you think I ought to go with Apache 2? I need to get to full time ssl to meet the security requirements anyway. I was planning to do this when I go hit with the need to close that vulnerability in Apache. Is the 2.0 ready for prime time on Win 2000? I really would like to get off this pathetic single-threaded arrangement with Apache 1.x. Thanks Chuck -Original Message- From: Randy Kobes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 13, 2002 9:03 AM To: Goehring, Chuck Mr., RCI - San Diego Cc: mod perl list (E-mail) Subject: RE: can't fine ModuleConfig.c. On Mon, 12 Aug 2002, Goehring, Chuck Mr., RCI - San Diego wrote: > Randy, > > I'm using Perl 5.6.0 for this. Should I be using 5.8.0? Does > that affect ModuleConfig.c? There may be some advantages to using 5.8.0 with mod_perl-2 on Win32, but 5.6.1 should be fine with mod_perl-1. > > Having problems running things with the version I put out last > week. It complains about the dumbest things and is overly > strict. > > Thanks > Chuck What sort of things appear in the error log? Is it possible to give a short example which exhibits the problem? -- best regards, randy
RE: can't fine ModuleConfig.c.
Randy, I'm using Perl 5.6.0 for this. Should I be using 5.8.0? Does that affect ModuleConfig.c? Having problems running things with the version I put out last week. It complains about the dumbest things and is overly strict. Thanks Chuck -Original Message- From: Randy Kobes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 06, 2002 12:34 PM To: Goehring, Chuck Mr., RCI - San Diego Cc: mod perl list (E-mail) Subject: RE: can't fine ModuleConfig.c. On Sun, 4 Aug 2002, Goehring, Chuck Mr., RCI - San Diego wrote: > Randy, > > Got things working - had to get that thing into production > before the security folks took us out of the dns. > > Failed modperl's test because the test required Process.pm > which in turn required the entire libwin32 (which died during > compile). On the modperl side, I deleted ModuleConfig.c fom > the project and it compiled. Are you using a recent ActivePerl? The libwin32 suite should be there, if you are ... > > Did: >perl Makefile.PL >nmake install >Built .so file using VC++ IDE. >nmake test (died because of Process.pm) >nmake install > > Did not modify any make or provide any options to Makefile.PL > > > As dangerous as this seams, it did run and passed minimal > testing. Have had no reports of problems from the users. It > isn't doing e-commerce or the like. > > Something is up with ModuleConfig.c though. I don't know what > that file does. We use mod_perl just to speed up cgis so maybe > it isn't needed for my purposes. I'll try to look into what's up with ModuleConfig.c ... best regards, randy
RE: can't fine ModuleConfig.c.
Randy, Got things working - had to get that thing into production before the security folks took us out of the dns. Failed modperl's test because the test required Process.pm which in turn required the entire libwin32 (which died during compile). On the modperl side, I deleted ModuleConfig.c fom the project and it compiled. Did: perl Makefile.PL nmake install Built .so file using VC++ IDE. nmake test (died because of Process.pm) nmake install Did not modify any make or provide any options to Makefile.PL As dangerous as this seams, it did run and passed minimal testing. Have had no reports of problems from the users. It isn't doing e-commerce or the like. Something is up with ModuleConfig.c though. I don't know what that file does. We use mod_perl just to speed up cgis so maybe it isn't needed for my purposes. Thanks Chuck -Original Message- From: Randy Kobes [mailto:[EMAIL PROTECTED]] Sent: Friday, August 02, 2002 6:06 PM To: Goehring, Chuck Mr., RCI - San Diego Subject: Re: can't fine ModuleConfig.c. On Thu, 1 Aug 2002, Goehring, Chuck Mr., RCI - San Diego wrote: > > > Please disregard other messages. This is the one I'm stuck on. > Everything builds except the ModuleConfig.c. > > I didn't include the list, as I'm not sure about this ... Did you build things as perl Makefile.PL APACHE_SRC=\Apache and, if so, were there any errors? At least one person noticed a missing touch() command, which you can do by hand, and then the rest of the build went OK ... -- best regards, randy kobes
can't fine ModuleConfig.c.
Please disregard other messages. This is the one I'm stuck on. Everything builds except the ModuleConfig.c.
RE: Building with VC++ neads awk???
Got past that one. Now it can't fine ModuleConfig.c. Seams to be the same problem but all the rest worked after doing perl makefile.pl and nmake install (why isn't this nmake prep?) Please help -Original Message----- From: Goehring, Chuck Mr., RCI - San Diego Sent: Thursday, August 01, 2002 2:47 PM To: mod perl list (E-mail) Subject: Building with VC++ neads awk??? To all, Trying to hurriedly build mod_perl 1.27 and Apache 1.3.26. Getting error bulding mod_perl like at the bottom of this message. I think this is because awk is needed to convert the .xs files to .c(). Can't remember how to put this in in VC++. It was somewhere in one of he instructions from the previous releases. I may not even be on the right track, can't remember. Anyone have the answer handy. Trying to get this out fast because the security folks are on us. Thanks Chuck Build : warning : failed to (or don't know how to) build 'E:\src\mod_perl-1.27\src\modules\perl\Util.c' Compiling... Apache.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\Apache.c': No such file or directory Connection.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\Connection.c': No such file or directory Constants.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\Constants.c': No such file or directory File.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\File.c': No such file or directory Log.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\Log.c': No such file or directory mod_perl.c E:\src\mod_perl-1.27\src\modules\perl\mod_perl.h(90) : fatal error C1083: Cannot open include file: 'mod_perl_version.h': No such file or directory mod_perl_opmask.c E:\src\mod_perl-1.27\src\modules\perl\mod_perl.h(90) : fatal error C1083: Cannot open include file: 'mod_perl_version.h': No such file or directory ModuleConfig.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\ModuleConfig.c': No such file or directory perl_config.c E:\src\mod_perl-1.27\src\modules\perl\mod_perl.h(90) : fatal error C1083: Cannot open include file: 'mod_perl_version.h': No such file or directory perl_util.c E:\src\mod_perl-1.27\src\modules\perl\mod_perl.h(90) : fatal error C1083: Cannot open include file: 'mod_perl_version.h': No such file or directory perlio.c E:\src\mod_perl-1.27\src\modules\perl\mod_perl.h(90) : fatal error C1083: Cannot open include file: 'mod_perl_version.h': No such file or directory perlxsi.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\perlxsi.c': No such file or directory Server.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\Server.c': No such file or directory Table.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\Table.c': No such file or directory URI.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\URI.c': No such file or directory Util.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\Util.c': No such file or directory Error executing cl.exe. mod_perl.so - 16 error(s), 1 warning(s)
Building with VC++ neads awk???
To all, Trying to hurriedly build mod_perl 1.27 and Apache 1.3.26. Getting error bulding mod_perl like at the bottom of this message. I think this is because awk is needed to convert the .xs files to .c(). Can't remember how to put this in in VC++. It was somewhere in one of he instructions from the previous releases. I may not even be on the right track, can't remember. Anyone have the answer handy. Trying to get this out fast because the security folks are on us. Thanks Chuck Build : warning : failed to (or don't know how to) build 'E:\src\mod_perl-1.27\src\modules\perl\Util.c' Compiling... Apache.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\Apache.c': No such file or directory Connection.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\Connection.c': No such file or directory Constants.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\Constants.c': No such file or directory File.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\File.c': No such file or directory Log.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\Log.c': No such file or directory mod_perl.c E:\src\mod_perl-1.27\src\modules\perl\mod_perl.h(90) : fatal error C1083: Cannot open include file: 'mod_perl_version.h': No such file or directory mod_perl_opmask.c E:\src\mod_perl-1.27\src\modules\perl\mod_perl.h(90) : fatal error C1083: Cannot open include file: 'mod_perl_version.h': No such file or directory ModuleConfig.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\ModuleConfig.c': No such file or directory perl_config.c E:\src\mod_perl-1.27\src\modules\perl\mod_perl.h(90) : fatal error C1083: Cannot open include file: 'mod_perl_version.h': No such file or directory perl_util.c E:\src\mod_perl-1.27\src\modules\perl\mod_perl.h(90) : fatal error C1083: Cannot open include file: 'mod_perl_version.h': No such file or directory perlio.c E:\src\mod_perl-1.27\src\modules\perl\mod_perl.h(90) : fatal error C1083: Cannot open include file: 'mod_perl_version.h': No such file or directory perlxsi.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\perlxsi.c': No such file or directory Server.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\Server.c': No such file or directory Table.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\Table.c': No such file or directory URI.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\URI.c': No such file or directory Util.c fatal error C1083: Cannot open source file: 'E:\src\mod_perl-1.27\src\modules\perl\Util.c': No such file or directory Error executing cl.exe. mod_perl.so - 16 error(s), 1 warning(s)
RE: Using a module that is not quite mod_perl compliant
Perrin, Thanks, I should have known that, but I haven't had this problem before. Chuck -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 26, 2002 7:48 PM To: Goehring, Chuck Mr., RCI - San Diego Cc: [EMAIL PROTECTED] Subject: Re: Using a module that is not quite mod_perl compliant > If a third-party module uses global variables internally that causes > persistence of the data under mod_perl, is there a fix. You can manually clear them in a cleanup handler. If they're in a separate package, you can clear the whole namespace of the package. Take a look at the code for this in Apache::PerlRun. - Perrin
Using a module that is not quite mod_perl compliant
To the list of mod_perl experts, If a third-party module uses global variables internally that causes persistence of the data under mod_perl, is there a fix. This particular module has a lot of dependencies on other modules, so "fixing" the third-party stuff may not be practical. It really saves me a lot of work, but I obviously can't use it if I'll have multi-user data corruption. Currently running on Win2000, Apache 1.3.12 and mod_perl 1.24, perl 5.6.0. It is a cgi that runs under Apache::Registry. It doesn't do any of the exotic "handler" stuff that mod_perl does - it's just a cgi that queries Oracle. Any canned solutions to this type of problem? Would moving my code to a module help? Thanks Chuck Goehring
RE: Mail::Sender & modperl.
Richard, I also use MIME::Lite (on Win2000) with mod_perl. Found it to be quite reliable and it supports attachments and receipts like so: if($aReceipt ne '') { # If return receipt requested. $msg->add("Disposition-Notification-To"=> $aApobj->getEmail_Address); } Chuck -Original Message- From: Richard Clarke [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 20, 2002 6:28 AM To: [EMAIL PROTECTED] Subject: Mail::Sender & modperl. List, Have any of you had any problems using Mail::Sender from within mod_perl. My script seems to just sit there waiting for $sender->Open to do anything. I will email the author also but imagined he *might* not be familiar with mod_perl so won't be able to offer any suggestions. Anyone? I looked through the archives but saw no reference to a problem like this. Some people indicated much success with Mail::Sender (not so for me however!). Second, the recommended solution for sending mails is to instead put them on a queue for an external daemon to handle. My question is, is there a standard implementation people use when doing this. Is the KISS theory invoked and the outoing mail simply written to some plain text spool file or do people use something more involved like writing the to,cc,from,subject,body test to a database and storing any temporary files (attachment) in a directory for later encoding? Ric p.s. here is an excerpt from my apache log indicating precisely what happens >> 220 mail.likewhoa.com ESMTP Postfix 421 Error: timeout exceeded << ehlo localhost << mail from: <[EMAIL PROTECTED]> << rcpt to: <[EMAIL PROTECTED]> << data << To: [EMAIL PROTECTED] << From: [EMAIL PROTECTED] << X-Mailer: Perl script "null" << using Mail::Sender 0.7.14.1 by Jenda Krynicky << running on localhost (127.0.0.1) << under account "root" << Date: Sat, 20 Jul 2002 13:18:12 - << Message-ID: <[EMAIL PROTECTED]> << Subject: msg msg msg << close sender << << . << quit done The request took 305.710375070572 seconds
RE: IndigoPerl Apache not responding
Melissa, You can ignore the unclean shutdown message - it just means Apache wasn't stopped gracefully via the command to stop it. On windows, I always do ctrl-c to stop it. For production, you will probably install it as a service and use the services controller(in Administrative Tools of Control Panel) to start & stop it. As far as "typing somthing in", you don't. Apache has no user interface, it just sits there "listening" for someone to talk http protocol to it. You control how Apache operates by putting "Directives" in its configuration files (in the conf directory under the Apache directory). Apache is running when it doesn't kick you back to the command prompt. When Apache is running you can enter http:// folowed by the ip address of the machine and you should get a web page back. Haven't heard of IndigoPerl, but it sounds like they have built (with a compiler from the source files) Apache and perl and put them in a zip to make things easier. Read their stuff (http://www.indigostar.com/indigoperl.htm) and look at their site to find out about configuring the server. Also see apache.org and perl.com for more information. Chuck -Original Message- From: Melissa [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 4:02 PM To: [EMAIL PROTECTED] Subject: IndigoPerl Apache not responding I downloaded IndigoPerl. I started the Apache server and it says at the top of it [warn] pid file c:/unzipped/indigoperl5-6/logs/gttpd.pid overwritten -- unclean shutdown of previous Apache run? Apache/1.3.20 (Win32) mod_perl1.25 running... but when I try to type something it doesn't respond. Should I uninstall the program and reinstall it and unzip it differently? What does the unclean shut down mean? Thanks a bunch, wickham26 Do You Yahoo!? Sign-up for Video Highlights of 2002 FIFA World Cup
[OT] RE DBD: :RAM Woes
Gabriel Emailed the author of DBD::RAM and got nearly and instantaneous response as below. Chuck Hi, DBD::RAM has been replaced by DBD::AnyData which does everything DBD::RAM did and much more (I'm the author of both). Download and install AnyData, SQL::Statement and then DBD::AnyData in that order and you should be set to go. Sorry for the problems with RAM, I'll be removing the link to it soon. You have a choice on SQL::Statement since it now exists in two versions, see this page for more info on which version you might want and how to get them: http://www.vpservices.com/jeff/programs/sql-compare.html -- Jeff -Original Message- From: Gabriel C Millerd [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 5:53 AM To: [EMAIL PROTECTED] Subject: DBD::RAM Woes i am writing a little function (see hack below) that will allow me to sort data for my CGI's easily (especially for multiple columns) ... ala another function that works the CGI.pm aspect of things. problem is that this function seems to (under mod_perl) duplicate the rows that i pass to it (although it sorts all of them wonderfully). if i castrate the function in order to see if the problem is elsewhere to 'sub sortcol {return shift}' it works just fine (although it doesnt sort anything) thanks for any help you guys can provide. package Hacks; use strict; use DBI; sub sortcol { my @body=@{$_[0]}; my @ords=@{$_[1]}; my $cols = @body; my $table="tmptable"; my @alpha=('a' .. 'zz'); my @col_names; my $dbh = DBI->connect('dbi:RAM:',,,{RaiseError => 0}); for my $i (0 .. $cols-1) { push(@col_names, $alpha[$i]); } $dbh->func({table_name => $table, col_names => join(',',@col_names), data_type => 'ARRAY', data_source => \@body, }, 'import' ); my $orderby; { my @tmp; for my $ord (@ords) { my $ao=abs($ord); push(@tmp, join(' ', $alpha[$ao], $ao==$ord ? "ASC" : "DESC")); } $orderby=join(', ', @tmp); } # DBD::RAM 'export array' method broken? my $sth = $dbh->prepare("SELECT * FROM $table ORDER BY $orderby"); $sth->execute(); my @body; while( my (@cells) = $sth->fetchrow_array) { push(@body, \@cells); } $sth->finish(); $dbh->disconnect(); return(\@body); } 1; --- Gabriel C. Millerd |Oh loneliness and cheeseburgers are a deadly Super Plumber |combination. -Comic Book Guy |
RE DBD: :RAM Woes
I see noone replied to you. I can't help you now but have a need to explore this module. Maybe we can help each other. I can't get it to "make test" on Winsows 2000. Are you not on Windows? I haven't used this module but got the idea to use it for somthing I'm doing that is a little weird. Got all the specified and unspecified pre-requisites. All got made and installd OK except DBD::RAM. Make test gets me the following Testing empty loop speed ... 10 iterations in 0.1 cpu+sys seconds (100 per sec) Testing connect/disconnect speed ... 2000 connections in 1.0 cpu+sys seconds (1921 per sec) Testing CREATE/DROP TABLE speed ... Test failed, message: Can't locate DBI object method "csv_cache_sql_parser_objec t" via package "DBD::RAM::db" at C:/perl/site/5.6.0/lib/DBD/File.pm line 170. Can't locate DBI object method "csv_cache_sql_parser_object" via package "DBD::R AM::db" at C:/perl/site/5.6.0/lib/DBD/File.pm line 170. NMAKE : fatal error U1077: 'C:\perl\5.6.0\bin\MSWin32-x86\perl.exe' : return code '0xff' Stop. I'm on Windows 2000. -Original Message- From: Gabriel C Millerd [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 5:53 AM To: [EMAIL PROTECTED] Subject: DBD::RAM Woes i am writing a little function (see hack below) that will allow me to sort data for my CGI's easily (especially for multiple columns) ... ala another function that works the CGI.pm aspect of things. problem is that this function seems to (under mod_perl) duplicate the rows that i pass to it (although it sorts all of them wonderfully). if i castrate the function in order to see if the problem is elsewhere to 'sub sortcol {return shift}' it works just fine (although it doesnt sort anything) thanks for any help you guys can provide. package Hacks; use strict; use DBI; sub sortcol { my @body=@{$_[0]}; my @ords=@{$_[1]}; my $cols = @body; my $table="tmptable"; my @alpha=('a' .. 'zz'); my @col_names; my $dbh = DBI->connect('dbi:RAM:',,,{RaiseError => 0}); for my $i (0 .. $cols-1) { push(@col_names, $alpha[$i]); } $dbh->func({table_name => $table, col_names => join(',',@col_names), data_type => 'ARRAY', data_source => \@body, }, 'import' ); my $orderby; { my @tmp; for my $ord (@ords) { my $ao=abs($ord); push(@tmp, join(' ', $alpha[$ao], $ao==$ord ? "ASC" : "DESC")); } $orderby=join(', ', @tmp); } # DBD::RAM 'export array' method broken? my $sth = $dbh->prepare("SELECT * FROM $table ORDER BY $orderby"); $sth->execute(); my @body; while( my (@cells) = $sth->fetchrow_array) { push(@body, \@cells); } $sth->finish(); $dbh->disconnect(); return(\@body); } 1; --- Gabriel C. Millerd |Oh loneliness and cheeseburgers are a deadly Super Plumber |combination. -Comic Book Guy |