Re: DProf on Mac OS X

2003-07-26 Thread John Siracusa
On 7/26/03 2:01 AM, Ged Haywood wrote: Any way you can try it on a different OS, or even try a different Perl? And before Stas jumps on me *again* for saying that I have no evidence that 5.8.0 is the culprit in this case. It just smells fishy to me. :) My next stop is Linux on x86, but I'd

DProf on Mac OS X

2003-07-25 Thread John Siracusa
Has anyone gotten this to work on OS X? From http://perl.apache.org/docs/1.0/guide/performance.html % setenv PERL5OPT -d:DProf % httpd -X -d `pwd` ... make some requests to the server here ... % kill `cat logs/httpd.pid` % unsetenv PERL5OPT % dprofpp I've used this profiling

Re: ANNOUNCE: Apache::Dynagzip 0.10

2003-07-21 Thread John Siracusa
On 7/20/03 11:12 PM, Slava Bizyayev wrote: Your own content-type is supposed to be overwritten only in case of the use of PerlSetVar UseCGIHeadersFromScript Off in your configuration file. You might wish to comment this line in your configuration file when your script generates correct

Re: ANNOUNCE: Apache::Dynagzip 0.10

2003-07-21 Thread John Siracusa
On 7/21/03 9:47 AM, John Siracusa wrote: On 7/20/03 11:12 PM, Slava Bizyayev wrote: Your own content-type is supposed to be overwritten only in case of the use of PerlSetVar UseCGIHeadersFromScript Off in your configuration file. You might wish to comment this line in your configuration

Re: ANNOUNCE: Apache::Dynagzip 0.10

2003-07-20 Thread John Siracusa
Why does Apache/Dynagzip.pm call $r-content_type('text/html') in several places? My apache module earlier in the Apache::Filter chain sets $r-content_type to something else, but it then gets overridden by Dynagzip.pm. If I comment out all the calls to $r-content_type('text/html') in

Re: the deprecation of Apache-request in mp2

2003-03-24 Thread John Siracusa
On 3/24/03 7:08 PM, Stas Bekman wrote: In the future I can see someone extending Apache::Request to handle CGI.pm's HTML generation in C, so the two could be replace each other. I've always thought that HTML generation does not belong in CGI.pm, so I don't see duplicating that functionality in

Load balancers

2003-01-13 Thread John Siracusa
(This may seem off topic for this list, but I'll try to bring it around before the end of the message :) We've been struggling with load balancers for a while now. My requirements are pretty simple. I have a handful of plain and mod_perl apache servers, some of which are identical and a few of

Re: Load balancers

2003-01-13 Thread John Siracusa
On 1/13/03 11:12 AM, Ask Bjoern Hansen wrote: On Mon, 13 Jan 2003, John Siracusa wrote: So...suggestions? How are other people handling load balancing? With hardware load balancers. :-) Sure, rub it in ;) You forgot to include the information about number of servers, requests per second

Re: Load balancers

2003-01-13 Thread John Siracusa
That's for all the info so far. To answer some questions, hardware is a cost issue right now. It's somewhat scary that $3,200 was a reasonable price several years ago, but I suppose it could be worse. We will investigate further. The mod_rewrite solutions lack dead server detection, and that's

Re: Load balancers

2003-01-13 Thread John Siracusa
On 1/13/03 1:04 PM, Perrin Harkins wrote: John Siracusa wrote: The mod_rewrite solutions lack dead server detection, and that's something I'd rather not try to roll on my own, especially after seeing how well (or not, actually) existing software solutions do. But I've added it to the list

Re: Load balancers

2003-01-13 Thread John Siracusa
On 1/13/03 1:28 PM, Perrin Harkins wrote: John Siracusa wrote: But in a full-fledged mod_perl solution, I could back out gracefully and retry another server if I happened to initially choose a dead server before my dead server detection code caught it. That sounds cool, but how important

Re: Apache::DB and perl 5.80

2002-11-28 Thread John Siracusa
On 11/28/02 4:13 AM, Michael Maibaum wrote: On Thursday, Nov 28, 2002, at 00:25 US/Pacific, Rob Mueller wrote: I've noticed a few comments around the web of problems with 5.8.0 and Apache::DB, but no responses that anyone is looking at it or has a solution. I've had much the same problem

How can I tell if a request was proxy-passed form an SSL server?

2002-11-14 Thread John Siracusa
Assume I have a front-end (non-mod_perl) proxy server that supports both HTTP and HTTPS. I want to know, from within my Perl code on the back-end (HTTP-only) mod_perl server, if the current request was ProxyPass-ed to me based on an original HTTP or HTTPS request from the user. There doesn't

