Re: AddModule mod_perl.c
Hi there, On Sat, 23 Mar 2002, John Kolvereid wrote: Which Guide? Please advise. http://perl.apache.org/guide Did you read any of the other documentation? Please let me know why you did not know about the Guide, we have obviously failed you. 73, Ged.
Re: Be carefull with apache 1.3.24
Hi Pedro, On Sun, 24 Mar 2002, Pedro Melo Cunha wrote: [snip,snip] Looking at the change log, they mention a bug that multiple set-cookie's will fail (only the last one will be sent to the client, the proxy will eat the others). And it was true... The problem is that 1.3.24 final also has that bug: only the last set-cookie will reach your browser. This was a show-stopper for my application. So I sat down, read the proxy code, and made a patch to solve the bug. [snip] Anyway, I attached here. Maybe someone here can push it into apache for the next release, and in the meantime you can use it, if you want. I also attach a cgi that set's two cookies, to demonstrate the problem. Pedro, thanks a real bunch! You just saved me a load of work! If we ever meet, I'll buy you a beer, I promise! 73, Ged.
Re: mod_perl training companies?
A young, startup company of 15 local people (believers) is doing traning and development on mod_perl, web and system administration (Linux). We are located in Yugoslavia, Belgrade but we also work with people and companies from other countries (Canada, Germany, Cyprus, USA). Much of our expirience comes from this mailing list, perl books and jobs we've worked on abroad. We got a lot from open source community and we're giving it back. Prices are very low since our country living standard is very low and there are not many perl jobs around here, unfortunatelly. We respect all the clients we have. Our biggest accomplishment is in progress, since we've given a chance of assisting in moving old cgi-bin applications to mod-perl for www.cleverform.com (British company, rewiewed in January's edition of PC Magazine). I hope in time to come you'll be able to put this site in Powered by mod-perl section. You can reach us at http://www.modperldev.com (a website we're making to serve open community). -- Best regards, Miroslav Madzarevic, Senior Perl Programmer [EMAIL PROTECTED] Mod Perl Development - http://www.modperldev.com Telephone: +381 64 1193 501 ICQ: 15880893 jamph $_=,,.,,.,,,.,,,.,,,..,,.,,,.,.,,,; s/\s//gs;tr/,./05/;my(@a,$o,$i)=split//;$_=DATA;tr/~`'^/0-4/;map{$o .=$a[$i]+$_;$i++}split//;@a=$o=~m!...!g;map{print chr}@a; __DATA__ `~^`~~``^`~`~`^``~`~``''~^'`~^``'``^```~^``'```'~`~
Re: AddModule mod_perl.c
Unbelievable - Not only cannot I install and configure mod_perl, I can't even load the guide. I downloaded Apache-mod_perl_guide-1.31 and untarred it. Then like the instructions dictate I entered perl Makefile.PL - ran ok make install The last instruction choked because it couldn't exec pod2hpp. So I say ok it's the version. I try 1.30. The same. Then I read the readme on their web site. It says to get the latest POD sources. I download guide-cvs-snapshot_200203241203_tar.gz and untar it. Once again, the same: pod2hpp does not exist. Not sure the view is worth the climb. John Kolvereid --- Ged Haywood [EMAIL PROTECTED] wrote: Hi there, On Sat, 23 Mar 2002, John Kolvereid wrote: Which Guide? Please advise. http://perl.apache.org/guide Did you read any of the other documentation? Please let me know why you did not know about the Guide, we have obviously failed you. 73, Ged. __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/
Re: Performace...
At 2:27 PM -0500 3/23/02, Geoffrey Young wrote: you might be interested in Joshua Chamas' ongoing benchmark project: [EMAIL PROTECTED]">http://mathforum.org/epigone/modperl/sercrerdprou/[EMAIL PROTECTED] http://www.chamas.com/bench/ he has the results from a benchmark of Apache::Registry and plain handlers, as well as comparisons between HTML::Mason, Embperl, and other templating engines. Although there are lots of qualifiers on those benchmarks, I consider them rather dangerous anyway. They are Hello World benchmarks, in which startup time completely dominates the time. The things that distinguish more sophisticated solutions from basic CGI or even modules are elements such as caching, pre-compiling and other techniques directly aimed at improving real-world performance. Hello World isn't going to show those at all. -- Kee Hinckley - Somewhere.Com, LLC http://consulting.somewhere.com/ [EMAIL PROTECTED] I'm not sure which upsets me more: that people are so unwilling to accept responsibility for their own actions, or that they are so eager to regulate everyone else's.
Re: AddModule mod_perl.c
John Kolvereid wrote: Unbelievable - Not only cannot I install and configure mod_perl, I can't even load the guide. I downloaded Apache-mod_perl_guide-1.31 and untarred it. Then like the instructions dictate I entered perl Makefile.PL - ran ok make install The last instruction choked because it couldn't exec pod2hpp. So I say ok it's the version. I try 1.30. The same. Then I read the readme on their web site. It says to get the latest POD sources. I download guide-cvs-snapshot_200203241203_tar.gz and untar it. Once again, the same: pod2hpp does not exist. Not sure the view is worth the climb. Huh? The guide is all here: http://perl.apache.org/guide. You can even grab it as a pdf. To build it from sources you need to install Pod::HtmlPsPdf. If you were looking closely at the output when you run 'perl Makefile.PL' it should have told you that you are missing the prerequisite. John Kolvereid --- Ged Haywood [EMAIL PROTECTED] wrote: Hi there, On Sat, 23 Mar 2002, John Kolvereid wrote: Which Guide? Please advise. http://perl.apache.org/guide Did you read any of the other documentation? Please let me know why you did not know about the Guide, we have obviously failed you. 73, Ged. __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ -- __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: AddModule mod_perl.c
Hi Stas, I know the guide is posted on line. I would like to get a copy on my server to save on traffic. Moreover, I don't want a PDF copy - not as friendly (to me). Exactly what is Pod::HtmlPsPdf and how (and why) do I install it. Thanks. John Kolvereid --- Stas Bekman [EMAIL PROTECTED] wrote: John Kolvereid wrote: Unbelievable - Not only cannot I install and configure mod_perl, I can't even load the guide. I downloaded Apache-mod_perl_guide-1.31 and untarred it. Then like the instructions dictate I entered perl Makefile.PL - ran ok make install The last instruction choked because it couldn't exec pod2hpp. So I say ok it's the version. I try 1.30. The same. Then I read the readme on their web site. It says to get the latest POD sources. I download guide-cvs-snapshot_200203241203_tar.gz and untar it. Once again, the same: pod2hpp does not exist. Not sure the view is worth the climb. Huh? The guide is all here: http://perl.apache.org/guide. You can even grab it as a pdf. To build it from sources you need to install Pod::HtmlPsPdf. If you were looking closely at the output when you run 'perl Makefile.PL' it should have told you that you are missing the prerequisite. John Kolvereid --- Ged Haywood [EMAIL PROTECTED] wrote: Hi there, On Sat, 23 Mar 2002, John Kolvereid wrote: Which Guide? Please advise. http://perl.apache.org/guide Did you read any of the other documentation? Please let me know why you did not know about the Guide, we have obviously failed you. 73, Ged. __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ -- __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/
the Guide
I recently downloaded the mod_perl Guide and tried to install it. Problem is that it would not install properly because the file: pod2hpp was missing. After trying other versions I kept getting the same error. Then I checked google.com. I am not the only one w/ this problem. I conclude that the guide is built from the PODs (Plain Old Documents). pod2hpp is thus needed to convert the pods to html. The online guide is no doubt created the same way. Wouldn't it thus be simpler and more convenient for 1st times like myself if the guide download were simply the already created html pages which appear online. Naturally they would be compressed. Then one would only have to uncompress them instead of building them. It's hard enough to install mod_perl itself. Why add an extra burden for the manual also. Thanks. John Kolvereid __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/
Re: AddModule mod_perl.c
I know the guide is posted on line. I would like to get a copy on my server to save on traffic. Moreover, I don't want a PDF copy - not as friendly (to me). Exactly what is Pod::HtmlPsPdf and how (and why) do I install it. Thanks. This is a module, available off of CPAN: http://www.cpan.org/modules/by-module/Pod/Pod-HtmlPsPdf-0.04.tar.gz (Written by Stas, in fact!) It allows you to create HTML, Ps (Postscript) and PDF documents given POD. What is POD (or Pod)? Plain Old Documentation. This is the native documentation format for Perl modules. For any perl module you have installed on your system, you can read its documentation by the perldoc MODULENAME command. The perldoc command will scan the module for its included POD, and then render the POD for your reading pleasure. -- What is CPAN? CPAN is the Comprehensive Perl Archive Network. It is a vast collection of user-contributed Perl modules that cover a vast array of common (and not so common) tasks that you might wish to cover. It will simplify your life greatly. There is an installation procedure that you can follow that will allow you to take a module off of CPAN and put it on your computer. There is documentation available on the CPAN web site, http://www.cpan.org/ that you can read and learn and therefore allow you to install the modules. (Usually it's not difficult to install a module -- you should usually be able to do it in 5 command lines, or less if you don't mind stringing a bunch of them together with logical joiners.) There is a module available on CPAN called CPAN that, if you already have it installed on your system, can greatly ease your task of installing modules off of CPAN. If you have it installed, I suggest you use it. If you don't have it installed, I suggest you install it and then use it to install all future modules. -- How can you tell if you nave module Foo::Bar::Baz installed? perl -MFoo::Bar::Baz -e 'print $Foo::Bar::Baz::VERSION\n;' If you have the module installed, this command will tell you the version of the module you have installed. If you don't have it installed, then it'll spew out a few lines regarding how Foo::Bar::Baz can't be found within the Perl module include path of your system. (called @INC) Note that some CPAN modules -- *including* Pod::HtmlPsPdf -- have *dependancies*. Sometimes these dependancies are other Perl modules. (if so, then the CPAN module can automatically follow the depedancies and install the modules that are depended-upon and install them). Sometimes the dependancies depend on you having other *non* Perl programs (or libraries) installed on your system If you try to install a Perl module that has one of these kinds of dependancies and you don't have the thing that is depended upon on your system, then the module installation attempt will fail and you will have to go and install that thing first before you try installing your Perl module again. *Pay attention* to what the installation error report says -- it should provide you with the information (or at least the clues) you need in order to successfully install the module. -- How do you install pieces of software that aren't Perl that the random CPAN module that you're trying to install might need? That depends on your operating system. I use Debian GNU/Linux. Lots of people use RedHat based Linux systems. And then there's Solaris. And other Unices. And (gasp!) Windows OSes. Each one has a different way to approach this problem. It also depends on the program / library in question. I'll have to let you work on this part yourself for now, at least until you've put in a few hours of trying on your own and you can come back with a few specific questions. (i.e. I need to install the following, I tried doing the following, it didn't work, and here's the error message I'm getting. My system setup is the following. What's going on?) -- Another useful piece of information -- you can read the POD of a module without it already being installed on your machine! You do this by going to www.cpan.org and looking info re: CPAN module documentation. There are several selections along these lines -- pick one, check it out, see if it gives you what you want, and if not then check out another one. Rinse, lather, repeat... I suggest you check out the Pod::HtmlPsPdf documentation online using this technique. Here's a direct URL, just because I'm such a nice guy... http://theoryx5.uwinnipeg.ca/CPAN/data/Pod-HtmlPsPdf/Pod/HtmlPsPdf.html -- Why am I going into so much detail? Because it seems like you haven't done this kind of thing before. Note that the mod_perl installation itself (if you aren't using some packaged module like an RPM or DEB or something like that) includes a bunch of outside dependancies. You'll always be faced with challenges when it comes to administering a Perl site of
Re: AddModule mod_perl.c
Hi Richard, It worked. Thanks. John Kolvereid --- Richard Dice [EMAIL PROTECTED] wrote: I know the guide is posted on line. I would like to get a copy on my server to save on traffic. Moreover, I don't want a PDF copy - not as friendly (to me). Exactly what is Pod::HtmlPsPdf and how (and why) do I install it. Thanks. This is a module, available off of CPAN: http://www.cpan.org/modules/by-module/Pod/Pod-HtmlPsPdf-0.04.tar.gz (Written by Stas, in fact!) It allows you to create HTML, Ps (Postscript) and PDF documents given POD. What is POD (or Pod)? Plain Old Documentation. This is the native documentation format for Perl modules. For any perl module you have installed on your system, you can read its documentation by the perldoc MODULENAME command. The perldoc command will scan the module for its included POD, and then render the POD for your reading pleasure. -- What is CPAN? CPAN is the Comprehensive Perl Archive Network. It is a vast collection of user-contributed Perl modules that cover a vast array of common (and not so common) tasks that you might wish to cover. It will simplify your life greatly. There is an installation procedure that you can follow that will allow you to take a module off of CPAN and put it on your computer. There is documentation available on the CPAN web site, http://www.cpan.org/ that you can read and learn and therefore allow you to install the modules. (Usually it's not difficult to install a module -- you should usually be able to do it in 5 command lines, or less if you don't mind stringing a bunch of them together with logical joiners.) There is a module available on CPAN called CPAN that, if you already have it installed on your system, can greatly ease your task of installing modules off of CPAN. If you have it installed, I suggest you use it. If you don't have it installed, I suggest you install it and then use it to install all future modules. -- How can you tell if you nave module Foo::Bar::Baz installed? perl -MFoo::Bar::Baz -e 'print $Foo::Bar::Baz::VERSION\n;' If you have the module installed, this command will tell you the version of the module you have installed. If you don't have it installed, then it'll spew out a few lines regarding how Foo::Bar::Baz can't be found within the Perl module include path of your system. (called @INC) Note that some CPAN modules -- *including* Pod::HtmlPsPdf -- have *dependancies*. Sometimes these dependancies are other Perl modules. (if so, then the CPAN module can automatically follow the depedancies and install the modules that are depended-upon and install them). Sometimes the dependancies depend on you having other *non* Perl programs (or libraries) installed on your system If you try to install a Perl module that has one of these kinds of dependancies and you don't have the thing that is depended upon on your system, then the module installation attempt will fail and you will have to go and install that thing first before you try installing your Perl module again. *Pay attention* to what the installation error report says -- it should provide you with the information (or at least the clues) you need in order to successfully install the module. -- How do you install pieces of software that aren't Perl that the random CPAN module that you're trying to install might need? That depends on your operating system. I use Debian GNU/Linux. Lots of people use RedHat based Linux systems. And then there's Solaris. And other Unices. And (gasp!) Windows OSes. Each one has a different way to approach this problem. It also depends on the program / library in question. I'll have to let you work on this part yourself for now, at least until you've put in a few hours of trying on your own and you can come back with a few specific questions. (i.e. I need to install the following, I tried doing the following, it didn't work, and here's the error message I'm getting. My system setup is the following. What's going on?) -- Another useful piece of information -- you can read the POD of a module without it already being installed on your machine! You do this by going to www.cpan.org and looking info re: CPAN module documentation. There are several selections along these lines -- pick one, check it out, see if it gives you what you want, and if not then check out another one. Rinse, lather, repeat... I suggest you check out the Pod::HtmlPsPdf documentation online using this technique. Here's a direct URL, just because I'm such a nice guy... http://theoryx5.uwinnipeg.ca/CPAN/data/Pod-HtmlPsPdf/Pod/HtmlPsPdf.html -- Why am I going into so much detail? Because it seems like you haven't done this kind of
Re: mod_perl training companies?
http://www.stonehenge.com/ http://www.stonehenge.com/perltraining/ -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 800 762 1582
Re: Cookies and IE in mod_perl
I've determined that it isn't the redirect causing the cookies not to be set. If I take out the redirect, and just try to set a cookie w/o a redirect, it still doesn't set the cookies in IE. Does M$ have any docs on how IE6 handles cookies that I can look this up on? On Saturday 23 March 2002 11:48 pm, Cees Hek wrote: Some browsers don't accept cookies sent allong with a redirect header. A simple workaround is to leave your cookie in the header, but move the redirect to a META HTTP-EQUIV tag in a blank HTML document. I'm not sure if IE 6.0 suffers from this but I suspect that this is your problem. So this isn't really a mod_perl problem, but likely a browser problem. Also, if you want to see exactly what headers your apache server is sending out, or headers your client is sending in, have a look at Apache::DumpHeaders. It saves putting those warn statements in your code. Cees On Sun, 2002-03-24 at 14:44, Jesse and Rebecca Stay wrote: Ok - I got rid of the Apache::Cookie stuff, and am now doing things manually, but it still doesn't generate a cookie in IE. It still works in Netscape. I get a redirect, but no cookie. Here is my code: my $r = Apache-request; $r-content_type('text/html'); $r-err_headers_out-add('Set-Cookie' = 'userSession=test; domain=.hainesfamily.org; path=/; expires=Mon, 25-Mar-2002 03:30:43 GMT'); $r-headers_out-add(Location = $redir); $r-status(REDIRECT); $r-send_http_header; my $headers_out = $r-headers_out; foreach (keys %$headers_out) { warn $_=$headers_out-{$_}; } return OK; The warn produces the following: Set-Cookie=userSession=test; domain=.domain.org; path=/; expires=Mon, 25-Mar-2002 03:30:43 GMT at /path/to/script.pm line 326. Location=/r/common/loginWelcome at /path/to/script.pm line 326. Connection=close at /path/to/script.pm line 326. Transfer-Encoding=chunked at /path/to/script.pm line 326. Content-Type=text/html at /path/to/script.pm line 326. Am I doing something wrong??? -Jesse Stay On Saturday 23 March 2002 06:43 pm, Eric Frazier wrote: Strong suggestion. Look at an existing cookie that works in IE whatever, copy it, then look at the header that Apache::Cookie is making. This oop cookie crap really bugs me since a cookie is just a stupid header line, not that big of a deal to parse, or write by hand. Abscraction is for things that make good objects and that are HARD, cookies in my opinon don't fit into that category. I strongly bet it has to do with the expire date, also look at the docs, and the code itself under the expires sub. I haven't done e com crap for a while now, but I had lots of trouble getting IE to get it right. Remember Netscape invented the cookie, then IE had to go and tweak with it. Eric At 09:21 PM 3/23/02 -0500, Jesse and Rebecca Stay wrote: I guess in particular, does anyone know of any known issues with Apache::Cookie and IE6.0 (or any other versions)? On Saturday 23 March 2002 07:09 pm, Jesse and Rebecca Stay wrote: Here is the code I use (in this particular case it is being used with a redirect, but it doesn't work in any case.): my $cookieContent = Apache::Cookie-new( $r, -name= 'userSession', -value = $cookieValue, -expires = '+365d'); $cookieContent-bake(); $r-headers_out-set(Location = $redir); $r-status(REDIRECT); $r-send_http_header; return OK; I tried expires = '+1Y', but that didn't work either. Adding the domain doesn't do anything either. On Saturday 23 March 2002 06:44 pm, Frank Wiles wrote: On Sat, 23 Mar 2002 18:52:14 -0500 Jesse and Rebecca Stay [EMAIL PROTECTED] wrote: Has anyone had any issues in getting cookies to work with IE using mod_perl? I have tried using both CGI::Cookie and Apache::Cookie, and in both instances it works just fine under Netscape, but on IE it doesn't even try to set the cookie. Any ideas? What are you expire times on your cookies? We ran into a situation where I work that all of the Windows machines were in the wrong time zone and with a 2 hour expire, IE would not set the cookie because it thought it was already expired. Netscape would however set the cookie anyway. This may not be your problem, but it may be something to think about. - Frank Wiles [EMAIL PROTECTED] http://frank.wiles.org - http://www.kwinternet.com/eric (250) 655 - 9513 (PST Time Zone)
Re: AddModule mod_perl.c
Ged Haywood [EMAIL PROTECTED] writes: According to the mod_perl Reference Guide the line AddModule mod_perl.c should be added to my httpd.conf, otherwise mod_perl is not activated. I think you'd better have a more careful look at that Guide. You only need that in your config if you have mod_perl built as a DSO (Dynamic Shared Object) which means that Apache starts without trhe mod_perl module and then loads it later when it reads the line AddModule mod_perl.c in httpd.conf. I think you've confused LoadModule and AddModule. If you follow the recommended apache configuration, which does all the LoadModules followed by a ClearModuleList and a bunch of AddModules, you don't need the LoadModule for mod_perl (since it is built in), but you do need the AddModule since *all* the module entries get cleared by the ClearModuleList. I believe the point of this somewhat convoluted load/clear/add procedure is for the static modules to end up in the right spots in the module list relative to all the DSOs, rather than all bunched up at one end, since the order does matter (a lot). -- Dan Riley [EMAIL PROTECTED] Mr. Ellison is presently the sole member of the Plan Committee. The Plan Committee did not meet during fiscal year 2001, and during that same period, acted 46 times by unanimous written consent.
Re: Cookies and IE in mod_perl
On Sat, 23 Mar 2002, Jesse and Rebecca Stay wrote: Ok - I got rid of the Apache::Cookie stuff, and am now doing things manually, but it still doesn't generate a cookie in IE. It still works in Netscape. I get a redirect, but no cookie. Here is my code: my $r = Apache-request; $r-content_type('text/html'); $r-err_headers_out-add('Set-Cookie' = 'userSession=test; domain=.hainesfamily.org; path=/; expires=Mon, 25-Mar-2002 03:30:43 GMT'); $r-headers_out-add(Location = $redir); $r-status(REDIRECT); $r-send_http_header; my $headers_out = $r-headers_out; foreach (keys %$headers_out) { warn $_=$headers_out-{$_}; } return OK; I think this should be return 302;
Re: Cookies and IE in mod_perl
On Sun, Mar 24, 2002 at 01:44:51PM -0500, Jesse and Rebecca Stay wrote: I've determined that it isn't the redirect causing the cookies not to be set. If I take out the redirect, and just try to set a cookie w/o a redirect, it still doesn't set the cookies in IE. Does M$ have any docs on how IE6 handles cookies that I can look this up on? http://www.microsoft.com/presspass/press/2001/mar01/PrivacyToolsIEfs.asp Balazs
Re: Performace...
On Sun, 24 Mar 2002, Kee Hinckley wrote: At 2:27 PM -0500 3/23/02, Geoffrey Young wrote: you might be interested in Joshua Chamas' ongoing benchmark project: [EMAIL PROTECTED]">http://mathforum.org/epigone/modperl/sercrerdprou/[EMAIL PROTECTED] http://www.chamas.com/bench/ he has the results from a benchmark of Apache::Registry and plain handlers, as well as comparisons between HTML::Mason, Embperl, and other templating engines. Although there are lots of qualifiers on those benchmarks, I consider them rather dangerous anyway. They are Hello World benchmarks, in which startup time completely dominates the time. The things that That explains why Embperl did so poorly compared to PHP, yet when we replaced our PHP pages with Embperl, our benchmarks using real user queries, sending the same queries through the old and new pages, the new pages showed a 50% performance boost. Note: that gain was enough to saturate our test network. Our purpose for the benchmark was to determine if it was an improvement or not, not to determine the exact improvement, so we don't really know what the real gain was. The same machines do several other tasks, and our monitoring at the time of change was not very sophisticated, so we only really know it was a big win. Something on the order of 37 load issues the week before the change, most of which were fairly obviously web overload, and two the week after (those two being very obviously associated with other services the boxes are running.) Ed
Re: the Guide
Wouldn't it thus be simpler and more convenient for 1st times like myself if the guide download were simply the already created html pages which appear online. Frankly, hardly anyone does that. Most people refer to the guide on-line. I've used mod_perl for years, referred to the guide frequently, and never downloaded it. If you have to work over a slow link I can understand why you might want a local copy, but a quick wget command can mirror it all for you pretty easilly. People usually only download the CPAN package if they're planning to do some hacking on it. Mentioning the module dependency in the text next to the download link is probably a good idea, and offering a .tgz of all the generated HTML files as well as the PDF, but I think you may be the first to request such a thing. It's hard enough to install mod_perl itself. Why add an extra burden for the manual also. There is plenty of documentation on building and working with mod_perl included in the standard mod_perl package. The guide is in addition to that documentation. - Perrin
Re: Apache::DBI or What ?
On Fri, 2002-03-22 at 11:42, Andrew Ho wrote: Hello, EFI will have many different users, users as in database users. So am I EFjust screwed and won't be able to keep connections open? Do you mean users as in actual RDBMS level users? In other words, when you say database users you mean different username/passwords used from, say, a command-line SQL client? If your answer is yes then indeed, this is exactly the situation the Guide is talking about--you're screwed and probably shouldn't keep connections open. You'll have to incur a connect on each HTTP request. What would be ideal is if the database would allow you to change the user on the current connection. I know PostgreSQL will allow this using the command line interface psql tool (just do \connect database user), but I'm not sure if you can do this using DBI. If this was possible, then you could always connect to DBI using the same username/password so Apache::DBI gives you a cached connection, and then once you have the connection, you can change to the user you want. Does anyone know if any datbases support this sort of thing? Cees EFI am using Postgress, I am wondering how big DBs deal with this sort of EFthing. I am also wondering what the actual overhead is in starting the EFconnection and if there is anything that I could to to limit that EFwithout validating a specific user. In large DB projects where you expect high levels of concurrency I haven't heard of anybody using RDBMS-level users for authentication purposes. Humbly, Andrew -- Andrew Ho http://www.tellme.com/ [EMAIL PROTECTED] Engineer [EMAIL PROTECTED] Voice 650-930-9062 Tellme Networks, Inc. 1-800-555-TELLFax 650-930-9101 --
Re: AddModule mod_perl.c
At 23:31 24.03.2002, John Kolvereid wrote: Hi Dan, You are correct when you refer to 'this somewhat convoluted load/clear/add' My httpd.conf has LoadModule perl_module libexec/libperl.so AddModule mod_perl.c When I leave alone and check the error_log, Apache AND mod_perl are loaded. However, I cannot view any web pages; instead I get the msg: 'The document contained no data' (what document I do not know) When I comment out the AddModule I can view all my web pages, but the error_log claims that only Apache is What do you mean by 'view all your web pages'? What are these web pages: perl programs, or static content? loaded - mod_perl is not. This may be fine, it may be a DSO (I don't know) but I cannot view a .pl file as outlined in Apache Modules w/ Perl C, pp 41-45. It displays text only, as if the Options ExCGI were not present. I am trying to pay close attention to the guide and all the other literature on the subject. Obviously, it the installation works correctly the first time, then it is understandable, otherwise, (I think) it is very confusing. There must be something wrong with your configuration: could you please post your httpd.conf here so taht we can see if you're doing anything wrong? (only post the most relevant parts, so as not to get a too large entry, but please post *all* the relevant parts, as there might be some small detail making it fail). --- Dan Riley [EMAIL PROTECTED] wrote: Ged Haywood [EMAIL PROTECTED] writes: According to the mod_perl Reference Guide the line AddModule mod_perl.c should be added to my httpd.conf, otherwise mod_perl is not activated. I think you'd better have a more careful look at that Guide. You only need that in your config if you have mod_perl built as a DSO (Dynamic Shared Object) which means that Apache starts without trhe mod_perl module and then loads it later when it reads the line AddModule mod_perl.c in httpd.conf. I think you've confused LoadModule and AddModule. If you follow the recommended apache configuration, which does all the LoadModules followed by a ClearModuleList and a bunch of AddModules, you don't need the LoadModule for mod_perl (since it is built in), but you do need the AddModule since *all* the module entries get cleared by the ClearModuleList. I believe the point of this somewhat convoluted load/clear/add procedure is for the static modules to end up in the right spots in the module list relative to all the DSOs, rather than all bunched up at one end, since the order does matter (a lot). -- Dan Riley [EMAIL PROTECTED] Mr. Ellison is presently the sole member of the Plan Committee. The Plan Committee did not meet during fiscal year 2001, and during that same period, acted 46 times by unanimous written consent. __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ -- Per Einar Ellefsen [EMAIL PROTECTED]
Re: AddModule mod_perl.c
Hi Per, I get the msg: 'The document contained no data' when I try to load my home.html from my server using my browser. When I comment out the AddModule mod_perl.c then my home page appears. I am including my httpd for any advise: relevant portions of httpd.conf --- IfDefine SSL LoadModule ssl_module libexec/libssl.so LoadModule php4_modulelibexec/libphp4.so LoadModule webapp_module libexec/mod_webapp.so LoadModule perl_modulelibexec/libperl.so /IfDefine Ifmodule mod_perl.c Include conf/mod_perl.conf /Ifmodule Perl /Perl ClearModuleList #AddModule mod_perl.c mod_perl.conf - conf/mod_perl.pl PerlFreshRestart On Location /hello/world SetHandler perl-script PerlHandler Apache::Hello /Location Alias /perl/ /home/httpd/perl/ PerlModule Apache::Registry Location /perl SetHandler perl-script PerlHandler Apache::Registry PerlSendHeader On Options ExecCGI /Location /home/httpd/perl/hello.pl - #!/usr/local/perl print Content-type: text/html\n\n; print END; head titleMod_perl /title /head body centerMod-Perl/center /body END Also, when I try to load the page /odin/perl/hello.pl (/odin is my server) the page displays as text only, not as an html page. Any advice would be greatly appreciated. Thanks. John Kolvereid --- Per Einar Ellefsen [EMAIL PROTECTED] wrote: At 23:31 24.03.2002, John Kolvereid wrote: Hi Dan, You are correct when you refer to 'this somewhat convoluted load/clear/add' My httpd.conf has LoadModule perl_module libexec/libperl.so AddModule mod_perl.c When I leave alone and check the error_log, Apache AND mod_perl are loaded. However, I cannot view any web pages; instead I get the msg: 'The document contained no data' (what document I do not know) When I comment out the AddModule I can view all my web pages, but the error_log claims that only Apache is What do you mean by 'view all your web pages'? What are these web pages: perl programs, or static content? loaded - mod_perl is not. This may be fine, it may be a DSO (I don't know) but I cannot view a .pl file as outlined in Apache Modules w/ Perl C, pp 41-45. It displays text only, as if the Options ExCGI were not present. I am trying to pay close attention to the guide and all the other literature on the subject. Obviously, it the installation works correctly the first time, then it is understandable, otherwise, (I think) it is very confusing. There must be something wrong with your configuration: could you please post your httpd.conf here so taht we can see if you're doing anything wrong? (only post the most relevant parts, so as not to get a too large entry, but please post *all* the relevant parts, as there might be some small detail making it fail). --- Dan Riley [EMAIL PROTECTED] wrote: Ged Haywood [EMAIL PROTECTED] writes: According to the mod_perl Reference Guide the line AddModule mod_perl.c should be added to my httpd.conf, otherwise mod_perl is not activated. I think you'd better have a more careful look at that Guide. You only need that in your config if you have mod_perl built as a DSO (Dynamic Shared Object) which means that Apache starts without trhe mod_perl module and then loads it later when it reads the line AddModule mod_perl.c in httpd.conf. I think you've confused LoadModule and AddModule. If you follow the recommended apache configuration, which does all the LoadModules followed by a ClearModuleList and a bunch of AddModules, you don't need the LoadModule for mod_perl (since it is built in), but you do need the AddModule since *all* the module entries get cleared by the ClearModuleList. I believe the point of this somewhat convoluted load/clear/add procedure is for the static modules to end up in the right spots in the module list relative to all the DSOs, rather than all bunched up at one end, since the order does matter (a lot). -- Dan Riley [EMAIL PROTECTED] Mr. Ellison is presently the sole member of the Plan Committee. The Plan Committee did not meet during fiscal year 2001, and during that same period, acted 46 times by unanimous written consent. __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ -- Per Einar Ellefsen [EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/
Re: Can't open perl script -spi.bak
Garth Winter Webb wrote: On Fri, 2002-03-22 at 12:57, Robert Landrum wrote: That's is very weird, because this code doesn't seem to work: perl -e 'system(perl, -e1) == 0 or die oops' Actually, that's not all that weird. Most shells take care of stripping out garbage before setting the argument list. Since system(LIST) doesn't use the shell, it's passing perl the literal -e1 which perl won't recognize as a command line option (and correctly so in my opinion). Actually this isn't standard behavior. I can't think of a situation where I would want to use system to concatanate a string for me rather than interpreting the string as an argument and act accordingly. If you check 'perldoc -f system', this is exactly what system is supposed to do when given a program name and a list of arguments, so it looks like 'systetm' may be buggy in the win32 version of perl G I think so too. I,m no Perl guru, but I know from my personal experiance that it works fine under unix and cygwin, but I _always_ have had to manually do this under normal Win32 (I know, I know, I never submitted a patch... I guess the reason was because I never [finally] compiled mod_perl for Win32 and had enough strength left to diff the Makefiles... :-( ) Issac
Re: mod_perl developers cookbook... a kitchen hand asks... doh!
You must have taken this subroutine out of context. There are a certain number of things which must appear for an Apache handler to work: package Apache::Whatever; You need to have that line to uniquely identify your module. If you use the name Apache::Whatever, your handler must be named Whatever.pm and be placed in your INC search path under Apache/ This is probably the reason for your number 2 problem: you must have used the same package name twice. Or not used a package name at all. Actually, this isn't true.. You don't *have* to use the Apache namespace... You can just as easily call it Foo::Bar if you'd like... I don't mean to come across as being an extremist on this issue, but we were all newbies once, and I know that as a newbie, *I* would take anything written here as the authorative answer, so I didn't want anyone here to be misled... Issac
Re: mod_perl training companies?
Steven Lembark wrote: http://www.stonehenge.com/ http://www.stonehenge.com/perltraining/ Steven, They don't give mod_perl courses, at least I couldn't find any. __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: Apache::DBI or What ?
Hello, CHWhat would be ideal is if the database would allow you to change the CHuser on the current connection. I know PostgreSQL will allow this using CHthe command line interface psql tool (just do \connect database CHuser), but I'm not sure if you can do this using DBI. CH CHDoes anyone know if any datbases support this sort of thing? This occurred to me in the case of Oracle (one of my co-workers was facing a very similar problem in the preliminary stages of one of his designs), and I actually had asked our DBAs about this (since the Oracle SQL*Plus also allows you to change users). As I suspected (from the similar connect terminology), our DBAs confirmed that Oracle just does a disconnect and reconnect under the hood. I would bet the psql client does the same thing. I don't have a PostgreSQL installation handy at the moment, but I seem to recall it has a statement logger similar to MySQL's... if you have it handy, you could try the \connect from psql and see if it results in a disconnect and reconnect. Humbly, Andrew -- Andrew Ho http://www.tellme.com/ [EMAIL PROTECTED] Engineer [EMAIL PROTECTED] Voice 650-930-9062 Tellme Networks, Inc. 1-800-555-TELLFax 650-930-9101 --
Re: mod_perl developers cookbook... a kitchen hand asks... doh!
At 01:23 25.03.2002, Issac Goldstand wrote: You must have taken this subroutine out of context. There are a certain number of things which must appear for an Apache handler to work: package Apache::Whatever; You need to have that line to uniquely identify your module. If you use the name Apache::Whatever, your handler must be named Whatever.pm and be placed in your @INC search path under Apache/ This is probably the reason for your number 2 problem: you must have used the same package name twice. Or not used a package name at all. Actually, this isn't true.. You don't *have* to use the Apache namespace... You can just as easily call it Foo::Bar if you'd like... I don't mean to come across as being an extremist on this issue, but we were all newbies once, and I know that as a newbie, *I* would take anything written here as the authorative answer, so I didn't want anyone here to be misled... Yes, sorry, I didn't want to make it appear like you had to use the Apache:: namespace. In the Cookbook for example they use the Cookbook:: namespace, and you could just as well use Jeff::. -- Per Einar Ellefsen [EMAIL PROTECTED]
cvs commit: modperl/t/net/perl api.pl
geoff 02/03/24 10:22:56 Modified:.Changes STATUS src/modules/perl mod_perl.c t/net/perl api.pl Log: make sure PerlSetEnv variables are visible after first access to each child, and add tests to verify fix Submitted by: geoff Reviewed by: doug Revision ChangesPath 1.628 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.627 retrieving revision 1.628 diff -u -r1.627 -r1.628 --- Changes 24 Mar 2002 02:07:58 - 1.627 +++ Changes 24 Mar 2002 18:22:56 - 1.628 @@ -10,6 +10,9 @@ =item 1.26_01-dev +make sure PerlSetEnv variables are visible after first access +to each child [Geoff Young [EMAIL PROTECTED]] + workaround Apache::Constants::AUTOLOAD problem with bleedperl the first flag argument to perl cannot start with space, since perl tries 1.5 +1 -10 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- STATUS24 Mar 2002 02:17:09 - 1.4 +++ STATUS24 Mar 2002 18:22:56 - 1.5 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 02:17:09 $] + Last modified at [$Date: 2002/03/24 18:22:56 $] Release: @@ -20,15 +20,6 @@ Report: http://marc.theaimsgroup.com/?l=apache-modperlm=97449481013350w=2 Status: doc patch at http://marc.theaimsgroup.com/?l=apache-modperlm=97450363501652w=2 - -* PerlSetEnv scoping -Report: http://marc.theaimsgroup.com/?l=apache-modperlm=99148497206388w=2 - Status: - may be fixed here -http://marc.theaimsgroup.com/?l=apache-modperlm=99473571809129w=2 - but that patch has this issue (I think) -http://marc.theaimsgroup.com/?l=apache-modperlm=99565226811557w=2 - --Geoff * %LocationMatch Perl bug Report: http://marc.theaimsgroup.com/?l=apache-modperlm=98260537428737w=2 1.142 +1 -0 modperl/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v retrieving revision 1.141 retrieving revision 1.142 diff -u -r1.141 -r1.142 --- mod_perl.c10 Jul 2001 03:30:27 - 1.141 +++ mod_perl.c24 Mar 2002 18:22:56 - 1.142 @@ -1392,6 +1392,7 @@ /* PerlSetEnv * update only if the table changes across a request */ +MP_HASENV_on(cld); mod_perl_dir_env(r, cld); cfg-dir_env = cld-env; } 1.48 +2 -1 modperl/t/net/perl/api.pl Index: api.pl === RCS file: /home/cvs/modperl/t/net/perl/api.pl,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- api.pl6 Jul 2001 16:09:53 - 1.47 +++ api.pl24 Mar 2002 18:22:56 - 1.48 @@ -16,7 +16,7 @@ my $is_xs = ($r-uri =~ /_xs/); -my $tests = 74; +my $tests = 75; my $is_win32 = WIN32; $tests += 4 unless $is_win32; my $test_get_set = Apache-can('set_handlers') ($tests += 4); @@ -94,6 +94,7 @@ test ++$i, $r-last; test ++$i, $ENV{GATEWAY_INTERFACE}; +test ++$i, defined $ENV{KeyForPerlSetEnv}; test ++$i, scalar $r-cgi_var('GATEWAY_INTERFACE'); test ++$i, defined($r-seqno); test ++$i, $r-protocol;
cvs commit: modperl/lib/Apache ExtUtils.pm
dougm 02/03/24 11:06:03 Modified:.Changes Makefile.PL lib/Apache ExtUtils.pm Log: Submitted by: stas Reviewed by:dougm rip -D_GNU_SOURCE out of Perl 5.7.3+'s ccflags, which modperl doesn't need and apache won't compile with Revision ChangesPath 1.629 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.628 retrieving revision 1.629 diff -u -r1.628 -r1.629 --- Changes 24 Mar 2002 18:22:56 - 1.628 +++ Changes 24 Mar 2002 19:06:03 - 1.629 @@ -10,6 +10,9 @@ =item 1.26_01-dev +rip -D_GNU_SOURCE out of Perl 5.7.3+'s ccflags, which modperl doesn't +need and apache won't compile with [Stas Bekman [EMAIL PROTECTED]] + make sure PerlSetEnv variables are visible after first access to each child [Geoff Young [EMAIL PROTECTED]] 1.199 +3 -0 modperl/Makefile.PL Index: Makefile.PL === RCS file: /home/cvs/modperl/Makefile.PL,v retrieving revision 1.198 retrieving revision 1.199 diff -u -r1.198 -r1.199 --- Makefile.PL 24 Mar 2002 02:07:58 - 1.198 +++ Makefile.PL 24 Mar 2002 19:06:03 - 1.199 @@ -386,6 +386,9 @@ $PERL_EXTRA_CFLAGS .= $Config{ccflags}; } +# apache-1.3.xx won't compile with -D_GNU_SOURCE +$PERL_EXTRA_CFLAGS =~ s/-D_GNU_SOURCE//; + for (keys %PassEnv) { $ENV{$_} = $$_ if $$_; } 1.24 +1 -0 modperl/lib/Apache/ExtUtils.pm Index: ExtUtils.pm === RCS file: /home/cvs/modperl/lib/Apache/ExtUtils.pm,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- ExtUtils.pm 25 Aug 2001 19:55:03 - 1.23 +++ ExtUtils.pm 24 Mar 2002 19:06:03 - 1.24 @@ -37,6 +37,7 @@ my %config_fixups = ( ccdlflags = sub { s/-R\s+/-R/; }, ccflags = sub { + s/-D_GNU_SOURCE//; unless ($Apache::MyConfig::Setup{PERL_USELARGEFILES}) { s/-D_LARGEFILE_SOURCE\s+-D_FILE_OFFSET_BITS=\d+//; }
cvs commit: modperl/src/modules/perl perl_config.c
dougm 02/03/24 12:45:18 Modified:.Changes STATUS src/modules/perl perl_config.c Log: Submitted by: Salvador Ortiz Garcia [EMAIL PROTECTED] Reviewed by: dougm fix multiple %LocationMatch in Perl sections bug Revision ChangesPath 1.630 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.629 retrieving revision 1.630 diff -u -r1.629 -r1.630 --- Changes 24 Mar 2002 19:06:03 - 1.629 +++ Changes 24 Mar 2002 20:45:17 - 1.630 @@ -10,6 +10,9 @@ =item 1.26_01-dev +fix multiple %LocationMatch in Perl sections bug +[Salvador Ortiz Garcia [EMAIL PROTECTED]] + rip -D_GNU_SOURCE out of Perl 5.7.3+'s ccflags, which modperl doesn't need and apache won't compile with [Stas Bekman [EMAIL PROTECTED]] 1.6 +1 -7 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- STATUS24 Mar 2002 18:22:56 - 1.5 +++ STATUS24 Mar 2002 20:45:17 - 1.6 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 18:22:56 $] + Last modified at [$Date: 2002/03/24 20:45:17 $] Release: @@ -20,12 +20,6 @@ Report: http://marc.theaimsgroup.com/?l=apache-modperlm=97449481013350w=2 Status: doc patch at http://marc.theaimsgroup.com/?l=apache-modperlm=97450363501652w=2 - -* %LocationMatch Perl bug -Report: http://marc.theaimsgroup.com/?l=apache-modperlm=98260537428737w=2 - Status: - may be fixed here -http://marc.theaimsgroup.com/?l=apache-modperlm=101366182205497w=2 * PVIV issues Report: http://marc.theaimsgroup.com/?l=apache-modperlm=99905070209305w=2 1.112 +6 -3 modperl/src/modules/perl/perl_config.c Index: perl_config.c === RCS file: /home/cvs/modperl/src/modules/perl/perl_config.c,v retrieving revision 1.111 retrieving revision 1.112 diff -u -r1.111 -r1.112 --- perl_config.c 11 Jul 2001 03:02:26 - 1.111 +++ perl_config.c 24 Mar 2002 20:45:17 - 1.112 @@ -1166,6 +1166,8 @@ char *tmpkey; I32 tmpklen; SV *tmpval; +void *old_info = cmd-info; + (void)hv_iterinit(hv); while ((tmpval = hv_iternextsv(hv, tmpkey, tmpklen))) { char line[MAX_STRING_LEN]; @@ -1195,6 +1197,9 @@ if(errmsg) log_printf(cmd-server, Perl: %s, errmsg); } + +cmd-info = old_info; + /* Emulate the handling of end token for the section */ perl_set_config_vectors(cmd, cfg, core_module); } @@ -1511,9 +1516,7 @@ void *dummy = perl_set_config_vectors(cmd, config, core_module); void *old_info = cmd-info; -if (strstr(key, Match)) { - cmd-info = (void*)key; -} +cmd-info = (void *)strstr(key, Match); if(strnEQ(key, Location, 8)) perl_urlsection(cmd, dummy, hv);
cvs commit: modperl STATUS
dougm 02/03/24 12:53:41 Modified:.STATUS Log: address the print() dereferencing issue Revision ChangesPath 1.7 +14 -7 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- STATUS24 Mar 2002 20:45:17 - 1.6 +++ STATUS24 Mar 2002 20:53:41 - 1.7 -1,5 +1,5 mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 20:45:17 $] + Last modified at [$Date: 2002/03/24 20:53:41 $] Release: -21,12 +21,6 Status: doc patch at http://marc.theaimsgroup.com/?l=apache-modperlm=97450363501652w=2 -* PVIV issues -Report: http://marc.theaimsgroup.com/?l=apache-modperlm=99905070209305w=2 - Status: - patch available -http://marc.theaimsgroup.com/?l=apache-modperlm=9116330145w=2 - * mod_perl.h issues for Win32 Report: http://marc.theaimsgroup.com/?l=apache-modperl-devm=101253855721619w=2 Status: -231,3 +225,16 production environment, as it adds quite a bit of bloat * docs: update CREDITS, cleanup install docs + +Patches unlikely to be applied: + +* print() dereferencing issues +Report: http://marc.theaimsgroup.com/?l=apache-modperlm=99905070209305w=2 + Status: + patch available +http://marc.theaimsgroup.com/?l=apache-modperlm=9116330145w=2 + + the feature of print() dereferencing scalars should be deprecated. + therefor, i don't think this patch should be applied as it + would introduce overhead to support a deprecated feature. + user should simply dereference themselves, print $$foo; -dougm
cvs commit: modperl/t/net/perl util.pl
dougm 02/03/24 13:57:53 Modified:.Changes STATUS src/modules/perl Util.xs t/net/perl util.pl Log: Submitted by: Geoff Young [EMAIL PROTECTED] Reviewed by: dougm properly escape highbit chars in Apache::Utils::escape_html Revision ChangesPath 1.633 +4 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.632 retrieving revision 1.633 diff -u -r1.632 -r1.633 --- Changes 24 Mar 2002 21:00:05 - 1.632 +++ Changes 24 Mar 2002 21:57:53 - 1.633 @@ -10,6 +10,10 @@ =item 1.26_01-dev +properly escape highbit chars in Apache::Utils::escape_html +[Geoff Young [EMAIL PROTECTED], +Robin Berjon [EMAIL PROTECTED]] + allow $r-auth_name and $r-auth_type to be set on win32 [John Kelly [EMAIL PROTECTED]] 1.9 +1 -7 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- STATUS24 Mar 2002 21:00:20 - 1.8 +++ STATUS24 Mar 2002 21:57:53 - 1.9 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 21:00:20 $] + Last modified at [$Date: 2002/03/24 21:57:53 $] Release: @@ -20,12 +20,6 @@ Report: http://marc.theaimsgroup.com/?l=apache-modperlm=97449481013350w=2 Status: doc patch at http://marc.theaimsgroup.com/?l=apache-modperlm=97450363501652w=2 - -* Apache::Utils::escape_html issues -Report: http://marc.theaimsgroup.com/?l=apache-modperlm=101180404809059w=2 - Status: - patch available - http://marc.theaimsgroup.com/?l=apache-modperl-devm=101188287032621w=2 * Apache::RegistryNG issues Report: http://marc.theaimsgroup.com/?l=apache-modperl-devm=101240123609773w=2 1.10 +8 -1 modperl/src/modules/perl/Util.xs Index: Util.xs === RCS file: /home/cvs/modperl/src/modules/perl/Util.xs,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Util.xs 4 Mar 2000 20:55:47 - 1.9 +++ Util.xs 24 Mar 2002 21:57:53 - 1.10 @@ -32,6 +32,9 @@ return sv; } +#define IS_HIGHBIT_CHAR(b) \ + ( (((unsigned char)(b)) 126) (((unsigned char)(b)) = 255) ) + static SV *my_escape_html(char *s) { int i, j; @@ -43,7 +46,7 @@ j += 3; else if (s[i] == '') j += 4; -else if (s[i] == '') +else if (s[i] == '' || IS_HIGHBIT_CHAR(s[i])) j += 5; if (j == 0) @@ -67,6 +70,10 @@ memcpy(SvPVX(x)[j], quot;, 6); j += 5; } +else if (IS_HIGHBIT_CHAR(s[i])) { +sprintf(SvPVX(x)[j], #%d;, (unsigned char)s[i]); +j += 5; +} else SvPVX(x)[j] = s[i]; 1.12 +5 -1 modperl/t/net/perl/util.pl Index: util.pl === RCS file: /home/cvs/modperl/t/net/perl/util.pl,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- util.pl 6 Mar 2000 07:50:54 - 1.11 +++ util.pl 24 Mar 2002 21:57:53 - 1.12 @@ -2,7 +2,7 @@ use Apache::test; $|++; my $i = 0; -my $tests = 7; +my $tests = 8; my $r = shift; $r-send_http_header('text/plain'); @@ -61,6 +61,10 @@ /body /html EOF + +#XXX: this test could be more robust, but its better than nothing +my $c = Apache::Util::escape_html(\x8b); +test ++$i, $c =~ /^\#\d{3,3}\;$/; my $txt = No html tags in here at all; my $etxt = Apache::Util::escape_html($txt);
cvs commit: modperl/lib/Apache RegistryNG.pm
dougm 02/03/24 14:06:39 Modified:.Changes STATUS lib/Apache RegistryNG.pm Log: Submitted by: Geoff Young Reviewed by: dougm properly deal with $r-status codes (e.g. redirect) in Apache::RegistryNG Revision ChangesPath 1.634 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.633 retrieving revision 1.634 diff -u -r1.633 -r1.634 --- Changes 24 Mar 2002 21:57:53 - 1.633 +++ Changes 24 Mar 2002 22:06:39 - 1.634 @@ -10,6 +10,9 @@ =item 1.26_01-dev +properly deal with $r-status codes (e.g. redirect) in +Apache::RegistryNG [Geoff Young [EMAIL PROTECTED]] + properly escape highbit chars in Apache::Utils::escape_html [Geoff Young [EMAIL PROTECTED], Robin Berjon [EMAIL PROTECTED]] 1.10 +1 -6 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- STATUS24 Mar 2002 21:57:53 - 1.9 +++ STATUS24 Mar 2002 22:06:39 - 1.10 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 21:57:53 $] + Last modified at [$Date: 2002/03/24 22:06:39 $] Release: @@ -20,11 +20,6 @@ Report: http://marc.theaimsgroup.com/?l=apache-modperlm=97449481013350w=2 Status: doc patch at http://marc.theaimsgroup.com/?l=apache-modperlm=97450363501652w=2 - -* Apache::RegistryNG issues -Report: http://marc.theaimsgroup.com/?l=apache-modperl-devm=101240123609773w=2 - Status: - patch available * vanishing symbol tables Report: http://marc.theaimsgroup.com/?l=apache-modperlm=100820262006934w=2 1.8 +7 -1 modperl/lib/Apache/RegistryNG.pm Index: RegistryNG.pm === RCS file: /home/cvs/modperl/lib/Apache/RegistryNG.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- RegistryNG.pm 28 Sep 2000 19:59:39 - 1.7 +++ RegistryNG.pm 24 Mar 2002 22:06:39 - 1.8 @@ -48,9 +48,15 @@ $pr-set_mtime; } +my $old_status = $r-status; + $rc = $pr-run(@_); $pr-chdir_file($Apache::Server::CWD/); -return ($rc != OK) ? $rc : $pr-status; + +my $pr_status = $pr-status; +$r-status($old_status); + +return ($rc != OK) ? $rc : $pr_status; } 1;
cvs commit: modperl/src/modules/perl perl_config.c
dougm 02/03/24 14:51:04 Modified:.Changes STATUS src/modules/perl perl_config.c Log: Submitted by: Stephen Clouse [EMAIL PROTECTED] Reviewed by: dougm do not clear symbol tables within a package in perl_clear_symtab() used by directive handler extensions Revision ChangesPath 1.635 +4 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.634 retrieving revision 1.635 diff -u -r1.634 -r1.635 --- Changes 24 Mar 2002 22:06:39 - 1.634 +++ Changes 24 Mar 2002 22:51:04 - 1.635 @@ -10,6 +10,10 @@ =item 1.26_01-dev +do not clear symbol tables within a package in perl_clear_symtab() +used by directive handler extensions +[Stephen Clouse [EMAIL PROTECTED]] + properly deal with $r-status codes (e.g. redirect) in Apache::RegistryNG [Geoff Young [EMAIL PROTECTED]] 1.11 +1 -6 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- STATUS24 Mar 2002 22:06:39 - 1.10 +++ STATUS24 Mar 2002 22:51:04 - 1.11 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 22:06:39 $] + Last modified at [$Date: 2002/03/24 22:51:04 $] Release: @@ -21,11 +21,6 @@ Status: doc patch at http://marc.theaimsgroup.com/?l=apache-modperlm=97450363501652w=2 -* vanishing symbol tables -Report: http://marc.theaimsgroup.com/?l=apache-modperlm=100820262006934w=2 - Status: - patch available - * $r-finfo problem with HTML::Mason::ApacheHandler Report: http://marc.theaimsgroup.com/?l=apache-modperlm=96854561311519w=2 Status: 1.114 +22 -1 modperl/src/modules/perl/perl_config.c Index: perl_config.c === RCS file: /home/cvs/modperl/src/modules/perl/perl_config.c,v retrieving revision 1.113 retrieving revision 1.114 diff -u -r1.113 -r1.114 --- perl_config.c 24 Mar 2002 21:00:06 - 1.113 +++ perl_config.c 24 Mar 2002 22:51:04 - 1.114 @@ -1666,6 +1666,27 @@ } } +static int gvhv_is_stash(GV *gv) +{ +int len = GvNAMELEN(gv); +char *name = GvNAME(gv); + +if ((len 2) +(name[len - 1] == ':') +(name[len - 2] == ':')) +{ +return 1; +} + +return 0; +} + +/* + * we do not clear symbols within packages, the desired behavior + * for directive handler classes. and there should never be a package + * within the %Apache::ReadConfig. nothing else that i'm aware of calls + * this function, so we should be ok. + */ void perl_clear_symtab(HV *symtab) { SV *val; @@ -1684,7 +1705,7 @@ continue; if((sv = GvSV((GV*)val))) sv_setsv(GvSV((GV*)val), sv_undef); - if((hv = GvHV((GV*)val))) + if((hv = GvHV((GV*)val)) !gvhv_is_stash((GV*)val)) hv_clear(hv); if((av = GvAV((GV*)val))) av_clear(av);
cvs commit: modperl/src/modules/perl mod_perl.c mod_perl.h perl_util.c
dougm 02/03/24 15:01:33 Modified:.Changes STATUS src/modules/perl mod_perl.c mod_perl.h perl_util.c Log: Submitted by: Tatsuhiko Miyagawa [EMAIL PROTECTED] Reviewed by: dougm PERL5LIB support now properly unshifts paths into @INC rather than push Revision ChangesPath 1.636 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.635 retrieving revision 1.636 diff -u -r1.635 -r1.636 --- Changes 24 Mar 2002 22:51:04 - 1.635 +++ Changes 24 Mar 2002 23:01:33 - 1.636 @@ -10,6 +10,9 @@ =item 1.26_01-dev +PERL5LIB support now properly unshifts paths into @INC rather than push +[Tatsuhiko Miyagawa [EMAIL PROTECTED]] + do not clear symbol tables within a package in perl_clear_symtab() used by directive handler extensions [Stephen Clouse [EMAIL PROTECTED]] 1.12 +1 -7 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- STATUS24 Mar 2002 22:51:04 - 1.11 +++ STATUS24 Mar 2002 23:01:33 - 1.12 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 22:51:04 $] + Last modified at [$Date: 2002/03/24 23:01:33 $] Release: @@ -37,12 +37,6 @@ Report: http://marc.theaimsgroup.com/?l=apache-modperl-devm=98278446807561w=2 Status: patch available - -* PERL5LIB should unshift @INC instead of push -Report: http://marc.theaimsgroup.com/?l=apache-modperl-devm=100434522809036w=2 -Status: - patch available - Needs Patch or Further Investigation 1.143 +2 -2 modperl/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v retrieving revision 1.142 retrieving revision 1.143 diff -u -r1.142 -r1.143 --- mod_perl.c24 Mar 2002 18:22:56 - 1.142 +++ mod_perl.c24 Mar 2002 23:01:33 - 1.143 @@ -747,7 +747,7 @@ #endif #ifdef APACHE_PERL5LIB -perl_incpush(APACHE_PERL5LIB); +perl_inc_unshift(APACHE_PERL5LIB); #else av_push(GvAV(incgv), newSVpv(server_root_relative(p,),0)); av_push(GvAV(incgv), newSVpv(server_root_relative(p,lib/perl),0)); @@ -1412,7 +1412,7 @@ char *path = (char *)table_get(r-subprocess_env, PERL5LIB); if (path) { - perl_incpush(path); + perl_inc_unshift(path); MP_INCPUSH_on(cld); } } 1.113 +1 -1 modperl/src/modules/perl/mod_perl.h Index: mod_perl.h === RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.h,v retrieving revision 1.112 retrieving revision 1.113 diff -u -r1.112 -r1.113 --- mod_perl.h24 Mar 2002 20:57:23 - 1.112 +++ mod_perl.h24 Mar 2002 23:01:33 - 1.113 @@ -1179,7 +1179,7 @@ void mod_perl_init_ids(void); int perl_eval_ok(server_rec *s); int perl_sv_is_http_code(SV *sv, int *status); -void perl_incpush(char *s); +void perl_inc_unshift(char *s); SV *mod_perl_sv_name(SV *svp); void mod_perl_mark_where(char *where, SV *sub); 1.47 +3 -2 modperl/src/modules/perl/perl_util.c Index: perl_util.c === RCS file: /home/cvs/modperl/src/modules/perl/perl_util.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- perl_util.c 17 Apr 2001 21:30:02 - 1.46 +++ perl_util.c 24 Mar 2002 23:01:33 - 1.47 @@ -785,7 +785,7 @@ #define PERLLIB_SEP ':' #endif -void perl_incpush(char *p) +void perl_inc_unshift(char *p) { if(!p) return; @@ -803,7 +803,8 @@ sv_setpv(libdir, p); p = Nullch; } - av_push(GvAV(incgv), libdir); + av_unshift(GvAV(incgv), 1); + av_store(GvAV(incgv), 0, libdir); } }
cvs commit: modperl/apaci load_modules.pl.PL
dougm 02/03/24 16:16:20 Modified:apaciload_modules.pl.PL Log: 5.7.3+ File::Find croaks if the finddepth directory does not exist, which it doesn't when building with USE_APXS=1 Revision ChangesPath 1.4 +1 -1 modperl/apaci/load_modules.pl.PL Index: load_modules.pl.PL === RCS file: /home/cvs/modperl/apaci/load_modules.pl.PL,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- load_modules.pl.PL7 Apr 1999 19:10:16 - 1.3 +++ load_modules.pl.PL25 Mar 2002 00:16:20 - 1.4 -40,7 +40,7 } return if $name =~ /(auth|autoindex|digest)/; #a few that screw make test push sh_mods, LoadModule ${name}_module $full; -}, $APACHE_SRC); +}, $APACHE_SRC) if $APACHE_SRC and -d $APACHE_SRC; my($perl_mod) = grep /perl/, sh_mods; unshift sh_mods, $perl_mod; #must come before mod_include/USE_PERL_SSI
cvs commit: modperl Changes
dougm 02/03/24 17:59:02 Modified:lib/Apache PerlRun.pm .Changes Log: Apache::PerlRun will now localize $SIG{__{DIE,WARN}__} Revision ChangesPath 1.38 +5 -0 modperl/lib/Apache/PerlRun.pm Index: PerlRun.pm === RCS file: /home/cvs/modperl/lib/Apache/PerlRun.pm,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- PerlRun.pm11 Jul 2001 15:11:57 - 1.37 +++ PerlRun.pm25 Mar 2002 01:59:02 - 1.38 @@ -280,6 +280,11 @@ $pr-set_script_name; $pr-chdir_file; my $line = $pr-mark_line; + +#make sure this hooks are restored to their original state +local $SIG{__DIE__} = $SIG{__DIE__}; +local $SIG{__WARN__} = $SIG{__WARN__}; + my %orig_inc = %INC; my $eval = join '', 'package ', 1.637 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.636 retrieving revision 1.637 diff -u -r1.636 -r1.637 --- Changes 24 Mar 2002 23:01:33 - 1.636 +++ Changes 25 Mar 2002 01:59:02 - 1.637 @@ -10,6 +10,9 @@ =item 1.26_01-dev +Apache::PerlRun will now localize $SIG{__{DIE,WARN}__} +thanks to Jon Coulter for the spot + PERL5LIB support now properly unshifts paths into @INC rather than push [Tatsuhiko Miyagawa [EMAIL PROTECTED]]