Re: Bug in libapreq makes form elements stick to an apache child
Randal L. Schwartz wrote: "if (@foo) {...}" is *idiomatic* Perl for "are there any elements in @foo, and if so, do this". If you don't understand the idioms, please choose a more familiar language. :) Don't you think this is a rather nasty response, smiley notwithstanding? Normally I enjoy your posts. Not this one.
Re: Bug in libapreq makes form elements stick to an apache child
On Fri, 19 Nov 1999, Jeffrey Baker wrote: I don't care whether Perl has allocate memory or not. All I care about is whether or not there are any defined entries in the list, which I think is most clearly expressed as 'if (defined $list[0])'. What is more clear than that? 'if (@list)' could certainly work because an empty list evaluates to 0 in a scalar context. But the code doesn't look like what I am intending to do. Eh, did I miss something? If you really really want to test whether there are any defined entries anywhere in an array then just testing the definedness of the first entry isn't going to help. If you really wanted to do that you could do: if (grep {defined} @list) which does what you say you want. 'if (defined $list[0])' would only check the first entry. 'if (@list)' would return true if '@list = (undef, undef)'. -Dave /*== www.urth.org we await the New Sun ==*/
Re: Web Site Service Improvements
Question: Has anyone devlopped a Web Mail interface using perl? With mod_perl is there an available 'plug-in'? perl -MCPAN -eshell cpan i /WING/ DistributionMICB/wing-0.9.tar.gz Module WING(Contact Author Malcolm Beattie [EMAIL PROTECTED]) Module Wing(MICB/wing-0.9.tar.gz) Module Wing::Admin (MICB/wing-0.9.tar.gz) Module Wing::Balance (MICB/wing-0.9.tar.gz) Module Wing::Login (MICB/wing-0.9.tar.gz) Module Wing::Shared(MICB/wing-0.9.tar.gz) Module Wing::Util (MICB/wing-0.9.tar.gz) ___ Stas Bekman mailto:[EMAIL PROTECTED]www.singlesheaven.com/stas Perl,CGI,Apache,Linux,Web,Java,PC at www.singlesheaven.com/stas/TULARC www.apache.org www.perl.com == www.modperl.com || perl.apache.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
Re: Problems with mod_perl 1.2.1 and apache 1.3.9 - newbie - Pleasehelp!
My guess is that you don't have gcc installed? what do you see when running: % gcc -v I'm new to compiling my own software and attempting to get mod_perl and apache to work together. I have Redhat 6.0. I thought this was supposed to use gcc, not cc and I am getting no make action when it's done. I would _greatly_ appreciate any help on resolving this. I'm teaching myself Embperl and want it to have Virtual Logging. It appears that it must be a Apache module in order to enable this feature. I have the following directories in /usr/src mod_perl-1.21 apache_1.3.9 I just did gzip -d on the .gz files and then tar -xvf on the subsequent tar files. Then I went to the mod_perl-1.21 directory and did: $ perl Makefile.PL \ APACHE_PREFIX=/www \ DO_HTTPD=1 \ USE_APACI=1 \ EVERYTHING=1 makeout.log 21 Makeout.log is here: Will run tests as User: 'nobody' Group: 'root' Configuring for Apache, Version 1.3.9 + using installation path layout: Apache (config.layout) + activated perl module (modules/perl/libperl.a) Creating Makefile Creating Configuration.apaci in src + id: mod_perl/1.21 + id: Perl/5.00503 (linux) [perl] Creating Makefile in src + configured for Linux platform + setting C pre-processor to cc -E + checking for system header files + adding selected modules o perl_module uses ConfigStart/End + mod_perl build type: OBJ + setting up mod_perl build environment + adjusting Apache build environment + enabling Perl support for SSI (mod_include) + checking sizeof various data types + doing sanity check on compiler and options ** A test compilation with your Makefile configuration ** failed. This is most likely because your C compiler ** is not ANSI. Apache requires an ANSI C Compiler, such ** as gcc. The above error message from your compiler ** will also provide a clue. Aborting! Will configure via APACI cp apaci/Makefile.libdir ./apache_1.3.9/src/modules/perl/Makefile.libdir cp apaci/Makefile.tmpl ../apache_1.3.9/src/modules/perl/Makefile.tmpl cp apaci/README ../apache_1.3.9/src/modules/perl/README cp apaci/configure ../apache_1.3.9/src/modules/perl/configure cp apaci/libperl.module ./apache_1.3.9/src/modules/perl/libperl.module cp apaci/mod_perl.config ./apache_1.3.9/src/modules/perl/mod_perl.config cp apaci/mod_perl.config.sh ./apache_1.3.9/src/modules/perl/mod_perl.config.sh cp apaci/load_modules.pl.PL ./apache_1.3.9/src/modules/perl/load_modules.pl.PL cp apaci/find_source.PL ./apache_1.3.9/src/modules/perl/find_source.PL [everything snipped].enabled (cd ../apache_1.3.9 CC="cc" ./configure --activate-module=src/modules/perl/libperl.a --prefix=/www) Checking CGI.pm VERSION..ok Checking for LWP::UserAgent..ok Checking for HTML::HeadParserok Writing Makefile for Apache Writing Makefile for Apache::Connection Writing Makefile for Apache::Constants Writing Makefile for Apache::File Writing Makefile for Apache::Leak Writing Makefile for Apache::Log Writing Makefile for Apache::ModuleConfig Writing Makefile for Apache::PerlRunXS Writing Makefile for Apache::Server Writing Makefile for Apache::Symbol Writing Makefile for Apache::Table Writing Makefile for Apache::URI Writing Makefile for Apache::Util Writing Makefile for mod_perl Then I ran make make.log 21 Make.log is here: (cd ../apache_1.3.9 make) make[1]: Entering directory `/usr/src/apache_1.3.9' === src make[2]: Entering directory `/usr/src/apache_1.3.9' make[3]: Entering directory `/usr/src/apache_1.3.9/src' make[3]: *** No rule to make target `all'. Stop. make[3]: Leaving directory `/usr/src/apache_1.3.9/src' make[2]: *** [build-std] Error 2 make[2]: Leaving directory `/usr/src/apache_1.3.9' make[1]: *** [build] Error 2 make[1]: Leaving directory `/usr/src/apache_1.3.9' make: *** [apaci_httpd] Error 2 -- Scott Chapman Technical Support Specialist Lund Performance Solutions [EMAIL PROTECTED] or [EMAIL PROTECTED] Phone: 541-926-3800 www.lund.com ___ Stas Bekman mailto:[EMAIL PROTECTED]www.singlesheaven.com/stas Perl,CGI,Apache,Linux,Web,Java,PC at www.singlesheaven.com/stas/TULARC www.apache.org www.perl.com == www.modperl.com || perl.apache.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
No Subject
I am using modperl/apache and need to call a function whenever a page is fetched. I guess I can do it using one of the PerlHandlers. Which perlhandler should I use ? Is there any place on the net where I can find information about the same. Thanks Ashish Goyal
Re: Problems with mod_perl 1.2.1 and apache 1.3.9 - newbie - Please help!
According to Scott Chapman: I'm new to compiling my own software and attempting to get mod_perl and apache to work together. I have Redhat 6.0. Most Redhat versions have problems that go away if you compile and install your own perl. + doing sanity check on compiler and options ** A test compilation with your Makefile configuration ** failed. This is most likely because your C compiler ** is not ANSI. Apache requires an ANSI C Compiler, such ** as gcc. The above error message from your compiler ** will also provide a clue. Aborting! I think it is picking up the perl compiler options from the stock version on your system, and it doesn't match the compiler that is currently installed. There may be an easier fix, but building perl yourself should take care of it. If you end up with perl in /usr/local/bin, be sure to kill the old ones in /usr/bin and replace them with symlinks to keep everything else happy. Les Mikesell [EMAIL PROTECTED]
Re: Problems with mod_perl 1.2.1 and apache 1.3.9 - newbie - Pleasehelp!
On Sat, 20 Nov 1999, Leslie Mikesell wrote: According to Scott Chapman: I'm new to compiling my own software and attempting to get mod_perl and apache to work together. I have Redhat 6.0. Most Redhat versions have problems that go away if you compile and install your own perl. I have a RH 6.0 at home and have no problem to build a mod_perl. If it was a problem of RH 6.0 we were supposed to see tens of problem reports about this. Scott, check that you have the development tools properly installed if at all. + doing sanity check on compiler and options ** A test compilation with your Makefile configuration ** failed. This is most likely because your C compiler ** is not ANSI. Apache requires an ANSI C Compiler, such ** as gcc. The above error message from your compiler ** will also provide a clue. Aborting! I think it is picking up the perl compiler options from the stock version on your system, and it doesn't match the compiler that is currently installed. There may be an easier fix, but building perl yourself should take care of it. If you end up with perl in /usr/local/bin, be sure to kill the old ones in /usr/bin and replace them with symlinks to keep everything else happy. Les Mikesell [EMAIL PROTECTED] ___ Stas Bekman mailto:[EMAIL PROTECTED]www.singlesheaven.com/stas Perl,CGI,Apache,Linux,Web,Java,PC at www.singlesheaven.com/stas/TULARC www.apache.org www.perl.com == www.modperl.com || perl.apache.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
Re: Image::Magick and mod_perl
If each transaction lasts a couple of seconds, it this a Bad Thing? I have always wondered about the point of using Mod_Perl vs Mod_CGI where the program takes a couple of seconds to run completely. To put it another way. Mod_Perl saves you some valuable time which can make a difference if you have normal CGI programs which run in the milliseconds. But who cares about a couple of 100 millis if your program needs a couple of 1000 millis to complete? It seems to me that it is probably better to just use a light weight apache which is more parallel and easier for such applications. My questions is how slow in seconds can a CGI be, before it is too slow for Mod_Perl to help? This whole line of reasoning assumes that: 1) The CGI cannot be sped up by caching or leaving stuff resident in memory. 2) The CGI doesn't take seconds to load itself in memory in addition to its seconds of time that it takes to run.
Re: A few pointers, please.
password as expected. It all works. However, my customer has asked for either a timeout, a [Logout] button, or both so that the browser basically 'forgets' the user id. This would then remove the requirement for the user to close down the browser when they leave their system. Exactly. The Basic Authentication scheme requires that the username and password be sent with each request; most browsers store this information after it has been entered once, and hang onto it until they are closed down. The way I've done this in the past is to have a logout button that loads a page that's password-protected under another realm. It's kind of suboptimal, but it might serve as a starting point.
Re: A few pointers, please.
*lol* the ol' logout button. i went through that at work. what i did finally was use a session cookie and destroyed (expired) it. unless there was some way to set the remote_user env var. At 10:20 AM 11/20/99 -0800, [EMAIL PROTECTED] wrote: password as expected. It all works. However, my customer has asked for either a timeout, a [Logout] button, or both so that the browser basically 'forgets' the user id. This would then remove the requirement for the user to close down the browser when they leave their system. Exactly. The Basic Authentication scheme requires that the username and password be sent with each request; most browsers store this information after it has been entered once, and hang onto it until they are closed down. The way I've done this in the past is to have a logout button that loads a page that's password-protected under another realm. It's kind of suboptimal, but it might serve as a starting point. Angel R. Rivera, [EMAIL PROTECTED] PGP Public Key at: ldap://certserver.pgp.com, http://pgpkeys.mit.edu:11371 Thawte Freemail Member [EMAIL PROTECTED] -- Pax huic domui, omnibus habitantibus in ea.
Re: Problems with mod_perl 1.2.1 and apache 1.3.9 - newbie - Please help!
I actually had the same message compiling on a RH 6.0 system, but the problem wasn't the compiler, it was that I was installing dbm support and I was lacking the required gdbm source files. You could be experiencing a similar problem. Thanks, Tim Tompkins -- Programmer / IS Technician http://www.arttoday.com/ - Original Message - From: Scott Chapman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 19, 1999 12:13 AM Subject: Problems with mod_perl 1.2.1 and apache 1.3.9 - newbie - Please help! I'm new to compiling my own software and attempting to get mod_perl and apache to work together. I have Redhat 6.0. I thought this was supposed to use gcc, not cc and I am getting no make action when it's done. I would _greatly_ appreciate any help on resolving this. I'm teaching myself Embperl and want it to have Virtual Logging. It appears that it must be a Apache module in order to enable this feature. I have the following directories in /usr/src mod_perl-1.21 apache_1.3.9 I just did gzip -d on the .gz files and then tar -xvf on the subsequent tar files. Then I went to the mod_perl-1.21 directory and did: $ perl Makefile.PL \ APACHE_PREFIX=/www \ DO_HTTPD=1 \ USE_APACI=1 \ EVERYTHING=1 makeout.log 21 Makeout.log is here: Will run tests as User: 'nobody' Group: 'root' Configuring for Apache, Version 1.3.9 + using installation path layout: Apache (config.layout) + activated perl module (modules/perl/libperl.a) Creating Makefile Creating Configuration.apaci in src + id: mod_perl/1.21 + id: Perl/5.00503 (linux) [perl] Creating Makefile in src + configured for Linux platform + setting C pre-processor to cc -E + checking for system header files + adding selected modules o perl_module uses ConfigStart/End + mod_perl build type: OBJ + setting up mod_perl build environment + adjusting Apache build environment + enabling Perl support for SSI (mod_include) + checking sizeof various data types + doing sanity check on compiler and options ** A test compilation with your Makefile configuration ** failed. This is most likely because your C compiler ** is not ANSI. Apache requires an ANSI C Compiler, such ** as gcc. The above error message from your compiler ** will also provide a clue. Aborting! Will configure via APACI cp apaci/Makefile.libdir ./apache_1.3.9/src/modules/perl/Makefile.libdir cp apaci/Makefile.tmpl ../apache_1.3.9/src/modules/perl/Makefile.tmpl cp apaci/README ../apache_1.3.9/src/modules/perl/README cp apaci/configure ../apache_1.3.9/src/modules/perl/configure cp apaci/libperl.module ./apache_1.3.9/src/modules/perl/libperl.module cp apaci/mod_perl.config ./apache_1.3.9/src/modules/perl/mod_perl.config cp apaci/mod_perl.config.sh ./apache_1.3.9/src/modules/perl/mod_perl.config.sh cp apaci/load_modules.pl.PL ./apache_1.3.9/src/modules/perl/load_modules.pl.PL cp apaci/find_source.PL ./apache_1.3.9/src/modules/perl/find_source.PL [everything snipped].enabled (cd ../apache_1.3.9 CC="cc" ./configure --activate-module=src/modules/perl/libperl.a --prefix=/www) Checking CGI.pm VERSION..ok Checking for LWP::UserAgent..ok Checking for HTML::HeadParserok Writing Makefile for Apache Writing Makefile for Apache::Connection Writing Makefile for Apache::Constants Writing Makefile for Apache::File Writing Makefile for Apache::Leak Writing Makefile for Apache::Log Writing Makefile for Apache::ModuleConfig Writing Makefile for Apache::PerlRunXS Writing Makefile for Apache::Server Writing Makefile for Apache::Symbol Writing Makefile for Apache::Table Writing Makefile for Apache::URI Writing Makefile for Apache::Util Writing Makefile for mod_perl Then I ran make make.log 21 Make.log is here: (cd ../apache_1.3.9 make) make[1]: Entering directory `/usr/src/apache_1.3.9' === src make[2]: Entering directory `/usr/src/apache_1.3.9' make[3]: Entering directory `/usr/src/apache_1.3.9/src' make[3]: *** No rule to make target `all'. Stop. make[3]: Leaving directory `/usr/src/apache_1.3.9/src' make[2]: *** [build-std] Error 2 make[2]: Leaving directory `/usr/src/apache_1.3.9' make[1]: *** [build] Error 2 make[1]: Leaving directory `/usr/src/apache_1.3.9' make: *** [apaci_httpd] Error 2 -- Scott Chapman Technical Support Specialist Lund Performance Solutions [EMAIL PROTECTED] or [EMAIL PROTECTED] Phone: 541-926-3800 www.lund.com
PerlSetVar precedence questions
Hi, I'm wondering about a precedence issue with PerlSetVar. Suppose I have the following setup: in docroot/.htaccess: PerlSetVar Lemon Tasty in docroot/dir/.htaccess: PerlSetVar Lemon Sour Which one is supposed to be present when I request, say, docroot/dir/file.html? My intuition tells me that $r-dir_config("Lemon") should be "Sour", but experimentation is giving me strange results. In some cases the subdirectory takes precedence, in others the parent directory does. What's the standard here? ------ Ken Williams Last Bastion of Euclidity [EMAIL PROTECTED]The Math Forum