Re: How can I tell if a request was proxy-passed form an SSLserver?

2002-11-14 Thread John Siracusa
On 11/14/02 2:12 PM, Randy Kobes wrote: On Thu, 14 Nov 2002, John Siracusa wrote: Assume I have a front-end (non-mod_perl) proxy server that supports both HTTP and HTTPS. I want to know, from within my Perl code on the back-end (HTTP-only) mod_perl server, if the current request

Re: How can I tell if a request was proxy-passed form an SSLserver?

2002-11-14 Thread John Siracusa
On 11/14/02 2:39 PM, Randy Kobes wrote: On Thu, 14 Nov 2002, John Siracusa wrote: I tried turning on ProxyVia, but all I got was the HTTP protocol version (1.1) and the host (www.foo.com), but no scheme string (e.g. http://; or https://;) Were these from requests you know were made using

Re: How can I tell if a request was proxy-passed form an SSLserver?

2002-11-14 Thread John Siracusa
On 11/14/02 5:48 PM, Marcin Kasperski wrote: What about the simple manual solution: frontend server proxies /some/url to /http/some/url on backend for HTTP and to /https/some/url on backend for HTTPS. Or something similar... On 11/14/02 6:56 PM, Carolyn Hicks wrote: If you can proxy-pass HTTP

Apache::Peek and perl 5.8.0

2002-10-30 Thread John Siracusa
Does anyone have Apache::Peek working with perl 5.8.0? I can't get it to build, and I can't find the symbols it's (apparently) missing anywhere in perl 5.8.0's header files. Example: --- CPAN.pm: Going to build D/DO/DOUGM/Apache-Peek-0.9501.tar.gz Checking if your kit is complete... Looks

Re: Trouble with Apache::DB

2002-10-24 Thread John Siracusa
On 10/24/02 11:18 PM, Kip Cranford wrote: I have a newly installed Red Hat 8.0 system, with the following characteristics: * Perl v5.8.0 * mod_perl 1.27 * Apache 1.3.26 The build of mod_perl/Apache worked fine; the project I had been working on before upgrading RH seems to run ok.

Re: Change in module naming conventions

2002-08-27 Thread John Siracusa
On Tuesday, August 27, 2002, at 10:54 PM, Stas Bekman wrote: But Authentication, Authorization and Access aren't all Auth. May be using Apache::AAA:: as in httpd-2.0/modules/aaa/ ? Please, no more too-clever TLAs. Have we learned nothing from LWP? :) -John

Re: IPC::Open2 under mod_perl in Mac OS X

2002-06-30 Thread John Siracusa
On 6/30/02 2:06 AM, Stas Bekman wrote: John Siracusa wrote: (I'm not sure if this is a mod_perl thing of a Mac OS X bug, so I'm posting it to both lists. Redirect follow-ups as appropriate.) open2() doesn't seem to work for me when running under mod_perl in Mac OS X. It's not a bug

IPC::Open2 under mod_perl in Mac OS X

2002-06-29 Thread John Siracusa
(I'm not sure if this is a mod_perl thing of a Mac OS X bug, so I'm posting it to both lists. Redirect follow-ups as appropriate.) open2() doesn't seem to work for me when running under mod_perl in Mac OS X. Here's the test case: In /usr/local/bin/upcase #!/usr/bin/perl $buf .= $_

Re: mod_perl/passing session information (MVC related, maybe...)

2002-06-13 Thread John Siracusa
On 6/13/02 11:04 AM, Rob Nagler wrote: With sessionID, you have an ID and information that is checksum'd. Sessions and user IDs are equivalent. They are called credentials which allow access to a system. There's no fundamental difference between hijacking a session or stealing a user

Re: separating C from V in MVC

2002-06-13 Thread John Siracusa
On 6/13/02 1:29 PM, Perrin Harkins wrote: Just be careful that you don't end up making this into something that mirrors the SQL exactly. There might be 4 tables involved in finding out what kind of credit card the user had, but that gets hidden behind this API. If you find yourself writing

Re: threads in 5.8 (was: mod_perl2.0 / TIPool)

2002-06-13 Thread John Siracusa
On 6/13/02 5:58 PM, Matt Sergeant wrote: Also note perl.com is now running an article on threads::shared. http://www.perl.com/pub/a/2002/06/11/threads.html It's mainly aimed at module authors, but it could be of interest anyway. Does anyone know the logic behind making the threads modules

Re: threads in 5.8 (was: mod_perl2.0 / TIPool)

2002-06-13 Thread John Siracusa
On 6/13/02 6:40 PM, Matt Sergeant wrote: Does anyone know the logic behind making the threads modules all lowercase? I'd expect it to be Threads::Shared, not threads::shared. Pragmas are lowercase. And use threads; is really a pragma. A pragma with class methods? A pragma that exports

Re: mod_perl/passing session information (MVC related, maybe...)

2002-06-12 Thread John Siracusa
On 6/12/02 12:57 PM, Per Einar Ellefsen wrote: But what if someone opens one of the links in a different window, and continue on the same pages as in the original window, but with different parameters? The session ID would be the same, the context id would be the same, but the params would be

Re: separating C from V in MVC

2002-06-11 Thread John Siracusa
On 6/11/02 12:46 PM, Perrin Harkins wrote: John Hurst wrote: Still, I don't think that replacing this: Location /search SetHandler perl-script PerlHandler Controller::Search /Location with this: [% Ctrl.Search() %] makes Controller::Search any less a controller. You're

Re: [OT] MVC soup (was: separating C from V in MVC)

2002-06-07 Thread John Siracusa
On 6/7/02 1:04 PM, Perrin Harkins wrote: For example, if you have a form for registering as a user which has multiple fields, you want to be able to tell them everything that was wrong with their input (zip code invalid, phone number invalid, etc.), not just the first thing you encountered.

Re: separating C from V in MVC

2002-06-04 Thread John Siracusa
On 6/4/02 12:32 PM, Perrin Harkins wrote: The thing that worries me about a widget approach is that I would have the same problem I had with CGI.pm's HTML widgets way back: the designers can't change the HTML easilly. Getting perl developers out of the HTML business is my main reason for

HTML::Entities chokes on XML::Parser strings

2002-05-07 Thread John Siracusa
I ran into this problem during mod_perl development, and I'm posting it to this list hoping that other mod_perl developers have dealt with the same thing and have good solutions :) I've found that strings collected while processing XML using XML::Parser do not play nice with the HTML::Entities

Re: HTML::Entities chokes on XML::Parser strings

2002-05-07 Thread John Siracusa
On 5/7/02 10:58 AM, Paul Lindner wrote: The output from your example looks like UTF-8 data (Atilde; is a commonly seen UTF-8 escape sequence). XML::Parser converts all incoming text into UTF-8. You will need to convert it back to iso-8859-1. My favorite is Text::Iconv use

Re: HTML::Entities chokes on XML::Parser strings

2002-05-07 Thread John Siracusa
On 5/7/02 11:06 AM, Rafael Garcia-Suarez wrote: The workaround I used is to write the handler like this : sub xml_char { my ($expat) = _; $buffer .= $expat-original_string; } Reading the original string, no need to convert UTF-8 back to iso-8859-1. Doh! I dunno why I didn't think

Re: HTML::Entities chokes on XML::Parser strings

2002-05-07 Thread John Siracusa
On 5/7/02 11:25 AM, Gisle Aas wrote: John Siracusa [EMAIL PROTECTED] writes: On 5/7/02 10:58 AM, Paul Lindner wrote: The output from your example looks like UTF-8 data (Atilde; is a commonly seen UTF-8 escape sequence). XML::Parser converts all incoming text into UTF-8. You will need

Re: [announce] mod_perl-1.99_01

2002-04-08 Thread John Siracusa
On 4/8/02 2:41 AM, Stas Bekman wrote: I've searched google, but didn't find any info regarding Term::ANSIColor and suggesting good cross-platform, cross-terminal colors. Maybe I didn't understand the earlier part of your message, but can't you specify both the foreground and the background

Re: [announce] mod_perl-1.99_01

2002-04-07 Thread John Siracusa
You might want to reconsider the use of VT escape codes in the build process. The red error message was cute, but there's a big potential downside (see attached screenshot). In the words of the W3C's CSS validator: You have no background-color with your color :) -John not-so-clever.gif

