cvs commit: modperl-2.0/xs/maps apache_types.map
stas02/03/25 17:52:12 Modified:xs/maps apache_types.map Log: add the typemap for 'double' needed by xs_generate Revision ChangesPath 1.7 +1 -0 modperl-2.0/xs/maps/apache_types.map Index: apache_types.map === RCS file: /home/cvs/modperl-2.0/xs/maps/apache_types.map,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- apache_types.map 10 Sep 2001 06:42:51 - 1.6 +++ apache_types.map 26 Mar 2002 01:52:12 - 1.7 -50,6 +50,7 long int| IV unsigned long | UV unsigned| UV +double | NV char * | PV const char * | PV
cvs commit: modperl-2.0/xs/Apache/Log Apache__Log.h
dougm 02/03/25 19:37:47 Modified:xs/Apache/Log Apache__Log.h Log: workaround win32/5.6.1 bug which crashes when using PL_sv_no with do_join Revision ChangesPath 1.9 +24 -6 modperl-2.0/xs/Apache/Log/Apache__Log.h Index: Apache__Log.h === RCS file: /home/cvs/modperl-2.0/xs/Apache/Log/Apache__Log.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Apache__Log.h 4 May 2001 06:31:37 - 1.8 +++ Apache__Log.h 26 Mar 2002 03:37:47 - 1.9 -102,6 +102,27 #define mpxs_Apache__Server_log(sv) \ mpxs_Apache__Log_log(aTHX_ sv, MP_LOG_SERVER) +static MP_INLINE SV *modperl_perl_do_join(pTHX_ SV **mark, SV **sp) +{ +SV *sv = newSV(0); +SV *delim; +#ifdef WIN32 +/* XXX: using PL_sv_no crashes on win32 with 5.6.1 */ +delim = newSVpv(, 0); +#else +delim = SvREFCNT_inc(PL_sv_no); +#endif + +do_join(sv, delim, mark, sp); + +SvREFCNT_dec(delim); + +return sv; +} + +#define my_do_join(m, s) \ + modperl_perl_do_join(aTHX_ (m), (s)) + static XS(MPXS_Apache__Log_dispatch) { dXSARGS; -115,8 +136,7 } if (items 2) { -msgsv = newSV(0); -do_join(msgsv, PL_sv_no, MARK+1, SP); +msgsv = my_do_join(MARK+1, SP); } else { msgsv = ST(1); -213,8 +233,7 status = (apr_status_t)SvIV(ST(4)); if (items 6) { -msgsv = newSV(0); -do_join(msgsv, PL_sv_no, MARK+5, SP); +msgsv = my_do_join(MARK+5, SP); } else { msgsv = ST(5); -279,8 +298,7 } if (items 1+i) { -sv = newSV(0); -do_join(sv, PL_sv_no, MARK+i, SP); /* $sv = join '', _[1..$#_] */ +sv = my_do_join(MARK+i, SP); /* $sv = join '', _[1..$#_] */ errstr = SvPV(sv,n_a); } else {
Re: Apache::DBI or What ?
On Sun, 24 Mar 2002, Andrew Ho wrote: 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. Does 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. First, I'll suggest that there are hopefully other areas you can look at optimizing that will get you a bigger bang for your time - in my test environment (old hardware), it takes 7.4 ms per disconnect/reconnect/rebind and 4.8 ms per rebind. Admittedly, I'm dealing with LDAP instead of SQL, and I've no idea how they compare. If the TCP connection were retained, this could still be a significant win. *Any* reduction in the connection overhead is an improvement. If there are a million connects per day, and this saves a milli-second per connect (believable to me, as at least three packets don't need to be sent - syn, syn ack, and fin. My TCP's a bit fuzzy, but I think there's a couple more, and there's also the mod_perl disconnect/reconnect overhead), that's over 15 minutes of response time and about 560,000,000 bits of network bandwidth (assuming the DB is not on the same machine) saved. Admittedly, at 100Mb/s, that's only 6 seconds. It may, in some cases, still be necessary to move access control from the DB into ones application, so one can maintain a single connection which never rebinds, but I think it's better to utilize the security in the DB instead of coding ones own - more eyes have looked over it. We're talking about a fairly small unit of time; it may very well be better to throw money if you are near your performance limit. Ed
Re: Apache::DBI or What ?
Hi, It might well be that in my particular case, I don't have anything to worry about the connection time per each user most likely won't kill me or even cause problems at first. But I am trying to build a system, and I don't want to skip any reasonable efficences I can build in from the start. In my situation the user will only be doing inserts from the mod_perl side, so I am thinking I can make use of something like Apache::File or some kind of tmp file where I will store the tab delimited data for the user insert, and on the cleanup handler phase does a COPY FROM file which is a Postgress thing to the user's table. I need for that data to be available to that same user by JDBC pretty much immediatly. But does a copy from a file like this work better than a persistent connection but one that is doing insert after insert which is not nearly as efficent as the bulk copy? As I understand it the COPY from after a droping indexes would be the fastest way to insert data into a table for postgress, period. I guess I will just have to test it out and see. The other thing I am wondering about, is that even if I have a bunch of users, why couldn't I just make my persistent connection user have rights to all of the other user tables? Well, I guess I could do that, but I am expecting one of you will tell me why that is a bad idea :) Something about it seem too easy after all of this. I was tending to want to use the DBs security also for the same reasons, so maybe that is what bothers me about the above. Thanks, this discussion has helped me out tremendously, just to know others have the same problem even. Eric First, I'll suggest that there are hopefully other areas you can look at optimizing that will get you a bigger bang for your time - in my test environment (old hardware), it takes 7.4 ms per disconnect/reconnect/rebind and 4.8 ms per rebind. Admittedly, I'm dealing with LDAP instead of SQL, and I've no idea how they compare. If the TCP connection were retained, this could still be a significant win. *Any* reduction in the connection overhead is an improvement. If there are a million connects per day, and this saves a milli-second per connect (believable to me, as at least three packets don't need to be sent - syn, syn ack, and fin. My TCP's a bit fuzzy, but I think there's a couple more, and there's also the mod_perl disconnect/reconnect overhead), that's over 15 minutes of response time and about 560,000,000 bits of network bandwidth (assuming the DB is not on the same machine) saved. Admittedly, at 100Mb/s, that's only 6 seconds. It may, in some cases, still be necessary to move access control from the DB into ones application, so one can maintain a single connection which never rebinds, but I think it's better to utilize the security in the DB instead of coding ones own - more eyes have looked over it. We're talking about a fairly small unit of time; it may very well be better to throw money if you are near your performance limit. Ed http://www.kwinternet.com/eric (250) 655 - 9513 (PST Time Zone)
Re: mod_perl training companies?
Stas == Stas Bekman [EMAIL PROTECTED] writes: Stas Steven Lembark wrote: http://www.stonehenge.com/ http://www.stonehenge.com/perltraining/ Stas Steven, They don't give mod_perl courses, at least I couldn't find any. We don't have any courses off-the-rack. But we custom build anything, and have in the past. The problem with on-site mod_perl training is that every customer will be different. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Re: mod_perl training companies?
Randal L. Schwartz wrote: Stas == Stas Bekman [EMAIL PROTECTED] writes: Stas Steven Lembark wrote: http://www.stonehenge.com/ http://www.stonehenge.com/perltraining/ Stas Steven, They don't give mod_perl courses, at least I couldn't find any. We don't have any courses off-the-rack. But we custom build anything, and have in the past. Can you please add a page stating that and I'll link to it. Alternatively, we may start a new category: These companies give mod_perl training on demand, but have no off-the-rack course: ... The problem with on-site mod_perl training is that every customer will be different. :) __ 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: mod_perl training companies?
Stas == Stas Bekman [EMAIL PROTECTED] writes: Stas Can you please add a page stating that and I'll link to it. The bottom paragraph of http://www.stonehenge.com/perltraining/courses.html is our catch all. I'm no wizard at marketing, however. It probably all needs rewriting. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Re: Problems installing on Solaris 8
Dave Hodgkinson [EMAIL PROTECTED] writes: Ged Haywood [EMAIL PROTECTED] writes: Something very wrong there. Do you have squeaky clean source trees? I'd be tempted to erase the lot and start again. What's the compiler? Post your httpd.conf? Have you built other (older) versions of Apache and mod_perl on the same OS? httpd -l should verify what modules really are linked in. [8:37am]# httpd -l Compiled-in modules: http_core.c mod_so.c mod_perl.c suexec: disabled; invalid wrapper /usr/local/apache/bin/suexec So it looks like mod_perl is definitely built in. If I have any of mod_negotiation, mod_proxy or mod_db_auth in my LoadModule list, a httpd -t or an attempt to start apache produces something like the following : Syntax error on line 16 of /usr/local/apache/conf/modules.conf: Cannot load /usr/local/apache/libexec/mod_negotiation.so into server: ld.so.1: ../bin/httpd: fatal: relocation error: file /usr/local/apache/libexec/mod_negotiation.so: symbol __floatdisf: referenced symbol not found -- - Wayne Pascoe | Why did I flip? I got tired of coming up [EMAIL PROTECTED] | with last minute desparate solutions to http://www.molemanarmy.com | impossible problems created by other fucking | people. - Flightest on k5 |
Re: Problems installing on Solaris 8
Ged Haywood [EMAIL PROTECTED] writes: if I compile Apache with mod_perl, then mod_auth_db, mod_proxy and mod_negotiation all stop working. If I compile Apache without mod_perl then they continue to work just fine. Something very wrong there. Do you have squeaky clean source trees? I'd be tempted to erase the lot and start again. What's the compiler? Post your httpd.conf? Have you built other (older) versions of Apache and mod_perl on the same OS? Yep, whacked the whole lot and started from scratch. The problem also appears to happen with apache 1.3.23 as well. :( -- - Wayne Pascoe | Intestines inside [EMAIL PROTECTED] | http://www.molemanarmy.com |
Re: Apache::args vs Apache::Request speed
mark warren bracher wrote: I didn't ever actually see a post with newer numbers, so here goes.. I tested the same 50 clients/5000 requests as stas' test in the guide. one pass with 2 uri params; another with 26. naturally I ran it all on a server big (and quiescent) enough to handle the 50 concurrent requests. I left out CGI since we already know it is slow. /test/params and /test/args are mod_perl handlers (I don't use Apache::Registry for anything) ParamsTest and ArgsTest respectively. the code for both handlers and the relevant pieces of ab output are pasted in below. - name query_length | avtime completed failedrps - apache_args 25 | 33.77 5000 0 1481 apache_request 25 | 33.17 5000 0 1507 apache_args 337 | 43.51 5000 0 1141 apache_request 337 | 45.31 5000 0 1103 -- Non-varying sub-test parameters: -- concurrency : 50 connections : 5000 so $apr-param is marginally faster than $r-args for the shorter query, marginally slower for the longer one. I think this may be because we can return the full hash $r-args whereas we need to map over $apr-param to get a hash (so param gets called three times for the short query, 27 times for the larger one). still, much closer numbers than the former test... Thanks Mark for pushing me to rerun the benchmark :) Actually from the tests that I just run Apache::Request::param is actually kicks $r-args on long inputs, and a bit faster on the short query strings. Even though as you have noticed we call $q-param() 2 x keys times more for each request. Here are the results: concurrency connections name query_length | avtime completed failedrps 505000 apache_request_param 25 | 53 5000 0900 502000 apache_request_param 25 | 54 2000 0884 505000 r_args 25 | 55 5000 0879 502000 apache_request_param 105 | 54 2000 0879 105000 apache_request_param 25 | 10 5000 0878 505000 r_args105 | 55 5000 0876 102000 r_args105 | 10 2000 0869 505000 apache_request_param 105 | 56 5000 0865 105000 apache_request_param 105 | 10 5000 0855 105000 r_args 25 | 11 5000 0850 102000 apache_request_param 105 | 11 2000 0836 102000 r_args 25 | 11 2000 0835 102000 apache_request_param 25 | 11 2000 0832 502000 r_args 25 | 58 2000 0827 105000 r_args105 | 11 5000 0810 505000 apache_request_param 207 | 64 5000 0754 502000 apache_request_param 337 | 64 2000 0750 102000 apache_request_param 207 | 12 2000 0749 102000 apache_request_param 337 | 12 2000 0749 502000 apache_request_param 207 | 64 2000 0749 105000 apache_request_param 207 | 12 5000 0746 502000 r_args105 | 64 2000 0744 105000 apache_request_param 337 | 12 5000 0732 505000 r_args207 | 72 5000 0671 102000 r_args337 | 14 2000 0665 105000 r_args207 | 14 5000 0661 502000 r_args337 | 73 2000 0660 102000 r_args207 | 14 2000 0657 505000 apache_request_param 337 | 74 5000 0647 502000 r_args207 | 75 2000 0645 10
Re: Problems installing on Solaris 8
Angel R. Rivera [EMAIL PROTECTED] writes: Sorry to come in late into this. I had the same problems and spent a while getting it all to build right. I am running on an Ultra class machine with all my web stuff in /web/appl (automount point) so that should be the only changes you need to worrry about. then build mod_perl perl Makefile.PL \ USE_DSO=1 \ USE_APXS=1 \ WITH_APXS=/web/appl/apache/bin/apxs \ PERL_USELARGEFILES=0 \ EVERYTHING=1 I built it DSO. I was hoping to get away with it compiled in as static. I've heard fearful tales of memory leaks and other problems when using it as a DSO. Are these still present ? -- - Wayne Pascoe | Be nice to your daemons. [EMAIL PROTECTED] | http://www.molemanarmy.com |
mod_perl on Mac OSX?
Can anyone help point me in the right direction for installing mod_perl for Apache on Mac OSX? Thank you, Virgory Celestin
Re: Problems installing on Solaris 8
Hi there, On 23 Mar 2002, Wayne Pascoe wrote: Angel R. Rivera [EMAIL PROTECTED] writes: Sorry to come in late into this. I had the same problems and spent a while getting it all to build right. I am running on an Ultra class [snip] I built it DSO. I was hoping to get away with it compiled in as static. I've heard fearful tales of memory leaks and other problems when using it as a DSO. Are these still present ? Argh. :) 73, Ged. -- From [EMAIL PROTECTED] Mon Mar 25 10:42:35 2002 Date: Sat, 23 Mar 2002 08:24:16 + (GMT) From: Ged Haywood [EMAIL PROTECTED] To: Wayne Pascoe [EMAIL PROTECTED] Cc: mod_perl Mailing List [EMAIL PROTECTED] Subject: Re: Problems installing on Solaris 8 Hi there, On 23 Mar 2002, Wayne Pascoe wrote: Why does mod_perl need ssl and crypto ? Just curious... It doesn't. Have you tried sompiling static instead of DSO? There have been DSO problems on Solaris (and elsewhere :) in the past but I thought they were mostly put to bed now. 73, Ged.
Re: mod_perl on Mac OSX?
On Sun, 24 Mar 2002 [EMAIL PROTECTED] wrote: Can anyone help point me in the right direction for installing mod_perl for Apache on Mac OSX? Try searching the archives, a list of them appears on the mod_perl home page at http://perl.apache.org. I found this one... [EMAIL PROTECTED]">http://mathforum.org/epigone/modperl/fermkhiwhand/[EMAIL PROTECTED] But be preapared for at least some pain. ( I've never done it :). 73, Ged.
how to identify an interrupted downloads?
I would like to know whether in the server side one can figure out if a user has completed the download of a known file. Would bytes_sent() give the actual number of bytes sent if the download gets interrumpted by the client? Would yo know a better approach if not? -- fxn
Re: 'Pinning' the root apache process in memory with mlockall
Ed Grimm wrote: Danger: Rant ahead. Proceed with caution. [my summary of mlocks discussion removed] In the discussion you referred to, all of the people saying this was a bad idea were using terms like, I think. None of them had the situation themselves, so have a difficult time coming to terms with it. None of them had related former experience using this. Something like this really needs to be tested by someone who has the issue, and has the ability to do benchmarks with real data streams. If they find it seems to work well, then they should test it on production systems. Anyone else talking about it is simply that much hot air, myself included. (I *could* test it, but I don't have enough of a problem to put a priority on it. If we were waiting for me to get time, we'd be waiting a long time.) Right, therefore until someone comes up with real numbers and real testing this is all words. I've summarized the discussions here and at the httpd-dev lists. I've never used mlock() and friends myself, so I can only rely on other users' experiences. I cannot do the testing myself now, too many things on my plate already. If you think my summary is not so good (which is definitely can be) you are welcome to improve it. If someone can do the real testing and share the results with the list, everybody will benefit. [the rest of the interesting rant removed] __ 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: how to identify an interrupted downloads?
F.Xavier Noria wrote: I would like to know whether in the server side one can figure out if a user has completed the download of a known file. Would bytes_sent() give the actual number of bytes sent if the download gets interrumpted by the client? Would yo know a better approach if not? -- fxn If you send the file in chunks, I suppose you can use $c-aborted every so often to check... Even if not, you can still use $c-aborted at the end to check if the connection's still there. That ought to tell you, although I'm not sure if that it's a fail-saif solution... Issac
Re: 'Pinning' the root apache process in memory with mlockall
Bill Marrs wrote: At 10:53 PM 3/22/2002, Stas Bekman wrote: top and libgtop use the same source of information, so it has nothing to do with these tools. 'top' has the ability to display SWAP on a per-process basis (you have to change the defaults to see it, but it's there). yeah, that's a cool feature! I didn't find this per-process SWAP value in Gtop.pm anywhere. If GTop.pm had it, I could fix GTopLimit's bug. GTop.pm is a Perl glue to the libgtop Gnome C library. If somebody adds the SWAP/process feature this will be available in the GTop.pm. Any takers? __ 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
[OT] Replacing reverse squid with mod_proxy
We are currently using squid set up as a reverse proxy to accelerate several heavy backends (mod_perl, etc) and to protect them from slow client connections. I am looking into replacing the squid with apache+mod_proxy. Why? Because ultimately I'd like to be able to cluster the frontend using mod_backhand + wackamole. The primary reason for clustering isn't for load-balancing (yet) but for failover handling. So, ideally, one machine should be enough to serve the whole server load. Speaking of load, the squid (2.3.STABLE1) is currently doing up to 80 requests per second at a cache hit ratio of around 72%. This is on one box, a Dual 500MHz Pentium III with 1GB RAM. Average object size is 6KB. 200/304 ratio is around 5/3. Now, I've tried to replace the squid with apache+mod_proxy (1.3.11) and the frontend very quickly came to a standstill. I set MaxClients to 256 but all slots filled up fast. I upped MaxClients to 512 (recompiled with patched httpd.h) but the result was the same. All slots were occupied in no time and the server ground to a halt. Now I'm left with two choices: give up or try harder :-) Before I decide for one of them I thought I'd ask on the lists (sorry for the x-post) to see if the above numbers (80 Hits/Second) are in fact feasible with apache/mod_proxy on one box. Are there any benchmarks around? Does someone have a similar setup and how many requests can they serve? Should I up MaxClients any further? Will I get better results using a newer version of apache? Or should I give up and stick with squid? TIA for your input.
Re: Apache::DBI or What ?
Ed Grimm wrote: First, I'll suggest that there are hopefully other areas you can look at optimizing that will get you a bigger bang for your time - in my test environment (old hardware), it takes 7.4 ms per disconnect/reconnect/rebind and 4.8 ms per rebind. Admittedly, I'm dealing with LDAP instead of SQL, and I've no idea how they compare. Connecting to Oracle can take 30 seconds on a busy system. It doesn't usually take that long, but it often takes a second or two. It is a very important optimization to hold the connection. Postgres may not be as bad, but it's common for SQL systems to have slow connection times. There are databases that allow you to change the current user without reconnecting. In fact someone posted a module to do this a while back, but I can't remember which database it was for. Seems like it was Sybase or Informix. - Perrin
RE: Asia To USA Shipping Rates
Not to beat a dead horse...but we all can have an impact on these guys. Write a VERY pointed email explaining your position as a web developer. If you do contracting work, convince the company that you _will_ never use their product, nor suggest it to any of your *many* customers. . .and will further go to any pains to direct traffic to their competitors. Period. we are the ones with the power. . .we are the GEEKS! And the NERDS! I mean those two words in the best of light, with the greatest of respect and pride. :D Cheers, Ward : -Original Message- : From: Ask Bjoern Hansen [mailto:[EMAIL PROTECTED]] : Sent: Saturday, March 23, 2002 2:14 AM : To: Geoffrey Young : Cc: [EMAIL PROTECTED] : Subject: Re: Asia To USA Shipping Rates : : : On Mon, 18 Mar 2002, Geoffrey Young wrote: : : [EMAIL PROTECTED] wrote: : :We have a full collection of wholesale freight rate : calculators at : : Aaaahhh!! Ask, anybody, make it stop!!! : : Wow. The lusers had actually subscribed that address to : be able to : post. : : I'll do what I can to make it stop. : : - ask :
RE: Asia To USA Shipping Rates
On Mon, 2002-03-25 at 16:48, Vuillemot, Ward W wrote: Not to beat a dead horse...but we all can have an impact on these guys. Write a VERY pointed email explaining your position as a web developer. If you do contracting work, convince the company that you _will_ never use their product, nor suggest it to any of your *many* customers. . .and will further go to any pains to direct traffic to their competitors. Period. we are the ones with the power. . .we are the GEEKS! And the NERDS! I mean those two words in the best of light, with the greatest of respect and pride. :D i'd say that boeing will boycot their freight on any planes they make ;-) Maarten Cheers, Ward : -Original Message- : From: Ask Bjoern Hansen [mailto:[EMAIL PROTECTED]] : Sent: Saturday, March 23, 2002 2:14 AM : To: Geoffrey Young : Cc: [EMAIL PROTECTED] : Subject: Re: Asia To USA Shipping Rates : : : On Mon, 18 Mar 2002, Geoffrey Young wrote: : : [EMAIL PROTECTED] wrote: : :We have a full collection of wholesale freight rate : calculators at : : Aaaahhh!! Ask, anybody, make it stop!!! : : Wow. The lusers had actually subscribed that address to : be able to : post. : : I'll do what I can to make it stop. : : - ask :
Re: Be carefull with apache 1.3.24
Does anyone know how I can put my ProxyIOBufferSize config line in a conditional that'll keep it from blowing up if I'm using a version of apache earlier than 1.3.24? -John
Re: Be carefull with apache 1.3.24
John Siracusa [EMAIL PROTECTED] on Mar 25, 2002: Does anyone know how I can put my ProxyIOBufferSize config line in a conditional that'll keep it from blowing up if I'm using a version of apache earlier than 1.3.24? You could use IfDefine but that would mean that the command that starts apache needs to be aware of which version you are using and modifying startup params accordingly. See http://httpd.apache.org/docs/mod/core.html#ifdefine
Re: Berkeley DB 4.0.14 not releasing lockers under mod_perl
On Thu, Mar 21, 2002 at 02:01:49PM -0500, Michael Alan Dorman wrote: Perrin Harkins [EMAIL PROTECTED] writes: This sort of begs the question: why not use DB 3.x? Is there some new feature you need in DB 4? Anecdotaly, I believe the OpenLDAP and Cyrus projects have both found DB4 to be more reliable under load than DB3. To add to the anecdotes... We have been using the predecessor of Sendmail, Inc's SAMS product (ultimately derived from Cyrus, I believe) and have seen some problems with locking and sleepycat db's resulting in hanging IMAP servers or database corruption. I would not blame mod_perl first -- it's not responsible for the database. I'm not certain that the problem is in the IMAP server either -- but the environment consists of the IMAP server, POP server, tcl scripts, and web interface all trying to access a sleepycat database. Sendmail, Inc. has mentioned (I believe privately) that they feel the problems have been resolved in the newer versions of the sleepycat db. I'm not trying to put words in their mouth, so I could be mistaken, but this is afaik. Before blaming mod_perl, I would run the server with the -X option to make sure the script is only being called once within the mod_perl environment (just being paranoid). Multiple (almost) simultaneous invocations might be causing some of the locking problems. They wouldn't show up then when being run from the command line. my $0.02 --jim
Re: Be carefull with apache 1.3.24
At 11:14 AM -0500 3/25/02, John Siracusa wrote: Does anyone know how I can put my ProxyIOBufferSize config line in a conditional that'll keep it from blowing up if I'm using a version of apache earlier than 1.3.24? -John In /path/to/apache1.3.24/bin/apachectl add a -DAPACHE_1_3_24 to the httpd command. In your httpd.conf add IfDefined APACHE_1_3_24 ProxyIOBufferSize 10 /IfDefined I think that should work Rob -- When I used a Mac, they laughed because I had no command prompt. When I used Linux, they laughed because I had no GUI.
Re: Be carefull with apache 1.3.24
In /path/to/apache1.3.24/bin/apachectl add a -DAPACHE_1_3_24 to the httpd command. In your httpd.conf add IfDefined APACHE_1_3_24 ProxyIOBufferSize 10 /IfDefined I think that should work you could also do something hackish like this to avoid command line switches Perl my ($version) = Apache::Constants::SERVER_VERSION =~ m/(\d{2})/; $ProxyIOBufferSize = 1 if $version = 24 /Perl good luck ---Geoff
usubscribe
Hi everyone, I would like to unsubscribe to this list, but I don't know the adresse to which I must send the unsubscribe mail. Pls. help Xaver Sticart Mannheimer Str.1 76334 Leopoldshafen Tel 07247 20176 Tel 07247 963991 [EMAIL PROTECTED]
Re: AddModule mod_perl.c
At 00:47 25.03.2002, John Kolvereid wrote: 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. Check your error log. It might have interesting information in it. 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 Lots of modules you're loading there. I've heard problems with combining PHP and mod_perl before, I don't know if it's fixed now, but maybe you should try with only mod_perl loaded to see if that fixes your problem: if it does, it's not mod_perl's fault. Ifmodule mod_perl.c Include conf/mod_perl.conf /Ifmodule Perl /Perl ClearModuleList #AddModule mod_perl.c Maybe this should go before the Ifmodule directive.. I'm not sure if it'll change anything. mod_perl.conf - conf/mod_perl.pl ?? I think you either forgot to copy something off there or but .pl instead of .conf? PerlFreshRestart On Location /hello/world SetHandler perl-script PerlHandler Apache::Hello /Location You need PerlModule Apache::Hello before PerlHandler Apache::Hello, otherwise Apache::Hello doesn't get loaded. Alias /perl/ /home/httpd/perl/ PerlModule Apache::Registry Location /perl SetHandler perl-script PerlHandler Apache::Registry PerlSendHeader On Options ExecCGI /Location This looks good. /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. I don't understand what you mean by /odin... You mean you're typing http://odin/perl/... in your browser, or something? Maybe you should check your error log, if something's wrong it might have an indication. -- Per Einar Ellefsen [EMAIL PROTECTED]
Re: usubscribe
ras wrote: Hi everyone, I would like to unsubscribe to this list, but I don't know the adresse to which I must send the unsubscribe mail. http://perl.apache.org/#users-list __ 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: [OT] Replacing reverse squid with mod_proxy
- Original Message - From: Hans Juergen von Lengerke [EMAIL PROTECTED] Date: Monday, March 25, 2002 4:20 pm Subject: [OT] Replacing reverse squid with mod_proxy Now I'm left with two choices: give up or try harder :-) Before I decide for one of them I thought I'd ask on the lists (sorry for the x-post) to see if the above numbers (80 Hits/Second) are in fact feasible with apache/mod_proxy on one box. Are there any benchmarks around? Does someone have a similar setup and how many requests can they serve? Should I up MaxClients any further? Will I get better results using a newer version of apache? Or should I give up and stick with squid? before giving up you should try 1.3.24 out of March 21 with a re-worked code for mod_proxy; regarding benchmarks I remember a comparison with the tux kernel server, iis5 and apache and more than 500 hits/sec for the last two was beaten by tux with a factor 3. Should be enough for your purpose _ ___ | | IrmundThum | |
Re: [OT] Replacing reverse squid with mod_proxy
[Cross-posting to multiple mailing lists is dangerous (and a little annoying) because people responding will usually not be members of all the lists, and will therefore have to deal with bounces.] On Mon, 25 Mar 2002, Hans Juergen von Lengerke wrote: Now, I've tried to replace the squid with apache+mod_proxy (1.3.11) and Why are you setting up a new service with an ancient version of apache? mod_proxy has improved immensly since then. Use 1.3.24. Joshua.
Re: Be carefull with apache 1.3.24
On 3/25/02 11:39 AM, Geoffrey Young wrote: In /path/to/apache1.3.24/bin/apachectl add a -DAPACHE_1_3_24 to the httpd command. In your httpd.conf add IfDefined APACHE_1_3_24 ProxyIOBufferSize 10 /IfDefined I think that should work you could also do something hackish like this to avoid command line switches Perl my ($version) = Apache::Constants::SERVER_VERSION =~ m/(\d{2})/; $ProxyIOBufferSize = 1 if $version = 24 /Perl I don't want to use defines if I can help it, and it's a proxy server without mod_perl, so the Perl section is out. Hm, you'd think apache would have a directive for this, especially since it pukes when it sees unknown conf directives. Maybe I'll go nag the apache devs... :) -John
Re: Permission conflict between mod_cgi and mod_perl
Jim == Jim Smith [EMAIL PROTECTED] writes: Jim On Mon, Mar 18, 2002 at 02:02:38PM -0800, James Lum wrote: 1. use suid perl and set the owner as root ... but i do not know if you can run a suid perl program under modperl. (anyone? will this work?) Jim Should be able to -- mod_perl can run other scripts. mod_perl doesn't run scripts. mod_perl hooks handlers to various stages of Apache processing using an embedded Perl interpreter. One of the modules shipped with mod_perl is called Apache::Registry, which can transform something that looks a lot like a CGI script using CGI.pm into a giant subroutine that then gets hooked as the handler for a particular URL. This is never running the script. It's unfortunate that it's *usually* so transparent, because when it doesn't work, it looks like something is broken. :) Thus, the answer is no - mod_perl cannot run a setuid perl program, unless you mean by forking via fork or system or backticks, which defeats the whole point of mod_perl handlers. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Re: [OT] Replacing reverse squid with mod_proxy
Hi there, On Mon, 25 Mar 2002, Hans Juergen von Lengerke wrote: I am looking into replacing the squid with apache+mod_proxy. I don't know if it will do what you need, but you might want to have a look at mod_accel. If this URI is broken mail dapiatmaildotru for the information. http://dapi.chaz.ru/articles/mod_accel.xml?lang=en 73, Ged.
Re: mod_perl on Mac OSX?
Check out this thread on the MacOS X Perl mailing list -- http:[EMAIL PROTECTED]/index.html#01539 There were issues with using Apache::Request and Apache::Cookie together on OS X, and there are some patches now that address the problems. You should find the build instructions found in that thread helpful. -Dave -- David Ranney Senior Web Applications Developer e-Perception, Inc. (909) 587-8773 On 3/24/02 8:31 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Can anyone help point me in the right direction for installing mod_perl for Apache on Mac OSX? Thank you, Virgory Celestin
Apache::Session
Has anyone ran into issues with data being written to the data source using Apache::Session::Store::DB_File and Apache::Session::Lock::File? We are running into a unique instance where a value is not being saved to the session store at a certain point through a workflow. There are multiple frames which are making requests but only one frame makes the request to the server which runs code to write to the Session store. We do have KeepAlive's enabled so I don't think there should be any contention issues when attempting to write to the store. Nevertheless this still seems like the only reason this might be happening. Apache 1.3.22 mod_perl 1.26 Apache::Session 1.54 Thanks,
Re: Performace...
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 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. The mathforum link above points to more recent results which includes an h2000 test which is a more complex 3K+ script producing 20K+ in output. You will see in those results Embperl getting near the same performance as PHP. I would agree, the normal hello world test does not go far to measure the runtime characteristics of web application environment. To this end I would like to do things like database benchmarks scripts too for the various environments, but it will be a long time in coming as it is a lot of work to set up these tests. You can get the latest benchmarks at http://www.chamas.com/bench/hello.tar.gz The results posted at chamas.com/bench are older which were compiled from various system from various people at various times, and have not been updated in quite some time (my bad). The downloadable benchmarks are ones that you can run yourself which generally produces the most relevant results. --Josh _ Joshua Chamas Chamas Enterprises Inc. NodeWorks Founder Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
activating multimedia files in cgi-bin
Hi. I have a short question about perl and apache httpd server. Where can I activate that multimedia files like gifs and jpgs run under my cgi-bin dir ? Thanks a lot Daniel Jonda attachment: winmail.dat
Re: activating multimedia files in cgi-bin
On Tue, Mar 26, 2002 at 01:45:13AM +0100, Daniel Jonda wrote: Hi. I have a short question about perl and apache httpd server. Where can I activate that multimedia files like gifs and jpgs run under my cgi-bin dir ? GIFs, JPGs, etc, don't *run*. They're not executable code. They can be served, as a simple stream of bytes, with the headers informing of the type. But they aren't run, and you shouldn't put them in you cgi-bin dir. Put them any place else, it doesn't matter as long as the webserver is configured to serve them and has permissions to read them. Regards, Luciano Rocha -- Luciano Rocha, [EMAIL PROTECTED] The trouble with computers is that they do what you tell them, not what you want. -- D. Cohen
AW: activating multimedia files in cgi-bin
Thanks for your fast answer. I don't want to run them. I want to display them on my website My problem is : I have an image gallery, which is configured to have the images folders under the cgi-bin. And it isn`t possible to see them on my website. http://www.flyerfabrik.de/cgi-bin/gallery/gallery.cgi Where can I change the configuration of perl to show these mm-files on my website ? Thanks Daniel -Ursprungliche Nachricht- Von: Luciano Miguel Ferreira Rocha [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 26. Marz 2002 01:58 An: Daniel Jonda Cc: [EMAIL PROTECTED] Betreff: Re: activating multimedia files in cgi-bin On Tue, Mar 26, 2002 at 01:45:13AM +0100, Daniel Jonda wrote: Hi. I have a short question about perl and apache httpd server. Where can I activate that multimedia files like gifs and jpgs run under my cgi-bin dir ? GIFs, JPGs, etc, don't *run*. They're not executable code. They can be served, as a simple stream of bytes, with the headers informing of the type. But they aren't run, and you shouldn't put them in you cgi-bin dir. Put them any place else, it doesn't matter as long as the webserver is configured to serve them and has permissions to read them. Regards, Luciano Rocha -- Luciano Rocha, [EMAIL PROTECTED] The trouble with computers is that they do what you tell them, not what you want. -- D. Cohen
Re: Permission conflict between mod_cgi and mod_perl
On Mon, Mar 25, 2002 at 10:44:10AM -0800, Randal L. Schwartz wrote: Jim == Jim Smith [EMAIL PROTECTED] writes: Jim On Mon, Mar 18, 2002 at 02:02:38PM -0800, James Lum wrote: 1. use suid perl and set the owner as root ... but i do not know if you can run a suid perl program under modperl. (anyone? will this work?) Jim Should be able to -- mod_perl can run other scripts. mod_perl doesn't run scripts. mod_perl hooks handlers to various stages of Apache processing using an embedded Perl interpreter. Basically, mod_perl can run scripts in the same manner as any other unix program. mod_perl is just an extension to Apache. I was not in any way implying that mod_perl forked to run Perl code. I was saying that mod_perl can fork if it is asked to. --jim
Re: Permission conflict between mod_cgi and mod_perl
Jim == Jim Smith [EMAIL PROTECTED] writes: Jim Basically, mod_perl can run scripts in the same manner as any other Jim unix program. Maybe we're getting hung up on details, but mod_perl is not a unix program. It's a module for Apache. Therefore, in the same manner is no longer applicable. mod_cgi forks to run processes. mod_perl doesn't fork. mod_perl can run Perl code via the embedded Perl interpreter, and this interpreter can cause a fork. But mod_perl doesn't inherently fork at all. And the distinction is important, especially in the context of this discussion (setuid with mod_perl). -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Re: AW: activating multimedia files in cgi-bin
On Tue, Mar 26, 2002 at 02:12:52AM +0100, Daniel Jonda wrote: Thanks for your fast answer. I don't want to run them. I want to display them on my website Oh, ok. My problem is : I have an image gallery, which is configured to have the images folders under the cgi-bin. And it isn`t possible to see them on my website. http://www.flyerfabrik.de/cgi-bin/gallery/gallery.cgi Your script runs fine, so it doesn't seem to be a perl problem. I think it might be a configuration problem of the script it self, it may be looking for images on /var/www/cgi-bin/gallery/something instead of /usr/local/apache/cgi-bin/gallery or the other way around. Check the source for any reference to the image directory and change it as appropriate. Where can I change the configuration of perl to show these mm-files on my website ? Well, Apache doesn't serve normal files in the cgi-bin directory, he trys to run them. But the script you use doesn't refer to the image file, but it serves the image by itself (or so I think by the little I have seen). The main problem seems to be that the script doesn't find the files, it lists no image in any category. So your problem may be the first I told about, or it may be that the image directory doesn't have the appropriate permissions for the script to read it and files within it. Make sure the directory has permissions for execution and reading by the user that apache runs as (normally nobody or apache) and permissions for reading by that same user. You could just find /dir -type d -exec chmod 0755 {} \; find /dir -type f -exec chmod 0644 {} \; Regards, Luciano Rocha
Re: AddModule mod_perl.c
Hi Per, --- Per Einar Ellefsen [EMAIL PROTECTED] wrote: At 00:47 25.03.2002, John Kolvereid wrote: 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. Check your error log. It might have interesting information in it. When I get this msg the error log has the msg: [notice] child pid # exit signal Segmentation fault (11) 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 Lots of modules you're loading there. I've heard problems with combining PHP and mod_perl before, I don't know if it's fixed now, but maybe you should try with only mod_perl loaded to see if that fixes your problem: if it does, it's not mod_perl's fault. I commented out the PHP Load Add Modules Upon initialization I got the error log msg: [notice] Accept mytex: sysvsem (Default: sysvsem) and when I tried to load my home page from the browser I got the same error as before Ifmodule mod_perl.c Include conf/mod_perl.conf /Ifmodule Perl /Perl ClearModuleList #AddModule mod_perl.c Maybe this should go before the Ifmodule directive.. I'm not sure if it'll change anything. Not really, except when I commented out the AddModule mod_perl.c it complained of an 'Invalid command 'Perl' mod_perl.conf - conf/mod_perl.pl ?? I think you either forgot to copy something off there or but .pl instead of .conf? The missing line is PerlRequire conf/mod_perl.pl Sorry about that. PerlFreshRestart On Location /hello/world SetHandler perl-script PerlHandler Apache::Hello /Location You need PerlModule Apache::Hello before PerlHandler Apache::Hello, otherwise Apache::Hello doesn't get loaded. I don't understand what you mean here. Do I have to reference the file I will be trying to load from the browser. I assume it is just like Perl-CGI in the cgi-bin directory. Just add a file and address it. Alias /perl/ /home/httpd/perl/ PerlModule Apache::Registry Location /perl SetHandler perl-script PerlHandler Apache::Registry PerlSendHeader On Options ExecCGI /Location This looks good. /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. I don't understand what you mean by /odin... You mean you're typing http://odin/perl/... in your browser, or something? Odin is the reference, as in the host file, for my server = or.odin.com Maybe you should check your error log, if something's wrong it might have an indication. -- Per Einar Ellefsen [EMAIL PROTECTED] Any further insight would be greatly appreciated. I am at a loss - obviously. Thanks. John Kolvereid __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/
Re: Permission conflict between mod_cgi and mod_perl
[EMAIL PROTECTED] (Randal L. Schwartz) wrote: Jim == Jim Smith [EMAIL PROTECTED] writes: Jim Basically, mod_perl can run scripts in the same manner as any other Jim unix program. Maybe we're getting hung up on details, but mod_perl is not a unix program. It's a module for Apache. Therefore, in the same manner is no longer applicable. mod_cgi forks to run processes. mod_perl doesn't fork. mod_perl can run Perl code via the embedded Perl interpreter, and this interpreter can cause a fork. But mod_perl doesn't inherently fork at all. And the distinction is important, especially in the context of this discussion (setuid with mod_perl). And the sky isn't blue, but the results are the same. mod_perl can't run scripts. Scripts can be run from mod_perl. More than that, set-uid scripts can be run from mod_perl and offer one of the better ways of doing things that require root privileges. -- James Smith [EMAIL PROTECTED], 979-862-3725 Texas AM CIS Operating Systems Group, Unix
Re: Permission conflict between mod_cgi and mod_perl
At 3:17 PM -0600 3/25/02, James G Smith wrote: And the sky isn't blue, but the results are the same. mod_perl can't run scripts. Scripts can be run from mod_perl. More than that, set-uid scripts can be run from mod_perl and offer one of the better ways of doing things that require root privileges. Oh how I hate to interrupt a good flame war, especially one that Randal is involved in, but wouldn't it be possible to run apache (with mod perl) as set-uid but listening only on 127.0.0.1:81. They just establish a proxy connection to the backend setuid apache? Rob -- When I used a Mac, they laughed because I had no command prompt. When I used Linux, they laughed because I had no GUI.
Re: Permission conflict between mod_cgi and mod_perl
On Mon, 25 Mar 2002 15:17:06 -0600, James G Smith [EMAIL PROTECTED] said: JS And the sky isn't blue, but the results are the same. JS mod_perl can't run scripts. JS Scripts can be run from mod_perl. JS More than that, set-uid scripts can be run from mod_perl and offer JS one of the better ways of doing things that require root privileges. Results are not same. Basically Apache::Registry (handler used with mod_perl to emulate execution of scripts) just opens file which contains script, evals it as big subroutine and calls that subroutine. Opening and reading set-uid file which contains script doesn't give automagically root rights to instance of apache process which handles request. -- oIlya Martynov = http://martynov.org/o oTIV.net = http://tiv.net/ o
Re: Permission conflict between mod_cgi and mod_perl
Ilya Martynov [EMAIL PROTECTED] wrote: On Mon, 25 Mar 2002 15:17:06 -0600, James G Smith [EMAIL PROTECTED] said: JS And the sky isn't blue, but the results are the same. JS mod_perl can't run scripts. JS Scripts can be run from mod_perl. JS More than that, set-uid scripts can be run from mod_perl and offer JS one of the better ways of doing things that require root privileges. Results are not same. Basically Apache::Registry (handler used with mod_perl to emulate execution of scripts) just opens file which contains script, evals it as big subroutine and calls that subroutine. Opening and reading set-uid file which contains script doesn't give automagically root rights to instance of apache process which handles request. I never said anything about Apache::Registry. If you are using a Perl interpreter with mod_perl, then you can fork and run a suid script. That's what I'm trying to say. Nothing more, nothing less. End of story. Even the Eagle book speaks of running scripts (though in the context of Apache::Registry), so using that terminology is not original with me. I was trying to talk about something in a manner that might be somewhat understandable, but people started pointing out the trees and ignoring the forest. I will say no more on this subject. -- James Smith [EMAIL PROTECTED], 979-862-3725 Texas AM CIS Operating Systems Group, Unix
Re: Permission conflict between mod_cgi and mod_perl
Folks, 1st, I want to thank you all for your responses and clarifications about 'suid perl' and 'mod_perl' and the way they work together. It is kinda like I suspected. :( 2nd, I should have worded my real question a little differently. Basically, it is: How can I get perl code, invoked by the Apache web server, to: 1. create/write/read files that have the ownership of the owner of the perl code. (Apache suexec) 2. execute with the best performance. (mod_perl) Since Apache suexec and mod_perl do not work together, my alternatives are: 1. - Configure Apache WITHOUT suexec and WITH mod_perl. - Invoke 'suid perl' for the perl program. - Have the 'suid perl' program be owned by a non-root userid which is the owner of the program. - Convert the 'suid perl' program to meet mod_perl requirements. OR 2. - Run a separate Apache web server that supports only a single domain or userid. - Run the separate Apache web server with a userid that is the same as the owner of the perl script. - Configure the separate Apache server WITH mod_perl and WITHOUT suexec. (suexec is not needed) - mod_perl the perl program. OR 3. - Lobby to get Apache suexec and mod_perl to work together. OR 4. - Which choice gives me the best of all worlds? the world in which: - a user's cgi program can create/write files that are owned by the owner of the cgi program - and has the performance of compiled code - and does not complicate or slow down the web server - and does not use too much of the system resources - and is not overly complicated for the programmer - and is not overly complicated for the web admin I don't want much ... do I ;=) jim Randal L. Schwartz wrote: Jim == Jim Smith [EMAIL PROTECTED] writes: Jim Basically, mod_perl can run scripts in the same manner as any other Jim unix program. Maybe we're getting hung up on details, but mod_perl is not a unix program. It's a module for Apache. Therefore, in the same manner is no longer applicable. mod_cgi forks to run processes. mod_perl doesn't fork. mod_perl can run Perl code via the embedded Perl interpreter, and this interpreter can cause a fork. But mod_perl doesn't inherently fork at all. And the distinction is important, especially in the context of this discussion (setuid with mod_perl). -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Re: Permission conflict between mod_cgi and mod_perl
James Lum wrote: Folks, 1st, I want to thank you all for your responses and clarifications about 'suid perl' and 'mod_perl' and the way they work together. It is kinda like I suspected. :( Also refer to http://perl.apache.org/guide/multiuser.html#ISPs_providing_mod_perl_services -- __ 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
John Kolvereid wrote: Hi Per, --- Per Einar Ellefsen [EMAIL PROTECTED] wrote: At 00:47 25.03.2002, John Kolvereid wrote: 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. Check your error log. It might have interesting information in it. When I get this msg the error log has the msg: [notice] child pid # exit signal Segmentation fault (11) See the SUPPORT file in the mod_perl source distro to figure out what to do next. -- __ 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: Asia To USA Shipping Rates
Vuillemot, Ward W wrote: Not to beat a dead horse...but we all can have an impact on these guys. Write a VERY pointed email explaining your position as a web developer. If you do contracting work, convince the company that you _will_ never use their product, nor suggest it to any of your *many* customers. . .and will further go to any pains to direct traffic to their competitors. Period. yeah and then they'll sell our addresses, earn a small amount of money and fill our inboxes with spam. do you send mail to 'reply to this address if you wanna be removed too'? ;) /Jon we are the ones with the power. . .we are the GEEKS! And the NERDS! I mean those two words in the best of light, with the greatest of respect and pride. :D Cheers, Ward
Re: cvs commit: modperl/t/net/perl util.pl
--On Sunday, March 24, 2002 21:57:54 + [EMAIL PROTECTED] wrote: 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 This is uncool for those of us using a non-ASCII encoding and sending out lots of characters with the 8th bit set, e.g. in a French page many accented characters will be replaced by 6-byte sequences. If I'm sending out Content-type: text/html; charset=ISO-8859-1, and calling escape_html to escape '', '' and the like, I'm going to be serving quite a lot more bytes than before this patch. However escape_html () has no clue as to what the character set is, and whether it has been correctly specified in the Content-Type. It has also be mentionned here that escape_html is only valid for single-byte encodings. So this patch does the right thing to escape the odd 8 bit char in a mostly ASCII output, but users of other charsets should be warned not to use it. I use HTML::Entities::encode($_[0], '') myself. Therefore I propose a doc patch to clear this up: Index: Util.pm === RCS file: /home/cvs/modperl/Util/Util.pm,v retrieving revision 1.8 diff -u -r1.8 Util.pm --- Util.pm 4 Mar 2000 20:55:47 - 1.8 +++ Util.pm 25 Mar 2002 18:19:37 - @@ -68,6 +68,13 @@ my $esc = Apache::Util::escape_html($html); +This function is unaware of its argument's character set and encoding. +It assumes a single-byte encoding and escapes all characters with the +8th bit set. Do not use it with multi-byte encodings such as utf8. +When using a single byte non-ASCII encoding such as ISO-8859-1, +consider specifying the character set in the Content-Type header, +and using HTML::Entities to avoid unnecessary escaping. + =item escape_uri This function replaces all unsafe characters in the $string with their -- Eric Cholet
Re: cvs commit: modperl/t/net/perl util.pl
i had a bad feeling about this. we should not be implementing escape_html to begin with, the functionality should all be in apache. i'm going to back out the patch. anybody care to make a doc patch to explain the problems with escape_html before the patch went in? thanks.
Re: cvs commit: modperl/t/net/perl util.pl
Doug MacEachern wrote: i had a bad feeling about this. we should not be implementing escape_html to begin with, the functionality should all be in apache. i'm going to back out the patch. sounds wise, especially considering people like Eric will end up with larger pages as a result, while the patch fixes a rather obscure vunerability, for which other solutions (HTML::Entities) are available. anybody care to make a doc patch to explain the problems with escape_html before the patch went in? I nominate robin, since I forget how it came up in the first place :) IIRC is was due to this post http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-03/msg00750.html and specifically an exploit involving browsers incorrectly assuming 0x8b as a and 0x9b as a , thus creating a way around escape_html(). Robin, does that accurately summarize it? it's been far too long for me :) --Geoff
Re: cvs commit: modperl/t/net/perl util.pl
--On Monday, March 25, 2002 10:29:11 -0800 Doug MacEachern [EMAIL PROTECTED] wrote: i had a bad feeling about this. we should not be implementing escape_html to begin with, the functionality should all be in apache. i'm going to back out the patch. anybody care to make a doc patch to explain the problems with escape_html before the patch went in? thanks. I believe the patch is useful though, in cases where the charset is not explicitely specified and there's an odd character with the 8th bit set it will now do the right thing. I guess a lot of US coders would fall in that situation... I suppose it's faster than HTML::Entities (I haven't benchmarked it though). So I suspect the patch will fix more situations than it breaks: if using a single-byte non-ASCII encoding, it doesn't actually break anything, just adds bloat. If using a multi-byte encoding escape_html was broken/inapplicable already. -- Eric Cholet
cvs commit: modperl/t/net/perl util.pl
dougm 02/03/25 10:45:23 Modified:.Changes src/modules/perl Util.xs t/net/perl util.pl Log: backing out change: properly escape highbit chars in Apache::Utils::escape_html Revision ChangesPath 1.639 +0 -4 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.638 retrieving revision 1.639 diff -u -r1.638 -r1.639 --- Changes 25 Mar 2002 02:57:59 - 1.638 +++ Changes 25 Mar 2002 18:45:23 - 1.639 @@ -26,10 +26,6 @@ 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]] - allow $r-auth_name and $r-auth_type to be set on win32 [John Kelly [EMAIL PROTECTED]] 1.11 +1 -8 modperl/src/modules/perl/Util.xs Index: Util.xs === RCS file: /home/cvs/modperl/src/modules/perl/Util.xs,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- Util.xs 24 Mar 2002 21:57:53 - 1.10 +++ Util.xs 25 Mar 2002 18:45:23 - 1.11 @@ -32,9 +32,6 @@ 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; @@ -46,7 +43,7 @@ j += 3; else if (s[i] == '') j += 4; -else if (s[i] == '' || IS_HIGHBIT_CHAR(s[i])) +else if (s[i] == '') j += 5; if (j == 0) @@ -70,10 +67,6 @@ 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.13 +1 -5 modperl/t/net/perl/util.pl Index: util.pl === RCS file: /home/cvs/modperl/t/net/perl/util.pl,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- util.pl 24 Mar 2002 21:57:53 - 1.12 +++ util.pl 25 Mar 2002 18:45:23 - 1.13 @@ -2,7 +2,7 @@ use Apache::test; $|++; my $i = 0; -my $tests = 8; +my $tests = 7; my $r = shift; $r-send_http_header('text/plain'); @@ -61,10 +61,6 @@ /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);