system resources to spec out purchases
Hello there. I am the CTO for webfs, inc. We are a mod_perl/ Solaris house. I am going to do some buying of web servers for our web site. Since our web server + mod_perl=application server, What are the areas of intensity that are known as far as resources? Since ultra 5's cost around 2k a piece, they are attractive. But since they are EIDE and limited in cache and IO, I was wondering if they are good buys for a website that is strictly mod_perl. Bottom line, is mod_perl intensive on system IO or other areas where it would be in our interest in looking at ultra 1's or 2's instead of ultra 5's? Thanks for any info. /scott begin:vcard n:Unkefer;Scott x-mozilla-html:TRUE org:WebFS, inc. adr:;; version:2.1 note;quoted-printable:First they ignore you,=0D=0A then they laugh at you,=0D=0A then they fight you,=0D=0A then you win.=0D=0A- Mahatma Ghandi fn:Scott Unkefer end:vcard
Apache::ASP
Hello, Whenever I put in a file with .asp extension then I get 500 Internal Server Error. It works fine with file in demo directory and ended in .htm extension. Do you have any suggestions? I am using RedHat Secure Server 6.0 Here is the syntax_error.html out put Errors Output Can't call method "SyntaxError" on an undefined value at (eval 11) line 78. , /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 880 Debug Output STARTING ASP HANDLER (v0.09) for file /home/httpd/html/eg/syntax_error.htm GlobalASA package Apache::ASP::Compiles::_home_httpd_html_eg___global_asa ASP object created - Application: ; GlobalASA: Apache::ASP::GlobalASA=HASH(0x82f5f54); Internal: ; Request: Apache::ASP::Request=HASH(0x836456c); Response: Apache::ASP::Response=HASH(0x836f460); Server: Apache::ASP::Server=HASH(0x83d9b58); Session: ; app_start: 0; basename: syntax_error.htm; buffering_on: 0; cgi_do_self: 0; command_line: ; compile_error: ; compile_includes: ; cookie_path: /; debug: 2; debugs_output: ARRAY(0x8364500); dirname: /home/httpd/html/eg; errors: 0; errors_output: ARRAY(0x837b288); filehandle: ; filename: /home/httpd/html/eg/syntax_error.htm; filter: 0; global: /home/httpd/html/eg/.; group_refresh: 120; groups_refresh: 120; id: NoCache; mtime: 942102130; no_cache: 1; no_headers: 0; no_session: 0; no_state: 1; pod_comments: 1; r: Apache=SCALAR(0x8319ad0); remote_ip: 10.0.0.1; secure_session: ; session_serialize: ; session_timeout: 1200; soft_redirect: ; stat_inc: ; state_db: SDBM_File; state_dir: /home/httpd/html/eg/./.state; state_manager: 10; inlining include header.inc compiling - package: NoCache; Script_OnStart executing - id: _home_httpd_html_eg___global_asa; routine: Script_OnStart; executing - id: NoCache; routine: ; Debugging - can; take - just: about; - any; kind - of reference - or scalar building cgi headers sending cgi headers Can't call method "SyntaxError" on an undefined value at (eval 11) line 78. , /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 880 Script_OnEnd ASP to Perl Program 1: package Apache::ASP::Compiles::NoCache; 2: no strict; 3: use vars qw($Application $Session $Response $Server $Request); 4: 5: # allow developers to place modules in global directory 6: use lib qw(/home/httpd/html/eg/.); 7: 8: # aliases here 9: sub exit { $main::Response-End(); } 10: 11: # handler gets called from ASP perl handler to run code 12: sub handler { 13: my($self, $routine) = @_; 14: 15: if($routine ($routine ne "handler")) { 16: return $routine; 17: } 18: $self = $routine = undef; 19: @_ = (); 20: 21: ### 22: ## Your ASP script has been parsed and inserted here !! 23: ### 24: 25: 26: ## CODE BEGIN ## 27:$Response-{Buffer} = 0; 28: ## END ## 29: 30: ## CODE BEGIN ## 31:use DemoASP; 32:$demo = DemoASP::new; 33: ## END ## 34: 35: $main::Response-Write( 36: 'html 37: headtitle'.($demo-{title}).'/title/head 38: body bgcolor='.($_[0] || $demo-{bgcolor}).' 39: 40: We are creating a perl syntax error... this should demonstrate 41: how error handling is done. Please check the error log file if 42: you are interested in the output there. 43: p 44: You can turn this error messaging off by setting the Debug variable 45: in the ASP config to 1 or 0. 46: p 47: Also here is an example of how you can use debugging, an API 48: extension $Response-Debug(@args), in your script. The debug 49: output will show up below, and in your error logs. This user 50: style debugging is turned off with the same Debug setting set to 0. 51: p 52: ' 53: ); 54: 55: ## CODE BEGIN ## 56:$Response-Debug( 57:"Debugging", 58:['can', 'take'], 59:{'just'='about'}, 60:sub { ['any', 'kind']}, 61:\"of reference", 62:"or scalar" 63:); 64: ## END ## 65: 66: $main::Response-Write( 67: 'a href="source.asp?file='.($Request-ServerVariables("SCRIPT_NAME")).'" 68: view this file\'s source 69: /a 70: ' 71: ); 72: 73: ## CODE BEGIN ## 74:# flush output that we have written so far, for prettier error 75:$Response-Flush(); 76: 77:# create a run-time syntax error 78:$Object-SyntaxError(); 79: ## END ## 80: 81: $main::Response-Write( 82: '' 83: ); 84: 85: 86: ### 87: ## End script insert 88: ### 89: 90: $main::Response-End(); 91: } 92: 1; This is my Error log file output: [root@www .state]# tail /etc/httpd/logs/error_log [Wed Nov 10 10:32:06 1999] [error] [asp] [debug] [5304] compiling - package: NoC ache; [Wed Nov 10 10:32:06 1999] [error] [asp] [debug] [5304] Script_OnStart [Wed Nov 10 10:32:06 1999] [error] [asp] [debug] [5304] executing - id: _home_ht tpd_html_eg___global_asa; routine: Script_OnStart; [Wed Nov 10 10:32:06 1999] [error] [asp] [debug] [5304] executing - id:
Re: Deep recursion problem (Namespace?) modperl 1.21 with perl 5.00503
This should work... I haven't tried it, though :o) package ThingA; use strict; use ThingB; sub new { return bless {}, shift; } sub ThingB { return ThingB-new( @_ ); } --- package ThingB; use strict; # Note, the next 3 lines will only be necessary if you want to override # ThingA's methods in ThingB and/or make ThingA's methods # available to ThingB objects use ThingA; use vars qw(@ISA); @ISA = qw(ThingA); sub new { my($class,$thinga,$id) = @_; return bless {THINGA=$thinga, ID=$id}, $class; } -- In the script... use ThingA; $thinga = new ThingA; $thingb = $thinga-ThingB; Thanks, Tim Tompkins -- Programmer / IS Technician http://www.arttoday.com/ - Original Message - From: Ronald F. Lens [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 10, 1999 8:00 AM Subject: Deep recursion problem (Namespace?) modperl 1.21 with perl 5.00503 Hi. I'm running into a strange problem with the combination Apache 1.3.9, modperl 1.21 and perl 5.005.03. This problem doesn't occur with perl 5.004 with modperl 1.14 and apache 1.3.1. I have 2 modules : - package ThingA; use ThingB; sub new sub ThingB { ThingA::ThingB-new( @_ ) } --- package ThingB; @ThingA::ThingB::ISA = qw(ThingA); sub new { my ($class,$thinga,$id) = @_; $self = {}; bless $self,$class; $self-{'THINGA'} = $thinga; $self; } --- Now, if I write a normal perl script : use ThingA; $thinga = new ThingA; $thingb = $thinga-ThingB; This runs fine, but if I do the same in the modperl environment and set PerlWarn On in the conf file, I get the warning 'Deep recursion' and the httpd process grows until I'm out of memory. Does anyone have a clue what kind of problem this could be? I would think some sort of namespace problem but cannot imagine why. Thanks in advance Ronald Lens System developer xxLINK Internet Services - Tel:020-6005700 Fax:020-6001825 Email: [EMAIL PROTECTED] Web:http://www.xxLINK.nl/ Fysiek: Postbus 2739 1000 CS Amsterdam The Netherlands -
Last-Modified in CGI.pm
Greetings, Lincoln Stein describes how to set an expires tag but does anyone know how to set a Last-Modified tag in a document created using CGI.pm? Thank you, John Kent Webmaster Naval Research Laboratory Monterey, CA
mod_perl crash
I am trying to build apache 1.3.9 (or 1.3.anything) with mod_perl. It builds fine without, on libc-2.0.7 platform, using gcc 2.7.2.3 I have tried many options in the APACI make process, all have same result (segmentation fault). This is the gdb backtrace from running the mod-perl version: fido:/usr/src/mod_perl-1.21$ gdb ../apache_1.3.6/src/httpd GNU gdb 4.18 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnulibc1"... (gdb) run -X -f `pwd`/t/conf/httpd.conf -d `pwd`/t Starting program: /usr/src/mod_perl-1.21/../apache_1.3.6/src/httpd -X -f `pwd`/t/conf/httpd.conf -d `pwd`/t Program received signal SIGSEGV, Segmentation fault. 0x80c1e88 in perl_parse () (gdb) bt #0 0x80c1e88 in perl_parse () (gdb) Please advise. -- Dominic Amann, http://www.interlog.com/~damann/ Linux Based Solutions Ltd. Toronto, ON, M3J 1G8, Canada Tel: (416) 638-8649, Fax: (416) 630-1584
Re: Seeking volunteer to providing mailing list summaries
At 05:09 PM 11/10/99 -0700, Tom Christiansen wrote: While I've got your attention, I'm also looking for some highly-talented web programmers to help out on implementing some ideas to create dynamic content for the Perl website and for CPAN. Ok, I think I fall into this category. I'm interested in helping; can you give me more information? --- Mark Cogan[EMAIL PROTECTED] Director of Engineering +1 520-881-8101 ArtToday www.arttoday.com
Apache::ASP
I received an error while submitting an online registration form for a conference at the University of Mississippi. Here's the output Errors Output Can't locate Mail/Sendmail.pm in @INC (@INC contains: /usr/local/apache/htdocs/news/may_2000_conference/second_announcement/. /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 . /usr/local/apache/ /usr/local/apache/lib/perl) at (eval 46) line 2. BEGIN failed--compilation aborted at (eval 46) line 2. , /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 1046 Debug Output STARTING ASP HANDLER (v0.16) for file /usr/local/apache/htdocs/news/may_2000_conference/second_announcement/registration_thank_you.asp GlobalASA package Apache::ASP::Compiles::_usr_local_apache_htdocs_news_may_2000_conference_second_announcement___global_asa compiling global.asa Apache::ASP::Compiles::_usr_local_apache_htdocs_news_may_2000_conference_second_announcement___global_asa global.asa routines - opening lock file /usr/local/apache/htdocs/news/may_2000_conference/second_announcement/./.state/server/application.lock created $Application - opening lock file /usr/local/apache/htdocs/news/may_2000_conference/second_announcement/./.state/server/internal.lock SessionCookie - 6cc4346b79e5a631f92b9db893dcaf7b refreshing 6cc4346b79e5a631f92b9db893dcaf7b with timeout 942417830 session timed out, clearing opening lock file /usr/local/apache/htdocs/news/may_2000_conference/second_announcement/./.state/6c/6cc4346b79e5a631f92b9db893dcaf7b.lock Session_OnEnd - session: 6cc4346b79e5a631f92b9db893dcaf7b; compiled - state 6cc4346b79e5a631f92b9db893dcaf7b locks: 0, unlocks: 0 opening lock file /usr/local/apache/htdocs/news/may_2000_conference/second_announcement/./.state/6c/6cc4346b79e5a631f92b9db893dcaf7b.lock tieing session 6cc4346b79e5a631f92b9db893dcaf7b tied session - err_mesg: ; clearing starting session forcing groups cleanup testing internal time for cleanup groups group check 6c skipping delete self - id: 6cc4346b79e5a631f92b9db893dcaf7b; state 6c locks: 0, unlocks: 0 cleanup groups - deleted: 0; Application_OnEnd compiled - Application_OnStart compiled - Session_OnStart - session: 6cc4346b79e5a631f92b9db893dcaf7b; compiled - ASP object created - Application: Apache::ASP::Application=HASH(0x8377504); GlobalASA: Apache::ASP::GlobalASA=HASH(0x8578828); Internal: Apache::ASP::State=HASH(0x85439b4); Request: Apache::ASP::Request=HASH(0x8580f9c); Response: Apache::ASP::Response=HASH(0x8582c7c); Server: Apache::ASP::Server=HASH(0x8578804); Session: Apache::ASP::Session=HASH(0x84bc128); allow_application_state: 1; app_start: 0; basename: registration_thank_you.asp; buffering_on: 1; cgi_do_self: 0; cgi_headers: ; clean: 0; command_line: ; compile_error: ; compile_includes: ; cookie_path: /; debug: 2; debugs_output: ARRAY(0x8578930); dirname: /usr/local/apache/htdocs/news/may_2000_conference/second_announcement; errors: 0; errors_output: ARRAY(0x8563cec); filehandle: ; filename: /usr/local/apache/htdocs/news/may_2000_conference/second_announcement/registration_thank_you.asp; filter: 0; global: /usr/local/apache/htdocs/news/may_2000_conference/second_announcement/.; global_package: ; group_refresh: 3; groups_refresh: 3; id: _usr_local_apache_htdocs_news_may_2000_conference_second_announcement_registration_thank_you_aspINLINE; includes_dir: ; init_packages: ARRAY(0x8578a8c); mail_alert_period: 20; mail_alert_to: ; mail_errors_to: ; mail_host: ; mtime: 939937890; no_cache: ; no_headers: 0; no_session: 0; no_state: ; package: Apache::ASP::Compiles::_usr_local_apache_htdocs_news_may_2000_conference_second_announcement___global_asa; paranoid_session: 0; pod_comments: 1; r: Apache=SCALAR(0x8582c1c); remote_ip: 130.101.203.136; script_timeout: 90; secure_session: ; session_serialize: ; session_timeout: 30; soft_redirect: ; stat_inc: ; stat_inc_match: ; state_cache: ; state_db: SDBM_File; state_dir: /usr/local/apache/htdocs/news/may_2000_conference/second_announcement/./.state; state_manager: 10; ua: Mozilla/4.61 [en] (Win98; U); unique_packages: 0; parsing registration_thank_you.asp inlining include /usr/local/apache/htdocs/inc/top.inc inlining include /usr/local/apache/htdocs/inc/bottom.inc active undefing sub Apache::ASP::Compiles::_usr_local_apache_htdocs_news_may_2000_conference_second_announcement___global_asa::_usr_local_apache_htdocs_news_may_2000_conference_second_announcement_registration_thank_you_aspINLINE code CODE(0x85750fc) before compiling compiling into package Apache::ASP::Compiles::_usr_local_apache_htdocs_news_may_2000_conference_second_announcement___global_asa subid Apache::ASP::Compiles::_usr_local_apache_htdocs_news_may_2000_conference_second_announcement___global_asa::_usr_local_apache_htdocs_news_may_2000_conference_second_announcement_registration_thank_you_aspINLINE Can't locate Mail/Sendmail.pm in @INC (@INC contains:
Re: silly perl question
It's a simple statement evaluated for it's side-effects. There are no side-effects to 'string'; so nothing appears to happen. However, this value will be returned as the value of a subroutine or block if it's the last statement in the block. Oleg Bartunov wrote: Hi, sorry for offtopic and silly question friend of mine just learning perl has asking me what does 'string'; means. Perl seems just silently ignores this 'statement' No warning, no action. Is it a known feature ? Regards, Oleg _ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83
Re: silly perl question
sorry for offtopic next time, use comp.lang.perl.misc silly question no such thing friend of mine just learning perl has asking me what does 'string'; means. Perl seems just silently ignores this 'statement' No warning, no action. Is it a known feature ? In perl and C, an expression can be a statement. For example, b = c + d is an expression since one can say a = (b = c + d) but it can also be used as a statement. Similarly, 'string' and e++ are expressions and therefore can be used in other expressions and as standalone statements. ELB -- Eric L. Brine | Chicken: The egg's way of making more eggs. [EMAIL PROTECTED] | Do you always hit the nail on the thumb? ICQ# 4629314 | An optimist thinks thorn bushes have roses.
RE: Trying not to re-invent the wheel
I've written up a few test benches for HTML::Parser.. it works ok, but it's not as fast as I would like it to be. IS there some reason you don't just use HTML::Mason? Patient: My tooth aches. Doctor: Is there some reason you haven't replaced your teeth with dentures? -sam
Re: system resources to spec out purchases
On Tue, Nov 09, 1999 at 04:03:49PM -0800, Scott Unkefer wrote: I am the CTO for webfs, inc. We are a mod_perl/ Solaris house. I am going to do some buying of web servers for our web site. Since our web server + mod_perl=application server, What are the areas of intensity that are known as far as resources? Since ultra 5's cost around 2k a piece, they are attractive. But since they are EIDE and limited in cache and IO, I was wondering if they are good buys for a website that is strictly mod_perl. Bottom line, is mod_perl intensive on system IO or other areas where it would be in our interest in looking at ultra 1's or 2's instead of ultra 5's? In this situation, I'd probably purchase Solaris systems based on Sun's AXi motherboard. It has built-in 100BT, 2 UW SCSI channels, and can be purchased in configurations as small as 2U, or in mid-towers if you don't rackmount. They max out at 1GB of memory. A good platform to load-balance, though more expensive than an equivalent powered PC Unix platform. I doubt that you can buy a high-memory configuration for under $2K, but you're not going to spend $10K either. Probably pretty easy to spend under $5K. Vendors include Tatung, Rave, Telenet, and probably loads of others. This is an ATX platform, so anyone can buy the parts from the distributor and integrate it. You could even do it in-house, but that's a pain. Another alternative is the sun CompactPCI platform. That's a bit more complex, and unless you're willing to put in some time to understand the industry (mostle telco servers), I'd stay away. OTOH, if you're looking to load-balance with high compute density... John
RegistryNG docs?
I'd like have my registry scripts be cached by their filename after resolving symbolic links, and I think subclassing RegistryNG is the cleanest way to accomplish this. Unfortunately, I cannot find any documentation on RegistryNG. Is it ready for prime-time, or should I just hack Registry for now? (using Apache 1.3.9, mod_perl 1.21) Thanks, Chris -- Chris Nokleberg + Internet Sports Network, Inc. [EMAIL PROTECTED] + http://www.SportsRocket.com/
RE: Trying not to re-invent the wheel
I've decided to go with Mason.
Re: Trying not to re-invent the wheel
On Nov 10, Mark Cogan wrote: At 10:10 AM 11/10/99 -0800, Ian Mahuron wrote: I may implement IF/LOOPS/etc.. but not until I see the need. Those introduce more complex problems. And they are, of course, inevitable with almost any templating system. Jim
Re: Last-Modified in CGI.pm
"Kent," == Kent, Mr John [EMAIL PROTECTED] writes: Kent, Lincoln Stein describes how to set an expires tag but does anyone know how Kent, to set a Last-Modified tag in a document created using CGI.pm? What part of Many routines will do something useful with a named argument that it doesn't recognize. For example, you can produce non-standard HTTP header fields by providing them as named arguments: print $q-header(-type = 'text/html', -cost = 'Three smackers', -annoyance_level = 'high', -complaints_to = 'bit bucket'); is the most mysterious to you? (Copied right from CGI.pm's docs) If it's that you don't know how to create the right time string, then either look at how expires does it, or just grab HTTP::Date from LWP, which reads: $string = time2str($time); and set $time = to the mod_time of your file in question, or even right now if it's dynamically generated. However, unless you're willing to respond to "if-modified-since" with an appropriate 304 error if not, why are you bothering to even send a "last-modified" from a CGI script? The absence of such a field has traditionally been treated as "last-modified: now". So why bother? -- 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!