Re: Be carefull with apache 1.3.24

2002-03-29 Thread John Siracusa
On 3/23/02 8:01 PM, Pedro Melo Cunha wrote: Looking at the change log, they mention a bug that multiple set-cookie's will fail (only the last one will be sent to the client, the proxy will eat the others). And it was true... The problem is that 1.3.24 final also has that bug: only the last

Re: Be carefull with apache 1.3.24

2002-03-29 Thread John Siracusa
On 3/29/02 1:11 PM, John Siracusa wrote: On 3/23/02 8:01 PM, Pedro Melo Cunha wrote: Looking at the change log, they mention a bug that multiple set-cookie's will fail (only the last one will be sent to the client, the proxy will eat the others). And it was true... The problem is that 1.3.24

Re: Be carefull with apache 1.3.24

2002-03-29 Thread John Siracusa
On 3/29/02 1:26 PM, John Siracusa wrote: Anyway, now that I have patched, working versions... Scratch that: the patch doesn't seem to work when I build a server with mod_ssl in it. Hrm... -John

Re: Be carefull with apache 1.3.24

2002-03-25 Thread John Siracusa
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

2002-03-25 Thread John Siracusa
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

Multiple Location directives question

2002-03-05 Thread John Siracusa
I have something like: Location /foo SetHandler perl-script PerlHandler My::Foo /Location Location / SetHandler perl-script PerlHandler My::Bar AuthName Bar AuthType Basic PerlAuthenHandler My::Auth::Bar PerlAuthzHandler My::Authz::Bar require valid-user /Location What I

