Re: how to make mod_perl actually run fast
My configuration had a similar problem - a bunch of virtualhosts (~25 or so) some of which use modperl, running on a handful of 2-node tightly-coupled clusters with the content/scripts sitting on NFS. DNS for the virtualhost addresses points to a frontend cluster. I set up extra aliases for my backend virtualhost addresses in the /etc/hosts files on both the frontend and the backend servers. dns: www.glurp.com - my.frontend.address /etc/hosts: glurp1- my.backend1.address /etc/hosts: glurp2- my.backend2.address ...for all services The virtualhosts on the backend respond to the aliases in the /etc/hosts file and serve dynamic content. frontend writes /perl/ and /cgi-bin/ requests to a random-selection RewriteMap of the backend servers for that service. also at the frontend I took mod_proxy_add_forward.c and added another header. My module now adds X-Forwarded-For: remote.address# remote address of client X-Host: www.glurp.com # real virtualhost address The reason I used the X-Host header was to avoid missing-trailing-slash requests coming back to the client with the wrong (/etc/hosts aliased) virtualhost in the Location: response header. I have a mod_perl handler at the backend which intercepts 301 Moved Permanently requests which are usually thrown by missing-trailing-slash requests and rewrites the Location response header using the X-Host request header. I don't know whether there's a nice way to do this but it works relatively well. Thoughts welcome.. R. On Mon, 3 Dec 2001, Tyler 'Crackerjack' MacDonald wrote: [mod_perl list: i'm not a subscriber jsyk so if you wish to reply to me, reply to me directly and not the list] This past weekend, my webserver suffered a severe failure when i decided to upgrade my code to mod_perl instead of fastCGI. This performance problem resulted in me going to the mod_perl performance tuning guide. Reading this guide made me think damn, that's inconvienent for a bunch of VHosts. Thinking this made me write the following artice: http://www.weedns.com/apache_tuning/fast_mod_perl_mini_howto.html It uses wildcard DNS and some other goodies to extend the mod_perl-server-via-proxy-from-static-server setup that is already partially documented in the performance tuning and general guides on the perl.apache.org website. It's relevant to apache 1.3 because I got an even bigger headache trying to make modperl2+apache2 run. Feel free to link to it or integrate it's ideas into your own documentation if you wish. Cheers, Tyler -- Early to bed and early to rise and you'll be groggy when everyone else is wide awake.
Re: Oddity w/ mod_auth_digest
The password file was created from the current apache version's htpasswd via: htpasswd -c -m -b lembark foobar; you know you need to use htdigest when creating a digest password entry, right? which I thought should have created the proper entry. take a look at it. digest authentication should be in the form of user:realm:8493fbc53ba582fb4c044c456bdc40eb from the look of things, mod_auth_digest can't find the realm in the password file. I havn't had a chance yet to test whether the site works with this outside of the perly section. Is there any documentation that describes this in more detail than the mod_auth_digest.html, or has anyone seen this specific error? plug the forthcoming (january) mod_perl Developer's Cookbook spends about 10 pages talking about digest authentication and how it is implemented. /plug --Geoff
Re: how to make mod_perl actually run fast
My module now adds X-Forwarded-For: remote.address# remote address of client X-Host: www.glurp.com # real virtualhost address The reason I used the X-Host header was to avoid missing-trailing-slash requests coming back to the client with the wrong (/etc/hosts aliased) virtualhost in the Location: response header. Note that Apache will fix the redirects for you if you use the ProxyPassReverse directive regardless of whether the proxy action was done from a ProxyPass or a RewriteRule. You just need a ProxyPassReverse entry to match any of the targets that the rewrite can generate. Les Mikesell [EMAIL PROTECTED]
Re: ASP.NET Linux equivalent?
On Mon, 3 Dec 2001, Vsevolod Ilyushchenko wrote: Is anyone aware of a Linux product equivalent to ASP.NET from MS? Its most attractive feature is the GUI construction of Web forms and the automatic connection of their fields to a database. Since I am getting sick and tired of writing over and over the code to process user input and store it in the database, a similar product would be a huge help. (PHPLens does something similar, but it only presents data in the table format.) If you are writing the same code over and over again, that's a good sign you need to start creating modules and using those. One thing you may want to look at is Mason, which is a component based architecture for building web sites. See http://masonhq.com. But it's not point and click GUI stuff -- you still need to do some coding. -- Brett http://www.chapelperilous.net/ Poverty must have its satisfactions, else there would not be so many poor people. -- Don Herold
Re: how to make mod_perl actually run fast
I never managed to get ProxyPass ProxyPassReverse to work properly with farms of machines at the backend. :P R. On Wed, 5 Dec 2001 [EMAIL PROTECTED] wrote: My module now adds X-Forwarded-For: remote.address# remote address of client X-Host: www.glurp.com # real virtualhost address The reason I used the X-Host header was to avoid missing-trailing-slash requests coming back to the client with the wrong (/etc/hosts aliased) virtualhost in the Location: response header. Note that Apache will fix the redirects for you if you use the ProxyPassReverse directive regardless of whether the proxy action was done from a ProxyPass or a RewriteRule. You just need a ProxyPassReverse entry to match any of the targets that the rewrite can generate. Les Mikesell [EMAIL PROTECTED] -- +---+ Roger Michael Pettett Email: [EMAIL PROTECTED] Senior Web Developer, Web: http://www.sanger.ac.uk/ The Sanger Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SA +---+
Re: ASP.NET Linux equivalent?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 At 6:55 PM -0500 12/3/01, Vsevolod Ilyushchenko wrote: Hi, Is anyone aware of a Linux product equivalent to ASP.NET from MS? Its most attractive feature is the GUI construction of Web forms and the automatic connection of their fields to a database. Since I am getting sick and tired of writing over and over the code to process user input and store it in the database, a similar product would be a huge help. (PHPLens does something The combo of Embperl and DBIx::Recordset will come pretty close to automating the fetch and store of database records into a form (perhaps four or five lines of embedded Perl for each). Designing the form is not there though. - -- Kee Hinckley - Somewhere.Com, LLC http://consulting.somewhere.com/ [EMAIL PROTECTED] (or ...!alice!nazgul for time travelers :-) 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. -BEGIN PGP SIGNATURE- Version: PGP Personal Security 7.0.3 iQA/AwUBPA48/CZsPfdw+r2CEQJbJQCg9Q++f5OUtiqBjdJMtBNuGu6HM8wAoKCz nXJM2ZccDeJH6y2Ael/+r1bh =SgDE -END PGP SIGNATURE-
Re: ASP.NET Linux equivalent?
El Mié 05 Dic 2001 11:28, Brett W. McCoy escribió: On Mon, 3 Dec 2001, Vsevolod Ilyushchenko wrote: Is anyone aware of a Linux product equivalent to ASP.NET from MS? Its most attractive feature is the GUI construction of Web forms and the automatic connection of their fields to a database. Since I am getting sick and tired of writing over and over the code to process user input and store it in the database, a similar product would be a huge help. (PHPLens does something similar, but it only presents data in the table format.) If you are writing the same code over and over again, that's a good sign you need to start creating modules and using those. One thing you may want to look at is Mason, which is a component based architecture for building web sites. See http://masonhq.com. But it's not point and click GUI stuff -- you still need to do some coding. -- Brett http://www.chapelperilous.net/ Poverty must have its satisfactions, else there would not be so many poor people. -- Don Herold I believe that sometimes people want to stop thinking and let the GUI do that Job, obviously, it's not possible. Over Expectations over GUI often leads to troubles in planification It's a fact that with the GUI's you stop understanding what you are really doing. Hans Poo
Re: ASP.NET Linux equivalent?
Kee Hinckley [EMAIL PROTECTED] writes: At 6:55 PM -0500 12/3/01, Vsevolod Ilyushchenko wrote: Hi, Is anyone aware of a Linux product equivalent to ASP.NET from MS? Its most attractive feature is the GUI construction of Web forms and the automatic connection of their fields to a database. Since I am getting sick and tired of writing over and over the code to process user input and store it in the database, a similar product would be a huge help. (PHPLens does something The combo of Embperl and DBIx::Recordset will come pretty close to automating the fetch and store of database records into a form (perhaps four or five lines of embedded Perl for each). Designing the form is not there though. I did an auto-form generator-from-schema thing once. Too many exceptions and meta-data involved to actually make it really worthwhile. -- David Hodgkinson, Wizard for Hirehttp://www.davehodgkinson.com Editor-in-chief, The Highway Star http://www.deep-purple.com Deep Purple Family Tree news http://www.slashrock.com Interim Technical Director, Web Architecture Consultant for hire
Re: how to make mod_perl actually run fast
It uses wildcard DNS and some other goodies to extend the mod_perl-server-via-proxy-from-static-server setup Why not just use name-based virtual hosts for the backend and avoid all the monkeying with DNS? - Perrin
Re: ASP.NET Linux equivalent?
The sad truth is that there is no automated way generate forms based on sql tables or definitions. The same data maybe passed with many different form elements. With some JavaScript sprinkled on top of it all, no single perl module could go near automating this task. The best one can do is to separate and automate the handling of the entered data from the form itself and leave the form page as close to html as possible. A setup where the form page uses HTML::Mason (which was already mentioned) and all the database stuff is handled by some template/defintion based system (I use something called form2db) is as good as it gets. //Artem On Wednesday 05 December 2001 02:08 am, Matt Sergeant wrote: AxKit::XSP::PerForm is quite similar to the callback nature of ASP.NET, though of course we don't have a GUI form designer. We could certainly work on auto-loading of values from a database, but I think you'll find it's already pretty easy. Also PerForm has no automatic built in system to do the right thing for the different browsers - you have to write separate stylesheets yourself, but the use different stylesheets for different clients bit is built into AxKit, so it's not a complete disaster. :-) Matt. - Original Message - From: Vsevolod Ilyushchenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 03, 2001 11:55 PM Subject: ASP.NET Linux equivalent? Hi, Is anyone aware of a Linux product equivalent to ASP.NET from MS? Its most attractive feature is the GUI construction of Web forms and the automatic connection of their fields to a database. Since I am getting sick and tired of writing over and over the code to process user input and store it in the database, a similar product would be a huge help. (PHPLens does something similar, but it only presents data in the table format.) This may be somewhat offtopic, but I hope that even if there is nothing modperl based in existence, then maybe the readers are informed enough to point me in the right direction. So far it seems that neither Dotgnu nor Mono have anything similar. Thanks, Simon -- Simon (Vsevolod ILyushchenko) [EMAIL PROTECTED] http://www.simonf.com [EMAIL PROTECTED] A man who feels himself a citizen of the world whose loyalty is to the human race and to life, rather than to any exclusive part of it; a man who loves his country because he loves mankind, and whose judgement is not warped by tribal loyalties. Erich Fromm
Apache::Session and frames
I have been beating my head against this problem for days, to no avail. I have tried google searches, etc., still no dice. So, I apologize for the noise people. I'm using Apache::Session and cookies to perform session management. In watching the debug messages in my error_log, I can see that the cookie is created, the session is created, and all subsequent calls correctly loads the session. However, part of the design for my web application requires the use of frames, with several frames containing mod_perl generated data. Each one of those frames relies on using the session. I wouldn't think this would be a problem, except that some of the frames cannot tie to the datastore, and as a result create new sessions. I would think the default behavior would block until the session is unlocked, but this doesn't seem to be the case. I was first using Apache::Session::Flex (For easier configuration), but have also tried Apache::Session::MySQL, ::DB_File and ::File, all exhibit the same problem. This site is developed using AxKit and AxKit::XSP::Session, but the sessions are created before AxKit is even invoked so that isn't the issue. Any suggestions? I'd like to resolve this without loosing my hair. :) -man Michael A Nachbaur
Re: ASP.NET Linux equivalent?
Dave Hodgkinson writes: I did an auto-form generator-from-schema thing once. Too many exceptions and meta-data involved to actually make it really worthwhile. Check out the mapping for, e.g. http://petshop.bivio.biz/pub/products?p=FISH and click on Model.ProductList and View.products to see how we handle an automated mapping. We find it extremely convenient. Rob
Strange Can't locate errors
Can't locate CapWiz/Home/App.pm in @INC (@INC contains: /data/ap/perl- 5.6.1/lib/5.6.1/sun4-solaris /data/ap/perl-5.6.1/lib/5.6.1 /data/ap/perl-5.6.1/l ib/site_perl/5.6.1/sun4-solaris /data/ap/perl-5.6.1/lib/site_perl/5.6.1 /data/ap /perl-5.6.1/lib/site_perl . /data/ap/capwiz-apache/ /data/ap/capwiz-apache/lib/p erl) at (eval 12) line 3. Normally this error wouldn't be a problem for me... Except.. [rlandrum@par-s01 Home]$ pwd /data/ap/perl-5.6.1/lib/site_perl/5.6.1/CapWiz/Home [rlandrum@par-s01 Home]$ ls -l total 56 -r--r--r-- 1 rlandrum content27927 Nov 30 15:27 App.pm The file exists! So it's there, and so are all it used modules. Infact, I had this working just a few hours ago with user rlandrum (on port 8083), but once it fired up under root (on port 80), I started getting these errors. And I am definitly using the same httpd binary. This is a: SunOS 5.7 Generic_111437-01 sun4u sparc SUNW,Ultra-4 perl v5.6.1 built for sun4-solaris Apache/1.3.22 (Unix) mod_perl/1.26 Any thoughts? Rob -- Only two things are infinite: The universe, and human stupidity. And I'm not sure about the former. --Albert Einstein
Re: Apache::Session and frames
Basic Idea, what is the path argument of the cookie you are using? If the called pages are lying underneath different roots then the cookie won't be read. I even do not loose the session between windows :-) Thanks for the prompt reply. The way I have this going, is a file at: /index.xsp which just performs a redirect to /callisto.xsp (so that it has a chance to create the cookie). /callisto.xsp creates a frameset which loads, among other things: /folder-listing.xsp /task-listing.xsp /sitename.xsp Each one of those sub pages are in their own frames, and each attempts to load the session. Occasionally, one of them successfully loads the original session, but the other two end up creating their own sessions. When I call: tie %session, 'Apache::Session::Flex', $id, \%options; it doesn't return anything in $@, except there is no data inside %session. Therefore, the code that checks for _session_id, thinks that this is a new session, and goes ahead to create one. Any ideas?
Re: Apache::Session and frames
At 3:06 PM -0800 12/5/01, Michael A Nachbaur wrote: I have been beating my head against this problem for days, to no avail. I have tried google searches, etc., still no dice. So, I apologize for the noise people. I'm using Apache::Session and cookies to perform session management. In watching the debug messages in my error_log, I can see that the cookie is created, the session is created, and all subsequent calls correctly loads the session. However, part of the design for my web application requires the use of frames, with several frames containing mod_perl generated data. Each one of those frames relies on using the session. I wouldn't think this would be a problem, except that some of the frames cannot tie to the datastore, and as a result create new sessions. I would think the default behavior would block until the session is unlocked, but this doesn't seem to be the case. I was first using Apache::Session::Flex (For easier configuration), but have also tried Apache::Session::MySQL, ::DB_File and ::File, all exhibit the same problem. This site is developed using AxKit and AxKit::XSP::Session, but the sessions are created before AxKit is even invoked so that isn't the issue. Any suggestions? I'd like to resolve this without loosing my hair. :) Cookies set in a parent frame are not immediatly accessable to a child frames. It's a fun little bug that requires a full frame reload to be detected. Another thing to watch out for are the cookie paths. I've never used Apache::Session, so I don't know what path is set for the cookies, but if the pages loading in the child frames have non matching urls, then the session cookies aren't going to come through. Good Luck, Rob -- Only two things are infinite: The universe, and human stupidity. And I'm not sure about the former. --Albert Einstein
Re: Strange Can't locate errors
I've seen this happen on some NFS volumes on Solaris. In this case the problem was supported by 'ls' reporting different contents on the same directory between two different shells. Unfortunately, I'm not an NFS wiz and I don't recall what the resolution was (yeah, I know... really helpful :o) Regards, Tim Tompkins -- Programmer http://www.arttoday.com/ http://www.rebelartist.com/ -- - Original Message - From: Robert Landrum [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 05, 2001 4:24 PM Subject: Strange Can't locate errors Can't locate CapWiz/Home/App.pm in @INC (@INC contains: /data/ap/perl- 5.6.1/lib/5.6.1/sun4-solaris /data/ap/perl-5.6.1/lib/5.6.1 /data/ap/perl-5.6.1/l ib/site_perl/5.6.1/sun4-solaris /data/ap/perl-5.6.1/lib/site_perl/5.6.1 /data/ap /perl-5.6.1/lib/site_perl . /data/ap/capwiz-apache/ /data/ap/capwiz-apache/lib/p erl) at (eval 12) line 3. Normally this error wouldn't be a problem for me... Except.. [rlandrum@par-s01 Home]$ pwd /data/ap/perl-5.6.1/lib/site_perl/5.6.1/CapWiz/Home [rlandrum@par-s01 Home]$ ls -l total 56 -r--r--r-- 1 rlandrum content27927 Nov 30 15:27 App.pm The file exists! So it's there, and so are all it used modules. Infact, I had this working just a few hours ago with user rlandrum (on port 8083), but once it fired up under root (on port 80), I started getting these errors. And I am definitly using the same httpd binary. This is a: SunOS 5.7 Generic_111437-01 sun4u sparc SUNW,Ultra-4 perl v5.6.1 built for sun4-solaris Apache/1.3.22 (Unix) mod_perl/1.26 Any thoughts? Rob -- Only two things are infinite: The universe, and human stupidity. And I'm not sure about the former. --Albert Einstein
Re: Strange Can't locate errors
At 4:41 PM -0700 12/5/01, Tim Tompkins wrote: I've seen this happen on some NFS volumes on Solaris. In this case the problem was supported by 'ls' reporting different contents on the same directory between two different shells. Unfortunately, I'm not an NFS wiz and I don't recall what the resolution was (yeah, I know... really helpful :o) Not NFS'd anyway. Someone suggested that I might have a permissions problem, since the webserver ran as user/group nobody. I checked and found that the lib with the perl-5.6.1 directory was read only for world. I'm trying to fix it now... Rob -- Only two things are infinite: The universe, and human stupidity. And I'm not sure about the former. --Albert Einstein
Re: Apache::Session and frames
Hi Michael - I'm using Apache::Session and cookies to perform session management. In watching the debug messages in my error_log, I can see that the cookie is created, the session is created, and all subsequent calls correctly loads the session. However, part of the design for my web application requires the use of frames, with several frames containing mod_perl generated data. Each one of those frames relies on using the session. I wouldn't think this would be a problem, except that some of the frames cannot tie to the datastore, and as a result create new sessions. We had similar problems with a frameset scheme - the browser requests the page containing the frameset definition and then almost simultaneously requests each of the pages that must be loaded into each frame, and confusion ensues. What worked for us (I don't know for sure if this will help you) was to turn on the Transaction flag during the session tie, e.g.: tie %s, 'Apache::Session::File', $id { Directory = '/tmp/sessions', LockDirectory = '/var/lock/sessions', Transaction = 1 }; which should (depending on the underlying session mechanism) provide transactional consistency. In our case it helped prevent data loss that was occurring while each of the frameset pages was simultaneously monkeying with the session. Larry Leszczynski [EMAIL PROTECTED]
RE: Apache::Session and frames
I have 'heard' that in some browsers there is a bug using HTTP/1.1 when they use Keep-Alive. As they don't necessarily create another explicit tcp connection for a request (but rather try to keep the connection alive), they 'forget' to send the Cookie headers for subsequent requests in the same connection. It might not be the problem, but its worth checking what headers each request (and each connection) is getting/sending... -Original Message- From: Robert Landrum [mailto:[EMAIL PROTECTED]] Sent: Thursday, 6 December 2001 10:29 AM To: Michael A Nachbaur; [EMAIL PROTECTED] Subject: Re: Apache::Session and frames At 3:06 PM -0800 12/5/01, Michael A Nachbaur wrote: I have been beating my head against this problem for days, to no avail. I have tried google searches, etc., still no dice. So, I apologize for the noise people. I'm using Apache::Session and cookies to perform session management. In watching the debug messages in my error_log, I can see that the cookie is created, the session is created, and all subsequent calls correctly loads the session. However, part of the design for my web application requires the use of frames, with several frames containing mod_perl generated data. Each one of those frames relies on using the session. I wouldn't think this would be a problem, except that some of the frames cannot tie to the datastore, and as a result create new sessions. I would think the default behavior would block until the session is unlocked, but this doesn't seem to be the case. I was first using Apache::Session::Flex (For easier configuration), but have also tried Apache::Session::MySQL, ::DB_File and ::File, all exhibit the same problem. This site is developed using AxKit and AxKit::XSP::Session, but the sessions are created before AxKit is even invoked so that isn't the issue. Any suggestions? I'd like to resolve this without loosing my hair. :) Cookies set in a parent frame are not immediatly accessable to a child frames. It's a fun little bug that requires a full frame reload to be detected. Another thing to watch out for are the cookie paths. I've never used Apache::Session, so I don't know what path is set for the cookies, but if the pages loading in the child frames have non matching urls, then the session cookies aren't going to come through. Good Luck, Rob -- Only two things are infinite: The universe, and human stupidity. And I'm not sure about the former. --Albert Einstein
Fw: [OT] Re: ASP.NET Linux equivalent?
Vsevolod See below. Cheers Ron Savage [EMAIL PROTECTED] http://savage.net.au/index.html - Original Message - From: Vsevolod Ilyushchenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 10:55 AM Subject: ASP.NET Linux equivalent? Hi, Is anyone aware of a Linux product equivalent to ASP.NET from MS? Its most attractive feature is the GUI construction of Web forms and the automatic connection of their fields to a database. Since I am getting sick and tired We're all sick and tired of it! I have written such a system. It is pure Perl, and is based on MySQL. But, no, it isn't mod_perl enabled. I just use it privately at the moment, for a group of swimming clubs, and for a wine db. I am undecided about releasing it, and if so, how to do so.
Re: [OT] Re: Multiple Sites
(Though, it's always seemed to me that it might be a decent design to have *one* vhost dedicated to accepting payments for the other vhosts... so when the user is ready to close the deal they get kicked to payment.super_secure.com where they're asked for the credit card info to finish processing). i have seen it done this way before. just got to make sure you can identify the client since you will not get back a cookie for your vhost. you will probably have to reset the cookie for the domain of your isp, or pass as hidden data, or in the url. http://www.mydomain.com/buystuffnow.html https://www.isp.com/~mydomain.com/paymenow.html?sessionID=xyz987123456 -- ___cliff [EMAIL PROTECTED]http://www.genwax.com/
Re: [OT] Re: Multiple Sites
Joe Brenner wrote: Andy Sharp [EMAIL PROTECTED] wrote: As others have aluded to, if you're trying to serve multiple domains (or hostnames) off one IP, you use a system called software virtual hosting. HTTP/1.1 Supports the Host: field in the http header to resolve to the site domain. There's a limitation on virtual hosts though, if you want to do any kind of ecommerce stuff with SSL (which works via the IP number), it won't work if you try to do it with more than one of the vhosts. Yeah, I've scratched my head on that issue before. Eventually I gave up after reading the mod_ssl docs: http://www.modssl.org/docs/2.8/ssl_faq.html#vhosts The most common way to do it is to use IP aliasing to assign multiple IPs to your server, once for each SSL vhost. I just did a search through the apache-modssl mailing list, and you can actually do multiple unique SSL name-based vhosts on the same IP, _if_ use use separate ports for each. That might be acceptable as well... ie domain1.com is accessed via https://domain1.com:1000, domain2.com is https://domain2.com:1001, etc. http://marc.theaimsgroup.com/?l=apache-modsslw=2r=1s=ssl+virtual+host+name+basedq=b -- Regards, Wim Kerkhoff, Software Engineer Merilus, Inc. -|- http://www.merilus.com Email: [EMAIL PROTECTED]
a new modperl book: mod_perl Developer's Cookbook
SAMS will publish the new mod_perl Developer's Cookbook by Geoffrey Young, Paul Lindner and Randy Kobes in January, 2002. You can find more info at http://www.modperlcookbook.org/. Great work guys! There are two more modperl books in the pipeline! _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
[OT] Re: Multiple Sites
Andy Sharp [EMAIL PROTECTED] wrote: As others have aluded to, if you're trying to serve multiple domains (or hostnames) off one IP, you use a system called software virtual hosting. HTTP/1.1 Supports the Host: field in the http header to resolve to the site domain. There's a limitation on virtual hosts though, if you want to do any kind of ecommerce stuff with SSL (which works via the IP number), it won't work if you try to do it with more than one of the vhosts. So you're clients are going to be stuck using an external agency (like paypal?) if they want to take on-line payments. (Though, it's always seemed to me that it might be a decent design to have *one* vhost dedicated to accepting payments for the other vhosts... so when the user is ready to close the deal they get kicked to payment.super_secure.com where they're asked for the credit card info to finish processing).
cvs commit: modperl-2.0/t/response/TestApache compat.pm
stas01/12/05 08:03:25 Modified:lib/Apache compat.pm t/apache compat.t t/response/TestApache compat.pm Log: - add 'PerlOptions +GlobalRequest' to avoid core dumps in tests - warn user if Apache-request fails - add the returned by tmpfile filename test Revision ChangesPath 1.26 +4 -1 modperl-2.0/lib/Apache/compat.pm Index: compat.pm === RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- compat.pm 2001/12/05 05:31:09 1.25 +++ compat.pm 2001/12/05 16:03:25 1.26 @@ -301,11 +301,14 @@ my $class = shift; my $limit = 100; my $r = Apache-request; +unless ($r) { +die 'PerlOptions +GlobalRequest' setting is required; +} while ($limit--) { my $tmpfile = $TMPDIR/${$} . $TMPNAM++; my $fh = $class-new; sysopen($fh, $tmpfile, $Mode, $Perms); -$r-register_cleanup(sub { unlink $tmpfile }) if $r; +$r-pool-cleanup_register(sub { unlink $tmpfile }) if $r; if ($fh) { return wantarray ? ($tmpfile, $fh) : $fh; } 1.5 +1 -1 modperl-2.0/t/apache/compat.t Index: compat.t === RCS file: /home/cvs/modperl-2.0/t/apache/compat.t,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- compat.t 2001/12/05 05:31:09 1.4 +++ compat.t 2001/12/05 16:03:25 1.5 @@ -6,7 +6,7 @@ use Apache::TestUtil; use Apache::TestRequest; -plan tests = 20, \have_lwp; +plan tests = 21, \have_lwp; my $location = /TestApache::compat; 1.4 +10 -2 modperl-2.0/t/response/TestApache/compat.pm Index: compat.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- compat.pm 2001/12/05 05:31:09 1.3 +++ compat.pm 2001/12/05 16:03:25 1.4 @@ -116,9 +116,15 @@ debug new+open non-exists; ok !Apache::File-new($file.yeahright); -debug open tmpfile; -ok my ($tmpfile, $tmpfh) = Apache::File-tmpfile; +# tmpfile +my ($tmpfile, $tmpfh) = Apache::File-tmpfile; +#89573612 +debug open tmpfile fh; +ok $tmpfh; +debug open tmpfile name; +ok $tmpfile; + debug write/read from tmpfile; my $write = test $$; print $tmpfh $write; @@ -134,3 +140,5 @@ sub debug { $gr-print(# $_\n) for @_; } 1; +__END__ +PerlOptions +GlobalRequest
cvs commit: modperl-site/embperl Changes.pod.1.html Changes.pod.2.html Changes.pod.cont.html Embperl.pod.14.html Embperl.pod.2.html Embperl.pod.3.html Embperl.pod.6.html Embperl.pod.7.html Embperl.pod.cont.html Faq.pod.1.html INSTALL.pod.1.html Recordset.pod.2.html index.html
richter 01/12/05 00:16:25 Modified:embperl Changes.pod.1.html Changes.pod.2.html Changes.pod.cont.html Embperl.pod.14.html Embperl.pod.2.html Embperl.pod.3.html Embperl.pod.6.html Embperl.pod.7.html Embperl.pod.cont.html Faq.pod.1.html INSTALL.pod.1.html Recordset.pod.2.html index.html Log: Embperl Webpages - Changes Revision ChangesPath 1.229 +6 -10 modperl-site/embperl/Changes.pod.1.html Index: Changes.pod.1.html === RCS file: /home/cvs/modperl-site/embperl/Changes.pod.1.html,v retrieving revision 1.228 retrieving revision 1.229 diff -u -r1.228 -r1.229 --- Changes.pod.1.html2001/11/02 10:16:23 1.228 +++ Changes.pod.1.html2001/12/05 08:16:25 1.229 @@ -1,6 +1,6 @@ HTML HEAD -TITLE1.3.4_dev -- That's what currently under developement/TITLE +TITLE1.3.4 5. Dec 2001/TITLE LINK REV=made HREF=mailto:[EMAIL PROTECTED]; /HEAD @@ -11,7 +11,7 @@ tr td valign=bottom align=center font size=6strong -A NAME=1_3_4_dev_That_s_what_current1.3.4_dev -- That's what currently under developement/a/strong/font +A NAME=1_3_4_RELEASE_5_Dec_20011.3.4 (RELEASE) 5. Dec 2001/a/strong/font /tdtd rowspan=2 align=right/td /trtrtd valign=top align=center @@ -21,14 +21,6 @@ [a href= HOME/a]nbsp;nbsp; [a href=Changes.pod.cont.htmlCONTENT/a]nbsp;nbsp; [a href=Changes.pod.cont.htmlPREV (Revision History - Content)/a]nbsp;nbsp; [a href=Changes.pod.2.htmlNEXT (1.3.3 (RELEASE) 6. Juni 2001)/a]nbsp;nbsp; brhr P -Last Update: Fri Nov 2 11:26:22 2001 (MET) - -P -NOTE: This version is only available via A HREF=CVS.pod.1.html#INTRO CVS/A - - - -P PRE - Added method $r -gt; Espace for html amp; url escaping - URL escpage # to %23 - use Content-Lenght HTTP Header instead of $ENV{CONTENT_LENGTH} @@ -69,6 +61,10 @@ - Added optShowBacktrace to enable backtrace of filename in error messages - Removed obsolete debug flags dbgDisableCache, dbgWatchScalar, dbgEarlyHttpHeader + - Fixed problem with changeing to page directory on win32. Reported by + Hans de Groot. + - Fixed problems with mod_perl environement handling with ActiveState Perl + on win32. /PRE p[a href= HOME/a]nbsp;nbsp; [a href=Changes.pod.cont.htmlCONTENT/a]nbsp;nbsp; [a href=Changes.pod.cont.htmlPREV (Revision History - Content)/a]nbsp;nbsp; [a href=Changes.pod.2.htmlNEXT (1.3.3 (RELEASE) 6. Juni 2001)/a]nbsp;nbsp; br font color=#808080___br 1.64 +2 -2 modperl-site/embperl/Changes.pod.2.html Index: Changes.pod.2.html === RCS file: /home/cvs/modperl-site/embperl/Changes.pod.2.html,v retrieving revision 1.63 retrieving revision 1.64 diff -u -r1.63 -r1.64 --- Changes.pod.2.html2001/06/15 06:29:22 1.63 +++ Changes.pod.2.html2001/12/05 08:16:25 1.64 @@ -19,7 +19,7 @@ img src=line.jpg alt= WIDTH=732 HEIGHT=35 nbsp;nbsp;nbsp;nbsp;/td/tr/table -[a href= HOME/a]nbsp;nbsp; [a href=Changes.pod.cont.htmlCONTENT/a]nbsp;nbsp; [a href=Changes.pod.1.htmlPREV (1.3.4_dev -- That's what currently under developement)/a]nbsp;nbsp; [a href=Changes.pod.3.htmlNEXT (1.3.2 (RELEASE) 16 May. 2001 )/a]nbsp;nbsp; brhr +[a href= HOME/a]nbsp;nbsp; [a href=Changes.pod.cont.htmlCONTENT/a]nbsp;nbsp; [a href=Changes.pod.1.htmlPREV (1.3.4 (RELEASE) 5. Dec 2001)/a]nbsp;nbsp; [a href=Changes.pod.3.htmlNEXT (1.3.2 (RELEASE) 16 May. 2001 )/a]nbsp;nbsp; brhr P PRE - fixes problem with cleanup and Perl 5.6.0+ which broke session management. Spotted by Lukas Zapletal and Andy Lim. @@ -39,7 +39,7 @@ - added correct errror message for rcNotCompiledForModPerl. Spotted by Scott Chapman. /PRE -p[a href= HOME/a]nbsp;nbsp; [a href=Changes.pod.cont.htmlCONTENT/a]nbsp;nbsp; [a href=Changes.pod.1.htmlPREV (1.3.4_dev -- That's what currently under developement)/a]nbsp;nbsp; [a href=Changes.pod.3.htmlNEXT (1.3.2 (RELEASE) 16 May. 2001 )/a]nbsp;nbsp; br +p[a href= HOME/a]nbsp;nbsp; [a href=Changes.pod.cont.htmlCONTENT/a]nbsp;nbsp; [a href=Changes.pod.1.htmlPREV (1.3.4 (RELEASE) 5. Dec 2001)/a]nbsp;nbsp; [a href=Changes.pod.3.htmlNEXT (1.3.2 (RELEASE) 16 May. 2001 )/a]nbsp;nbsp; br font color=#808080___br HTML::Embperl - Copyright (c) 1997-2001 Gerald Richter / a href=http://www.ecos.de/;ecos gmbh/a /font/p 1.64 +3 -3 modperl-site/embperl/Changes.pod.cont.html Index: Changes.pod.cont.html
cvs commit: modperl-2.0/t/response/TestApache compat.pm
stas01/12/05 08:39:01 Modified:t/apache compat.t t/response/TestApache compat.pm Log: - add the rest of the sub tests for the $r methods provided by Apache::File in 1.x. Revision ChangesPath 1.6 +3 -3 modperl-2.0/t/apache/compat.t Index: compat.t === RCS file: /home/cvs/modperl-2.0/t/apache/compat.t,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- compat.t 2001/12/05 16:03:25 1.5 +++ compat.t 2001/12/05 16:39:01 1.6 @@ -6,7 +6,7 @@ use Apache::TestUtil; use Apache::TestRequest; -plan tests = 21, \have_lwp; +plan tests = 26, \have_lwp; my $location = /TestApache::compat; @@ -54,7 +54,7 @@ # Apache::File { -my @data = (test = 'file'); +my @data = (test = 'Apache::File'); my $data = GET_BODY query(@data) || ''; ok_nok($data); } @@ -66,7 +66,7 @@ $location? . join '', map { $_=$args{$_} } keys %args; } -sub t_header{ +sub t_header { my ($way, $what, $comment) = @_; ok t_cmp( ok, 1.5 +25 -3 modperl-2.0/t/response/TestApache/compat.pm Index: compat.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- compat.pm 2001/12/05 16:03:25 1.4 +++ compat.pm 2001/12/05 16:39:01 1.5 @@ -77,7 +77,7 @@ $r-print(t_is_equal($exp, $got) ? 'ok' : 'nok'); } } -elsif ($data{test} eq 'file') { +elsif ($data{test} eq 'Apache::File') { $gr = $r; my $file = $vars-{t_conf_file}; @@ -118,7 +118,7 @@ # tmpfile my ($tmpfile, $tmpfh) = Apache::File-tmpfile; -#89573612 + debug open tmpfile fh; ok $tmpfh; @@ -131,9 +131,31 @@ seek $tmpfh, 0, 0; my $read = $tmpfh; ok $read eq $write; + +debug \$r-discard_request_body; +ok $r-discard_request_body == Apache::OK; + +debug \$r-meets_conditions; +ok $r-meets_conditions == Apache::OK; + +debug \$r-set_content_length; +$r-set_content_length(10); +my $cl_header = $r-headers_out-{Content-length} || ''; +ok $cl_header == 10; + +# XXX: how to test etag? +debug \$r-set_etag; +$r-set_etag; +ok 1; + +debug \$r-update_mtime/\$r-mtime; +my $time = time; +$r-update_mtime($time); +ok $r-mtime == $time; + } -OK; +Apache::OK; } sub ok{ $gr-print($_[0] ? ok\n : nok\n); }
Re: http://perl.apache.org/tidbits.html
On Sun, 28 Oct 2001, Paul DuBois wrote: I don't know if you're still maintaing the list of publications that mention mod_perl...looks like maybe not, given the dates on the items. But if you are, this book (by me) has a chapter on mod_perl in the context of using MySQL/DBI/Apache: http://www.kitebird.com/mysql-perl/ hi paul, thanks for the info. i haven't been maintaining that page, and a new site is under construction. i'm not sure if that info will be carried over or not, but i've cc'd the list. would be interesting to see that page brought up to date.
cvs commit: modperl-2.0/lib/Apache compat.pm
dougm 01/12/05 11:09:37 Modified:lib/Apache compat.pm Log: more info in Apache::File-tmpfile if Apache-request isn't available Revision ChangesPath 1.27 +3 -2 modperl-2.0/lib/Apache/compat.pm Index: compat.pm === RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- compat.pm 2001/12/05 16:03:25 1.26 +++ compat.pm 2001/12/05 19:09:37 1.27 @@ -302,13 +302,14 @@ my $limit = 100; my $r = Apache-request; unless ($r) { -die 'PerlOptions +GlobalRequest' setting is required; +die cannot use Apache::File-tmpfile . + without 'SetHandler perl-script' or 'PerlOptions +GlobalRequest'; } while ($limit--) { my $tmpfile = $TMPDIR/${$} . $TMPNAM++; my $fh = $class-new; sysopen($fh, $tmpfile, $Mode, $Perms); -$r-pool-cleanup_register(sub { unlink $tmpfile }) if $r; +$r-pool-cleanup_register(sub { unlink $tmpfile }); if ($fh) { return wantarray ? ($tmpfile, $fh) : $fh; }
cvs commit: modperl-2.0/lib/Apache compat.pm
dougm 01/12/05 11:11:34 Modified:lib/Apache compat.pm Log: some whitespace style nits remove redundant use of Apache::{Response,RequestRec} Revision ChangesPath 1.28 +4 -3 modperl-2.0/lib/Apache/compat.pm Index: compat.pm === RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- compat.pm 2001/12/05 19:09:37 1.27 +++ compat.pm 2001/12/05 19:11:34 1.28 @@ -290,7 +290,6 @@ close $self; } - my $TMPNAM = 'aa'; my $TMPDIR = $ENV{'TMPDIR'} || $ENV{'TEMP'} || '/tmp'; ($TMPDIR) = $TMPDIR =~ /^([^|;*]+)$/; #untaint @@ -301,15 +300,19 @@ my $class = shift; my $limit = 100; my $r = Apache-request; + unless ($r) { die cannot use Apache::File-tmpfile . without 'SetHandler perl-script' or 'PerlOptions +GlobalRequest'; } + while ($limit--) { my $tmpfile = $TMPDIR/${$} . $TMPNAM++; my $fh = $class-new; + sysopen($fh, $tmpfile, $Mode, $Perms); $r-pool-cleanup_register(sub { unlink $tmpfile }); + if ($fh) { return wantarray ? ($tmpfile, $fh) : $fh; } @@ -317,7 +320,6 @@ } # the following functions now live in Apache::Response -use Apache::Response; # * discard_request_body # * meets_conditions # * set_content_length @@ -326,7 +328,6 @@ # * update_mtime # the following functions now live in Apache::RequestRec -use Apache::RequestRec; # * mtime
cvs commit: modperl-2.0/lib/Apache compat.pm
dougm 01/12/05 11:18:08 Modified:lib/Apache compat.pm Log: untabify and better fit for tmpfile error message Revision ChangesPath 1.29 +5 -4 modperl-2.0/lib/Apache/compat.pm Index: compat.pm === RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- compat.pm 2001/12/05 19:11:34 1.28 +++ compat.pm 2001/12/05 19:18:08 1.29 @@ -302,8 +302,9 @@ my $r = Apache-request; unless ($r) { -die cannot use Apache::File-tmpfile . - without 'SetHandler perl-script' or 'PerlOptions +GlobalRequest'; +die cannot use Apache::File-tmpfile , +without 'SetHandler perl-script' , +or 'PerlOptions +GlobalRequest'; } while ($limit--) { @@ -314,8 +315,8 @@ $r-pool-cleanup_register(sub { unlink $tmpfile }); if ($fh) { - return wantarray ? ($tmpfile, $fh) : $fh; - } +return wantarray ? ($tmpfile, $fh) : $fh; +} } }
cvs commit: modperl-2.0/t/filter/TestFilter api.pm
dougm 01/12/05 11:57:29 Modified:t/filter/TestFilter api.pm Log: s/use Test/use Apache::Test/ Revision ChangesPath 1.5 +3 -13 modperl-2.0/t/filter/TestFilter/api.pm Index: api.pm === RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/api.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- api.pm2001/06/23 17:47:31 1.4 +++ api.pm2001/12/05 19:57:29 1.5 @@ -6,20 +6,10 @@ use Apache::Filter (); use Apache::FilterRec (); -use Test; +use Apache::Test; my $response_data = blah blah blah; -sub init_test_pm { -my $filter = shift; - -tie *STDOUT, $filter; - -$Test::TESTOUT = \*STDOUT; -$Test::planned = 0; -$Test::ntest = 1; -} - #XXX: else pp_untie complains: #untie attempted while %d inner references still exist sub Apache::Filter::UNTIE {} @@ -29,7 +19,7 @@ $filter-read(my $buffer); #slurp everything; -init_test_pm($filter); +tie *STDOUT, $filter; plan tests = 6; @@ -51,7 +41,7 @@ untie *STDOUT; -0; +Apache::OK; } sub response {
cvs commit: modperl-site index.html
stas01/12/05 19:58:27 Modified:.index.html Log: - add a ref to the mod_perl Developer's Cookbook Revision ChangesPath 1.94 +7 -0 modperl-site/index.html Index: index.html === RCS file: /home/cvs/modperl-site/index.html,v retrieving revision 1.93 retrieving revision 1.94 diff -u -r1.93 -r1.94 --- index.html2001/10/31 14:37:54 1.93 +++ index.html2001/12/06 03:58:27 1.94 @@ -310,6 +310,13 @@ brbr /li + li + a href=http://www.modperlcookbook.org/;The mod_perl + Developer's Cookbook/a book by Geoffrey Young, Paul + Lindner and Randy Kobes. + brbr + /li + li a href=http://www.oreilly.com/catalog/modperlpr/;mod_perl Pocket Reference/a book by Andrew Ford