Re: Multiple Location directives question

2002-03-05 Thread John Siracusa
On 3/5/02 11:58 AM, Geoffrey Young wrote: you might want to set up /foo and /bar then use mod_rewrite or something to map !/foo to /bar Ug, there has to be another way :-/ -John

Re: MacOSX Requests and Cookies

2002-02-03 Thread John Siracusa
On 2/3/02 10:23 AM, Joe Schaefer wrote: John Siracusa [EMAIL PROTECTED] writes: Well, I can confirm that it still doesn't work for me... :-/ Is everyone using Perl 5.6.1 here? Because somehow some of the files I downloaded had the string perl500503 embedded in them. Even after search

Re: MacOSX Requests and Cookies

2002-02-02 Thread John Siracusa
On 2/1/02 10:39 PM, Joe Schaefer wrote: Rick Frankel [EMAIL PROTECTED] writes: The following patch, while probably not correct (and probably the cause of the silent failure), covers it. [...] I've incorporated your patch and uploaded it to the website. Hopefully other OS X'ers will be able

Re: Apache::args vs Apache::Request speed

2002-02-01 Thread John Siracusa
On 2/1/02 3:39 PM, Ian Ragsdale wrote: On the other hand, I'd be happy to compile it, but what would I need to do to test it? I'm in the process of trying this too (just building a mod_perl httpd in OS X is a bit tricky...) To test it, I think all you need to do is put these two lines in your

Re: Apache::args vs Apache::Request speed

2002-02-01 Thread John Siracusa
On 2/1/02 3:21 PM, Joe Schaefer wrote: Would someone PLEASE volunteer to try to compile and test apache+mod_perl libapreq on OS/X using the experimental code I posted there? Even if you can't get it working, ANY feedback about what happened when you tried would be VERY helpful. (The below

Re: Apache::args vs Apache::Request speed

2002-01-27 Thread John Siracusa
On 1/27/02 3:34 PM, Joe Schaefer wrote: param() was rewritten as XS about 6-8 months ago; since then I've benchmarked it a few times and found param() to be a bit faster than args(). We'll be releasing a 1.0 version of libapreq as soon as Jim approves of the current CVS version. Did I just

Re: mod_accel-1.0.10 and mod_deflate-1.0.10

2001-12-29 Thread John Siracusa
On 12/29/01 8:23 AM, Igor Sysoev wrote: ftp://ftp.lexa.ru/pub/apache-rus/contrib/mod_accel-1.0.10.tar.gz Is there any timeline on a release of mod_accel with English documentation? -John

Re: OT: secure mod_perl enabled apache on MacOSX 10.1

2001-10-04 Thread John Siracusa
On 10/4/01 9:26 AM, Joe Schaefer wrote: John Siracusa [EMAIL PROTECTED] writes: P.S.- d) Apache::Request and Apache::Cookie still can't be loaded simultaneously! :( Why not? Run-time symbol conflict. Does it work OK with a statically-linked mod_perl? I've never heard of anyone getting

Re: OT: secure mod_perl enabled apache on MacOSX 10.1

2001-10-03 Thread John Siracusa
On Wednesday, October 3, 2001, at 05:03 PM, Ray Zimmerman wrote: At 2:23 PM -0400 10/3/01, John Siracusa wrote: On Wednesday, October 3, 2001, at 02:10 PM, Ray Zimmerman wrote: I've been able to build a mod_perl enabled apache (not DSO) for Mac OS X 10.1 and it seems to work fine. Would

Re: OT: secure mod_perl enabled apache on MacOSX 10.1

2001-10-03 Thread John Siracusa
On Wednesday, October 3, 2001, at 02:10 PM, Ray Zimmerman wrote: I've been able to build a mod_perl enabled apache (not DSO) for Mac OS X 10.1 and it seems to work fine. Would it be too much trouble for you to post a complete, step-by-step account of exactly what you did you accomplish

Re: mod_perl IPC under Solaris 7

2000-12-08 Thread John Siracusa
shmsys:shminfo_shmmni = 1 * Limit on the number of shared memory segments that any one process * can create (default 6, max 32767) set shmsys:shminfo_shmseg = 1 * * Semaphore settings changed by John Siracusa 9/19/2000 * * Maximum number of semaphore identifiers (default 10, max 65535) set

Re: shared mem [was: mod_perl advocacy project resurrection]

2000-12-06 Thread John Siracusa
On 12/6/00 3:42 PM, Paul wrote: The parent process could declare a shared memory segment at boot time. Each child's init could spawn a shared memory interface object. Wouldn't that allow for some resource pooling to be cleaner? How would that interact with per-child namespaces (if at all)?

Re: pre-loaded modules on Solaris

2000-11-10 Thread John Siracusa
On 11/10/00 10:15 AM, John Hughes wrote: A guess: When pmap says "shared" it means stuff that realy shared. I.E. it's not counting stuff that is marked copy-on-write, which is shared UNTIL YOU TRY TO MODIFY IT. Is there any way to measure the size of the shared copy-on-write pages on

Re: [OT] amp; in URLs (was: Re: Templating System)

2000-07-28 Thread John Siracusa
On 7/28/00 12:54 PM, Mark Doyle wrote: We deliberately chose to use URL's with a series of '/' delimited fields rather then using '? ... ' style URL's precisely because most people don't know they have to escape the ampersands and we didn't want to risk people's links breaking in the

Re: [request] live server updates + ideas for guide/control.html

2000-05-02 Thread John Siracusa
On 5/2/00 2:19 PM, Stas Bekman wrote: 2. The other request is about the "Controlling and Monitoring the Server" chapter itself. Do you think that in addition to the existing items (see below) you/we want to see other things related to this chapter. I'd like to see an example of how to control

Re: RFD: comp.infosystems.www.modperl

2000-02-03 Thread John Siracusa
On 2/3/00 1:17 PM, Bill Jones wrote: however, that doesn't mean that the 'experts' will frequent the newsgroup more than a mailing list - people tend to start flame wars more in a usenet setting... OTOH, it's a lot easier to track and respond to particular issues/problems in a threaded

Re: Handling directory requests with a PerlHandler

1999-11-11 Thread John Siracusa
On 11/11/99 7:49 PM, John Siracusa wrote: $uri .= 'index.html'; # /dir/ is now /dir/index.html my($sr) = $r-lookup_uri($uri); return $sr-run(); it appears to work, but the headers I get are simply: HTTP/1.0 200 OK Date: Fri, 12 Nov 1999 00:25:44 GMT No content type! I've tried

Using Apache::Util outside mod_perl

1999-11-01 Thread John Siracusa
Can I use the Apache::Util functions outside mod_perl? Here's an attempt: % cat test.pl use Apache::Util; print Apache::Util::escape_html('foo'); % perl test.pl Undefined subroutine Apache::Util::escape_html called at test.pl line 3. I'd like to have access to the fast URL/HTML escaping

Re: Using Apache::Util outside mod_perl

1999-11-01 Thread John Siracusa
On 11/1/99 12:19 PM, Ken Y. Clark wrote: I'd like to have access to the fast URL/HTML escaping subroutines in "regular" perl scripts, if possible. isn't that functionality available in CGI? Yes, but AFAIK they're plain perl implementations rather than stubs for faster C versions. -John

Re: Intentional Premature Finish in an Apache Module

1999-10-28 Thread John Siracusa
On 10/28/99 1:31 PM, Ken Y. Clark wrote: for what it's worth, here's what i do: [snip] my $err = $r-pnotes(ERROR_NAME) or return OK; Speaking of pnotes(), how stable, API-wise, is it? It isn't documented at all in the O'Reilly Apache Modules book, but I was very happy to find it in the

Apache::Cookie confusion

1999-01-17 Thread John Siracusa
Apache::Cookie seems to have two different interfaces...or maybe there are two different distributions of Apache::Cookie? Whatever it is, the interface seems different on two machines here at work. One has 5.004 and one has 5.005, but that shouldn't change the Apache::Cookie interface should