Re: cgi-object not cacheable
On Tue, Nov 13, 2001 at 09:18:04PM -0500, Perrin Harkins wrote: One run of my script takes about 2 seconds. This includes a lot of database-queries, calculations and so on. about 0.3 seconds are used just for one command: $query=new CGI; That's really awfully slow. Are you positive it's running under mod_perl? Have you considered using Apache::Request instead of CGI.pm? its definitely running under mod_perl. But imho the time it takes to create a new cgi-object should not depend too much wheter its running under mod_perl or not, cause the CGI-module is loaded before. (In fact I load in httpd.conf using PerlModule-Directive) This is not a problem of my persistent variables, cause this works with many other objects like db-handles (cant use Apache::DBI cause this keeps to many handles opened, so I need to cache and pool on my own), filehandles etc. Whoa, you can't use Apache::DBI but you can cache database handles yourself? That doesn't make any sense. What are you doing in your caching that's different from what Apache::DBI does? This makes very much sense. Apache::DBI does not limit the number of persistent connections. It just keeps all the connections open per apache-process. This will sum up to about 20 open database-connections, each having one postgres-client running 'idle in transaction' - and my old small serversystem is going weak. So I cant cache all connections, but only a limited number and so I cache on my own :) Beside: it is done with a few lines of code, so it wasnt much work either: if (exists($ptr-{global}-{dbhandles}-{_some_id_string})) { $dbh=$ptr-{global}-{dbhandles}-{_some_id_string}; $dbh or err($ptr,19); # there must have been something wrong internally if (not $dbh-ping) {$connect=1;$r='reconnect'} # we just reconnect .. $dbh and $dbh-rollback; # this issue a new begin-transaction and avoid several problem with 'current_timestamp' that dedlivers the value # of the time at the beginning of the transaction, even if this is hours ago. see TROUBLEREPORT1 $r= stored if $r eq '-'; } else {$connect=1;} if ($connect) { $dbh=DBI-connect(connectinformation) } and on exit I just disconnect all handles but keeping a specified amount. I would prefer to handle this in a special pooling-module like Apache::DBI is, but where one can specify a maximum number of open connections and a timeout per connection (connection will be terminated after it was not used a specified amount of time). As soon as I get IPC::Sharable to work I'll consider writing such a thingy. best, peter -- mag. peter pilsl phone: +43 676 3574035 fax : +43 676 3546512 email: [EMAIL PROTECTED] sms : [EMAIL PROTECTED] pgp-key available
apache restart messages question
I am getting these error messages when I restart apache on a new mod perl install. Starting httpd: Subroutine export redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Constants.pm line 35. Subroutine name redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Constants.pm line 46. Subroutine Apache::Constants::__AUTOLOAD redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/mod_perl.pm line 14. Subroutine Apache::Constants::SERVER_VERSION redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/mod_perl.pm line 14. Subroutine Apache::Constants::SERVER_BUILT redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/mod_perl.pm line 14. Subroutine Apache::Constants::DECLINE_CMD redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/mod_perl.pm line 14. Subroutine Apache::Constants::DIR_MAGIC_TYPE redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/mod_perl.pm line 14. Constant subroutine OK redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/mod_perl.pm line 65535. Constant subroutine DECLINED redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Constants.pm line 65535. Constant subroutine DONE redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Constants.pm line 65535. Constant subroutine NOT_FOUND redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Constants.pm line 65535. Constant subroutine FORBIDDEN redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Constants.pm line 65535. Constant subroutine AUTH_REQUIRED redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Constants.pm line 65535. Constant subroutine SERVER_ERROR redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Constants.pm line 65535. Subroutine AUTOLOAD redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Constants.pm line 30. Constant subroutine AUTH_REQUIRED redefined at /usr/lib/perl5/5.6.0/Carp.pm line 4 Constant subroutine DONE redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Constants.pm line 4 Constant subroutine SERVER_ERROR redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Constants.pm line 4 Constant subroutine NOT_FOUND redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Constants.pm line 4 Constant subroutine FORBIDDEN redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Constants.pm line 4 Constant subroutine OK redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Constants.pm line 4 Constant subroutine DECLINED redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Constants.pm line 4 Subroutine handler redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Registry.pm line 27. Subroutine compile redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Registry.pm line 174. Subroutine parse_cmdline redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Registry.pm line 190. Subroutine DESTROY redefined at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Registry.pm line 214. [ OK ] Here is my perl conf file. Alias /perl/ /home/www/dvdsex4u/perl/ PerlModule Apache::Registry Location /perl SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI allow from all PerlSendHeader On /Location #This bit of code, causes apache to exit gracefully on any request for Microshit files: nimbda fighter PerlModule Apache::Constants LocationMatch \.(ida|exe|dll|asp)$ SetHandler perl-script PerlInitHandler Apache::Constants::DONE /LocationMatch PerlRequire /etc/httpd/conf/perl_conf/startup.pl PerlFreshRestart On PerlWarn On I have this same setup on another server and it starts and works fine. The server appears to have started. Should I just disreguard these messages. thanks John michael - Original Message - From: Peter Pilsl [EMAIL PROTECTED] To: Perrin Harkins [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, November 14, 2001 3:03 AM Subject: Re: cgi-object not cacheable On Tue, Nov 13, 2001 at 09:18:04PM -0500, Perrin Harkins wrote: One run of my script takes about 2 seconds. This includes a lot of database-queries, calculations and so on. about 0.3 seconds are used just for one command: $query=new CGI; That's really awfully slow. Are you positive it's running under mod_perl? Have you considered using Apache::Request instead of CGI.pm? its definitely running under mod_perl. But imho the time it takes to create a new cgi-object should not depend too much wheter its running under mod_perl or not, cause the CGI-module is loaded before. (In fact I load in httpd.conf using PerlModule-Directive) This is not a problem of my persistent variables, cause this works with many other objects like db-handles (cant use Apache::DBI cause this keeps to many handles opened, so I need to cache and pool on my own), filehandles etc. Whoa, you can't use Apache::DBI but you can cache database handles yourself? That doesn't make any sense. What are you doing in your caching that's different from what Apache::DBI
mod_perl.so not built after building mod_perl
Hello, I have a Solaris machine System Configuration: OS: SUN Solaris I have installed Apache ver 1.3.9 I have also installed mod_perl -1.26. However when I make the mod_perl package I do not get the mod_perl.so file. Could anyone tell the reason for this? regards, Pratiksha ** The information contained in this message or any of its attachments may be confidential and is intended for the exclusive use of the addressee(s). Any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited without the express permission of the sender. The views expressed in this email are those of the individual and not necessarily those of Sony or Sony affiliated companies. Sony email is for business use only. This email and any response may be monitored by Sony UK. If you have received this transmission in error, please contact our Helpdesk by email on [EMAIL PROTECTED] (04) **
Re: mod_perl.so not built after building mod_perl
You need select the option for dso on configuring. See the docs for your required installation, may help you. http://perl.apache.org/guide/install.html#Build_mod_perl_as_a_DSO_inside_t http://httpd.apache.org/docs/dso.html Currently, i am doing it for Linux 6.2 (Redhat). Best of luck. -SubbaReddy - Original Message - From: Manjrekar Pratiksha [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 14, 2001 4:09 AM Subject: mod_perl.so not built after building mod_perl Hello, I have a Solaris machine System Configuration: OS: SUN Solaris I have installed Apache ver 1.3.9 I have also installed mod_perl -1.26. However when I make the mod_perl package I do not get the mod_perl.so file. Could anyone tell the reason for this? regards, Pratiksha ** The information contained in this message or any of its attachments may be confidential and is intended for the exclusive use of the addressee(s). Any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited without the express permission of the sender. The views expressed in this email are those of the individual and not necessarily those of Sony or Sony affiliated companies. Sony email is for business use only. This email and any response may be monitored by Sony UK. If you have received this transmission in error, please contact our Helpdesk by email on [EMAIL PROTECTED] (04) **
Re: PPerl
PPerl is written in C and from a superficial look at the source code I'd say it's not very difficult to understand. If you want a pure perl solution take a look at POE (its being worked on ithreads these days but can use event driven fork) or consider writing something yourself. I guess the whole idea is in using socets and selects for waiting and then using eval on your end code. -- Regards, mire perl -Mstrict -e 'print pack(h*, d69627560496e616d656e236f6d6),\n'
RE: PPerl
-Original Message- From: Miroslav Madzarevic [mailto:[EMAIL PROTECTED]] PPerl is written in C and from a superficial look at the source code I'd say it's not very difficult to understand. The stub is written in C. That's the point. You need a very fast, light C stub, because the time is taken up by compiling the perl code, not in forking these days. If you want a pure perl solution take a look at POE (its being worked on ithreads these days but can use event driven fork) or consider writing something yourself. Doesn't help. You still need something to call into your daemon. If that's perl code you're going to have similar (though not necessarily identical) slow startup problems. (note that I think POE is great, but it's the wrong solution here) Matt. _ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service.
how to install the XML::LibXSLT along with libxslt?
I am very sorry to apache mail list, becuase of posting the not related query. So, i am epxecting help from successfully work one. And Daniel is the author of this, so i am directly posting him. I apologise for inconvenience. I am trying to install XML::LibXML but for that, first I need to install the libxslt-1.0.6 For this I have installed libxml2-2.4.7-1.i386.rpm And how to set XPath, after installing this libxml2-2.4.7-i386.rpm ? I saw in README file in libxslt-1.0.6 bundle. i.e., XSLT support for libxml2 http://xmlsoft.org/ Requires libxml2 = 2.3.6 with XPath support. It won't even compileotherwise.Check the FEATURES file for informations about completenessCheck the Changelog too to keep track of progresses. report bugs to [EMAIL PROTECTED] or on the bugzilla.gnome.org base. Daniel Veillard [EMAIL PROTECTED] So, while installing libxslt-1.0.6 i am getting error atlast, that is " checking for libxml libraries = 2.4.7... ./configure: xml2-config: command not found " [root@qclinux libxslt-1.0.6]# ./configureloading cache ./config.cachechecking for a BSD compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking whether make sets ${MAKE}... yeschecking for working aclocal... foundchecking for working autoconf... foundchecking for working automake... foundchecking for working autoheader... foundchecking for working makeinfo... foundchecking whether to enable maintainer-specific portions of Makefiles... nochecking for gcc... gccchecking whether the C compiler (gcc ) works... yeschecking whether the C compiler (gcc ) is a cross-compiler... nochecking whether we are using GNU C... yeschecking whether gcc accepts -g... yeschecking for POSIXized ISC... nochecking for gcc... (cached) gccchecking whether the C compiler (gcc -g -O2 ) works... yeschecking whether the C compiler (gcc -g -O2 ) is a cross-compiler... nochecking whether we are using GNU C... (cached) yeschecking whether gcc accepts -g... (cached) yeschecking how to run the C preprocessor... gcc -Echecking for ANSI C header files... yeschecking for Cygwin environment... nochecking for mingw32 environment... nochecking host system type... i686-pc-linux-gnuchecking build system type... i686-pc-linux-gnuchecking for ld used by GCC... /usr/bin/ldchecking if the linker (/usr/bin/ld) is GNU ld... yeschecking for /usr/bin/ld option to reload object files... -rchecking for BSD-compatible nm... /usr/bin/nm -Bchecking whether ln -s works... yeschecking how to recognise dependant libraries... pass_allchecking for object suffix... ochecking for executable suffix... nochecking command to parse /usr/bin/nm -B output... okchecking for dlfcn.h... yeschecking for ranlib... ranlibchecking for strip... stripchecking for objdir... .libschecking for gcc option to produce PIC... -fPICchecking if gcc PIC flag -fPIC works... yeschecking if gcc static flag -static works... yeschecking if gcc supports -c -o file.o... yeschecking if gcc supports -c -o file.lo... yeschecking if gcc supports -fno-rtti -fno-exceptions... yeschecking whether the linker (/usr/bin/ld) supports shared libraries... yeschecking how to hardcode library paths into programs... immediatechecking whether stripping libraries is possible... yeschecking dynamic linker characteristics... GNU/Linux ld.sochecking if libtool supports shared libraries... yeschecking whether -lc should be explicitly linked in... nocreating libtoolchecking for sys/types.h... yeschecking for sys/time.h... yeschecking for stdlib.h... yeschecking for unistd.h... yeschecking for string.h... yeschecking for ieeefp.h... nochecking for nan.h... nochecking for math.h... yeschecking for fp_class.h... nochecking for float.h... yeschecking for ansidecl.h... yeschecking for time.h... yeschecking for sys/stat.h... yeschecking for stat... yeschecking for _stat... nochecking for isnan... yeschecking for isinf... yeschecking for pow... nochecking for pow in -lm... yeschecking for floor... nochecking for pow in -lm... (cached) yeschecking for fabs... nochecking for pow in -lm... (cached) yeschecking for gettimeofday... yeschecking for mktime... yeschecking for localtime... yeschecking for asctime... yeschecking for time... yeschecking for gmtime... yeschecking for perl... perlchecking for libxml libraries = 2.4.7... ./configure: xml2-config: command not found./configure: test: integer expression expected before -geconfigure: error: You need at least libxml2 2.4.7 for this version of libxslt Please, help me. -SubbaReddy
Re: how to install the XML::LibXSLT along with libxslt?
At 08:03 PM 11/14/01 -0800, SubbaReddy M wrote: Maybe a question for the libxml2 list instead of mod_perl? So, while installing libxslt-1.0.6 i am getting error atlast, that is " checking for libxml libraries >= 2.4.7... ./configure: xml2-config: command not found " Did you make install libxml2? > which xml2-config /usr/local/bin/xml2-config Bill Moseley mailto:[EMAIL PROTECTED]
RE: how to install the XML::LibXSLT along with libxslt?
You also need libxml2-devel, same for libxslt. This is covered in the INSTALL file. PS: PLEASE! Stop posting in HTML format. It makes it incredibly difficult at this end. Matt. -- :-Get a smart net/:- -Original Message- From: SubbaReddy M [mailto:[EMAIL PROTECTED]] Sent: 15 November 2001 04:03 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: how to install the XML::LibXSLT along with libxslt? I am very sorry to apache mail list, becuase of posting the not related query. So, i am epxecting help from successfully work one. And Daniel is the author of this, so i am directly posting him. _ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service.
Re: how to install the XML::LibXSLT along with libxslt?
This rings a bell. I recently had to isntall libxml2-2.45 with libxslt-1.04 on a solaris box. I remember getting warnings when trying to install libxslt telling me that the version of libxml was not up to date. Fix to this involved using the: --with-libxml-prefix=[PFX]Specify location of libxml option when running configure. For some reason it wasn't by default using /usr/local/lib/..whatever. Fixed the problem though. On Wed, 14 Nov 2001, SubbaReddy M wrote: I am very sorry to apache mail list, becuase of posting the not related query. So, i am epxecting help from successfully work one. And Daniel is the author of this, so i am directly posting him. I apologise for inconvenience. I am trying to install XML::LibXML but for that, first I need to install the libxslt-1.0.6 For this I have installed libxml2-2.4.7-1.i386.rpm And how to set XPath, after installing this libxml2-2.4.7-i386.rpm ? I saw in README file in libxslt-1.0.6 bundle. i.e., XSLT support for libxml2 http://xmlsoft.org/ Requires libxml2 = 2.3.6 with XPath support. It won't even compile otherwise. Check the FEATURES file for informations about completeness Check the Changelog too to keep track of progresses. report bugs to [EMAIL PROTECTED] or on the bugzilla.gnome.org base. Daniel Veillard [EMAIL PROTECTED] So, while installing libxslt-1.0.6 i am getting error atlast, that is checking for libxml libraries = 2.4.7... ./configure: xml2-config: command not found [root@qclinux libxslt-1.0.6]# ./configure loading cache ./config.cache checking for a BSD compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking whether make sets ${MAKE}... yes checking for working aclocal... found checking for working autoconf... found checking for working automake... found checking for working autoheader... found checking for working makeinfo... found checking whether to enable maintainer-specific portions of Makefiles... no checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking for POSIXized ISC... no checking for gcc... (cached) gcc checking whether the C compiler (gcc -g -O2 ) works... yes checking whether the C compiler (gcc -g -O2 ) is a cross-compiler... no checking whether we are using GNU C... (cached) yes checking whether gcc accepts -g... (cached) yes checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for Cygwin environment... no checking for mingw32 environment... no checking host system type... i686-pc-linux-gnu checking build system type... i686-pc-linux-gnu checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependant libraries... pass_all checking for object suffix... o checking for executable suffix... no checking command to parse /usr/bin/nm -B output... ok checking for dlfcn.h... yes checking for ranlib... ranlib checking for strip... strip checking for objdir... .libs checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.lo... yes checking if gcc supports -fno-rtti -fno-exceptions... yes checking whether the linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether -lc should be explicitly linked in... no creating libtool checking for sys/types.h... yes checking for sys/time.h... yes checking for stdlib.h... yes checking for unistd.h... yes checking for string.h... yes checking for ieeefp.h... no checking for nan.h... no checking for math.h... yes checking for fp_class.h... no checking for float.h... yes checking for ansidecl.h... yes checking for time.h... yes checking for sys/stat.h... yes checking for stat... yes checking for _stat... no checking for isnan... yes checking for isinf... yes checking for pow... no checking for pow in -lm... yes checking for floor... no checking for pow in -lm... (cached) yes checking for fabs... no checking for pow in -lm... (cached) yes checking for gettimeofday... yes checking for mktime... yes checking for localtime... yes checking for asctime... yes checking for time... yes checking for gmtime... yes checking for
Apache causes exception when a module calls die
Hi All, I am expriencing a problem using apache 1.3.20 binary distribution for win32. This problem both occurs on Windows98 as well as WindowsNT Server (SP6a). I also use HTML::Mason 1.25 and the XML::parser. Inside one of the modules there is an eval block. In the code executed withing this eval block there is a die that is called when an operation failed. This die causes the Apache child process to crash and generates an Dr. Watson message. Also the $m-abort() method of mason (which implements a die) causes this error to occur. Anyone familiar with this problem? Any solutions? Thanks in Advance, Maarten.
Re: [challenge] new mod_perl site
On Wednesday 14 November 2001 03:27, Perrin Harkins wrote: What about an additional requirement: The site should be validated sucessfully by validator.w3.org Maybe we should give the horse a chance to catch up to the cart... Once there is a design that people are satisfied with, you are more than welcome to submit patches to fix validation problems. Agreed, but it's far easier to start cleanly. Fixing designer-code can be insanely hard and time consuming. Be strict in what you... and all that. -- ___ Robin Berjon [EMAIL PROTECTED] -- CTO k n o w s c a p e : // venture knowledge agency www.knowscape.com --- I think... I think it's in my basement... Let me go upstairs and check. -- Escher
Re: [challenge] new mod_perl site
Robin Berjon wrote: On Wednesday 14 November 2001 03:27, Perrin Harkins wrote: What about an additional requirement: The site should be validated sucessfully by validator.w3.org Maybe we should give the horse a chance to catch up to the cart... Once there is a design that people are satisfied with, you are more than welcome to submit patches to fix validation problems. Agreed, but it's far easier to start cleanly. Fixing designer-code can be insanely hard and time consuming. Be strict in what you... and all that. Robin, May be I was not clear. You can change whatever you want in the templates. There is no design at this moment! Scratch what you see and make a new one. The only requirement was to keep the navigation (which is very minimal) as is, while you can decorate the navigation any way you want (these are just hyperlinks!). The use of Splash library for widgets was just to make it easier to construct and maintain the site. If you don't feel like using it, fine but please make the templates maintainable in the text editor. In any case if you look at the templates, they are bare bones. So it shouldn't be time consuming and of course it's not insanely hard. I think you didn't look at the source before saying what you've said. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: [challenge] new mod_perl site
On Wednesday 14 November 2001 16:55, Stas Bekman wrote: Robin Berjon wrote: On Wednesday 14 November 2001 03:27, Perrin Harkins wrote: Maybe we should give the horse a chance to catch up to the cart... Once there is a design that people are satisfied with, you are more than welcome to submit patches to fix validation problems. Agreed, but it's far easier to start cleanly. Fixing designer-code can be insanely hard and time consuming. Be strict in what you... and all that. May be I was not clear. You can change whatever you want in the templates. There is no design at this moment! Scratch what you see and make a new one. Stas, maybe it's me that wasn't clear :-) When I said designer-code, I didn't mean _your_ code, I meant something that someone would submit that wouldn't be clean (X)HTML. In any case if you look at the templates, they are bare bones. So it shouldn't be time consuming and of course it's not insanely hard. I think you didn't look at the source before saying what you've said. I didn't say that ! I was answering (what I understood from) Perrin's email that said that maybe people should submit their design in whatever form they want (ie with whatever degree of code cleanliness) and once we have a good design we can clean that up. I'm not against that approach, but I think it's easier to have clean code to start with (again, in the submissions made to the contest, I wasn't referring to your code _at_all_). You want the templates to be editable in a text editor, and I think that's a very good requirement. Clean code to start with will make that a lot easier. Also, this is not the web of '95 anymore. Gradually, HTML is having a chance of becoming less of a dirty word. I'm suggesting we do our small part in helping progress. -- ___ Robin Berjon [EMAIL PROTECTED] -- CTO k n o w s c a p e : // venture knowledge agency www.knowscape.com --- Radioactive cats have 18 half-lives.
Apache::PerlRun und Prototypes
Hi, I just found that one of our Perl scripts used CORE::exit, I changed that and found a whole bunch of problems. The biggest one is, that Apache::PerlRun doesn't seem to like prototypes. It runs the script some times but will eventually fail with [Wed Nov 14 17:05:00 2001] [error] PerlRun: `[Wed Nov 14 17:05:00 2001] Subs.pl: [Wed Nov 14 17:05:00 2001] Subs.pl: Not a CODE reference at /opt/y/cgi-bin/Sources/MJTools.pl line 110. [Wed Nov 14 17:05:00 2001] Subs.pl: Compilation failed in require. ' MJTools.pl:110 is fclose(F); Subs.pl is sub fclose ($) { I removed all prototypes and this problem was gone. Oh, BTW: The mentioned files and line number doesn't always relate to the problem. Another point was this construct: use subs 'exit'; sub exit { [...] CORE::exit( $_[0] || 0 ); } eval { main; # uses exit() at about 100 places }; if ($@) { fatal_error(Untrapped Error:BR $@); } I'm still not sure how to change that The Right Way to work with mod_perl, but the following works. Maxbe someone has a better idea? use subs 'exit'; sub exit { [...] Apache::exit(0); # 0=OK, -2=DONE } eval { main; }; if ($@ =~ /^\S+at /s) { fatal_error(Untrapped Error:BR $@); } Apache::exit(0); Yes, both Apache::exits are needed. If I leave the first one a CORE::exit, the child really exits, if I leave out the second, it would 500... Michael
RE: Re: cgi-object not cacheable
Check out the docs at: http://stein.cshl.org/WWW/software/CGI/#mod_perl There's specific notes on how to make CGI.pm play nicely with mod_perl. -- === If you put three drops of poison into a 100 percent pure Java, you get - Windows. If you put a few drops of Java into Windows, you still have Windows. -- Sun Microsystems CEO, Scott McNealy __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
Re: [challenge] new mod_perl site
Robin Berjon wrote: On Wednesday 14 November 2001 16:55, Stas Bekman wrote: Robin Berjon wrote: On Wednesday 14 November 2001 03:27, Perrin Harkins wrote: Maybe we should give the horse a chance to catch up to the cart... Once there is a design that people are satisfied with, you are more than welcome to submit patches to fix validation problems. Agreed, but it's far easier to start cleanly. Fixing designer-code can be insanely hard and time consuming. Be strict in what you... and all that. May be I was not clear. You can change whatever you want in the templates. There is no design at this moment! Scratch what you see and make a new one. Stas, maybe it's me that wasn't clear :-) When I said designer-code, I didn't mean _your_ code, I meant something that someone would submit that wouldn't be clean (X)HTML. In any case if you look at the templates, they are bare bones. So it shouldn't be time consuming and of course it's not insanely hard. I think you didn't look at the source before saying what you've said. I didn't say that ! I was answering (what I understood from) Perrin's email that said that maybe people should submit their design in whatever form they want (ie with whatever degree of code cleanliness) and once we have a good design we can clean that up. I'm not against that approach, but I think it's easier to have clean code to start with (again, in the submissions made to the contest, I wasn't referring to your code _at_all_). You want the templates to be editable in a text editor, and I think that's a very good requirement. Clean code to start with will make that a lot easier. Also, this is not the web of '95 anymore. Gradually, HTML is having a chance of becoming less of a dirty word. I'm suggesting we do our small part in helping progress. Oh, OK, so we think the same way. I think what Perrin was trying to say is that we should stop talking and get things moving. Once we decide on the best design, others can send patches to make sure that the design is valid, etc. All three of us are saying the same: If you[1] don't like the way the site is now, don't bitch about it but change it completing the challenge. I think I've prepared a good infrastructure for accomplishing this goal. it's not perfect but it's a good start. Now just throw in your talent and create this very cool-slick-eye-candy site, as long as you adher to the rules I've listed in the original challenge. [1] you == all those who care, have a little time on their hands, and know-how. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
RE: [challenge] new mod_perl site
If you[1] don't like the way the site is now, don't bitch about it but change it completing the challenge. Well, I'd be up to having a crack at it... Would you be ok publishing the site with AxKit? Coding websites with it is so easy! Robin, are you with me on that one? Antoine
solved, sorry (was Re: missing /virtualhost directive)
sorry for the derangement, i solved it today thanks anyway! Thomas Bach think karo... bkaro.net At 23:59 13/11/01 +0100, Thomas Bach wrote: Hello We're running a cobalt raq4 and have some problems with the apache configuration. the configuration over the web-interface works all fine, but when i add some lines in the httpd.conf for the mod_perl-things (p.ex. PerlInitHandler Apache::Reload PerlModule Apache::Registry) and some handlers of myself, a restart succeeds, but with the message: mod_perl: /VirtualHost mod_perl: Missing /VirtualHost directive at end-of-file chiliasp: module started, version 3.5.2.31 /usr/sbin/httpd and the cobalt-web-interface for server administration isn't available over the ../admin/ adress, which should be rewritten by a rule written in some $PerlConfig-Variable which is filled in a Perl /Perl - part of the httpd.conf do you have any hints? i don't know this server really good, but it seems to me that it should be obvious for people working with it ... thanks alot in advance! Thomas Bach think karo... bkaro.net
Re: cgi-object not cacheable
On Wed, Nov 14, 2001 at 10:39:36AM -0500, Perrin Harkins wrote: its definitely running under mod_perl. But imho the time it takes to create a new cgi-object should not depend too much wheter its running under mod_perl or not, cause the CGI-module is loaded before. (In fact I load in httpd.conf using PerlModule-Directive) If it was running under CGI, it would be compiling CGI.pm on each request, which I've seen take .3 seconds. Taking that long just to create the new CGI instance seems unusual. How did you time it? Are you using Apache::DProf? Wouldnt it be compiled at the use-statement ? I timed it using module-internal loggingfunction which use time::hires. This makes very much sense. Apache::DBI does not limit the number of persistent connections. It just keeps all the connections open per apache-process. That should mean one connection per process if you're connecting with the same parameters every time. in my case it means up to 4 connections per process, cause in fact it is not one module but 2 (input and output) and each needs to handle 2 different connections. if (exists($ptr-{global}-{dbhandles}-{_some_id_string})) You know that this is only for one process, right? If you limit this cache to 20 connections, you may get hundreds of connections. yes, thats why I limit it to 1 or even 0. I would prefer to handle this in a special pooling-module like Apache::DBI is, but where one can specify a maximum number of open connections and a timeout per connection (connection will be terminated after it was not used a specified amount of time). You can just set a timeout in your database server. If a connection times out and then needs to be used, the ping will fail and Apache::DBI will re-connect. thats an interesting idea. I experienced crashes on ping to dead connections under DBD::Pg but this is worth to check. As soon as I get IPC::Sharable to work I'll consider writing such a thingy. You can't share database handles over IPC::Shareable, but you could share a global number tracking how many total database handles exist. However, I think you'd be better off using Apache::DBI and limiting the number of Apache children to the number of connections your database can deal with. I hope to share databasehandles via IPC. One has to avoid that only one process writes to a handle at the same time !! (hope I'm right here) This would offer possibilities to create a pool of handles with limited max. number and clientsided timeouts. If a process requests a handle and there is one cached in the pool it will give this handle back. Otherwise it will create a new handle or - if max. number is reached - return 0. The calling application can then decide to print an excuse due to the user 'cause we are so popular we cant server you :)' or create and destroy a temporary handle to process the request. This would be something I would actually prefer to Apache::DBI, but I dont know if its possible, but I'll try. Such a thing would be very important, especially on slow servers with less ram, where Apache::DBI opens to many connections in peak-times and leaves the system in a bad condition ('to many open filehandles') peter ps: just if one is interested: today I was very happy to wear a helmet when I crashed with my bike ;) At least I can write this lines after my head touched the road. (well : it hurts in the arms when writing fast ;) -- mag. peter pilsl phone: +43 676 3574035 fax : +43 676 3546512 email: [EMAIL PROTECTED] sms : [EMAIL PROTECTED] pgp-key available
Re: [challenge] new mod_perl site
On Wednesday 14 November 2001 17:48, Antoine Quint wrote: If you[1] don't like the way the site is now, don't bitch about it but change it completing the challenge. Well, I'd be up to having a crack at it... Would you be ok publishing the site with AxKit? Coding websites with it is so easy! Robin, are you with me on that one? Hehe. I don't think you've made many friends here today ;-) Stas has chosen another solution, based on TT2. In a private discussion with him, he said that it should be trivial to get that system to export XML, which we could then import into another site (perhaps take23.org ?) so that we could have an AxKit based mirror of the site, with all the cool stuff us XML froods love. If you want to submit a design, by all means forge ahead. I for one know how cool your designs can be. Plus, I know it'll be clean code. But don't expect to have a chance to use XSLT there, you'll have to learn TT2 syntax, or find someone that will do the translation for you (I would, but I haven't used TT in way too long to remember). If that discourages you, then wait a little bit until we get the XML export, I'll definitely be with you on that one ;-) -- ___ Robin Berjon [EMAIL PROTECTED] -- CTO k n o w s c a p e : // venture knowledge agency www.knowscape.com --- Immature poets imitate, mature poets steal. -- T.S. Eliot
RE: mod_perl.so not built after building mod_perl
Hello again, As you suggested I have used apache1.3.22 version.. However I have the following problem: 1. While installing modperl v1.24, i got a warning message that apache1.3.0 is recommended..Should I go ahead with it?(since you recommended apache1.3.22) 2. I also tried apache v1.3.0 .During the process, I had to change my modperl version to 1.24_01. This again had quite some problems. Could you please suggest me a apache version as well as a mod_perl version compatible to it in the Solaris environment? Thanks in advance, regards, Pratiksha -Original Message- From: Wayne Pascoe [SMTP:[EMAIL PROTECTED]] Sent: 14 November 2001 13:17 To: [EMAIL PROTECTED] Cc: '[EMAIL PROTECTED]' Subject:Re: mod_perl.so not built after building mod_perl Manjrekar Pratiksha [EMAIL PROTECTED] writes: Hello, I have a Solaris machine System Configuration: OS: SUN Solaris I have installed Apache ver 1.3.9 If this is a new install, I would suggest using a newer version of apache (1.3.22 is current) unless you have compeling reasons not to. I have also installed mod_perl -1.26. However when I make the mod_perl package I do not get the mod_perl.so file. Could anyone tell the reason for this? How did you build mod_perl? I might be wrong, but most people I've spoken to advise against building mod_perl as a DSO module. If you are building mod_perl into Apache, then you won't get a .so file as it will be part of the httpd binary. (correct me if I'm wrong please someone :() -- - Wayne Pascoe | You know, it's simply not true that [EMAIL PROTECTED] | wars never settle anything - James Burnham http://www.penguinpowered.org.uk | ** The information contained in this message or any of its attachments may be confidential and is intended for the exclusive use of the addressee(s). Any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited without the express permission of the sender. The views expressed in this email are those of the individual and not necessarily those of Sony or Sony affiliated companies. Sony email is for business use only. This email and any response may be monitored by Sony UK. If you have received this transmission in error, please contact our Helpdesk by email on [EMAIL PROTECTED] (05) **
Re: cgi-object not cacheable
If it was running under CGI, it would be compiling CGI.pm on each request, which I've seen take .3 seconds. Taking that long just to create the new CGI instance seems unusual. How did you time it? Are you using Apache::DProf? Wouldnt it be compiled at the use-statement ? Yes, but when running under CGI (the protocol, not the module) that use statement is executed every time. I timed it using module-internal loggingfunction which use time::hires. That's usually pretty accurate, so I guess it really takes that long on your system. Try Apache::Request! Or even one of the lighter CGI modules like CGI_Lite. in my case it means up to 4 connections per process, cause in fact it is not one module but 2 (input and output) and each needs to handle 2 different connections. If you could reduce that, it would certainly help your application's performance. I hope to share databasehandles via IPC. One has to avoid that only one process writes to a handle at the same time !! IPC::Shareable, and most of the other options, use Storable to serialize data structures. Storable can't serialize an open socket. You *CAN* share sockets, but you'd have to write some custom C code to do it. You might look at the Sybase thing that was posted here recently. (I haven't looked at it yet, but it sounded interesting.) if max. number is reached - return 0. The calling application can then decide to print an excuse due to the user 'cause we are so popular we cant server you :)' or create and destroy a temporary handle to process the request. Even with temporary handles, you have the possibility of all servers being busy at once and thus using all 4 handles. This would be something I would actually prefer to Apache::DBI, but I dont know if its possible, but I'll try. Such a thing would be very important, especially on slow servers with less ram, where Apache::DBI opens to many connections in peak-times and leaves the system in a bad condition ('to many open filehandles') I still think you'd be better off just limiting the total number of servers with MaxClients. Put a reverse proxy in front and you'll offload all the work that doesn't require a database handle. ps: just if one is interested: today I was very happy to wear a helmet when I crashed with my bike ;) I guess my mother was right about that. Keep your helmet on! Glad you're not dead, Perrin
Re: [challenge] new mod_perl site
Robin Berjon wrote: On Wednesday 14 November 2001 17:48, Antoine Quint wrote: If you[1] don't like the way the site is now, don't bitch about it but change it completing the challenge. Well, I'd be up to having a crack at it... Would you be ok publishing the site with AxKit? Coding websites with it is so easy! Robin, are you with me on that one? Hehe. I don't think you've made many friends here today ;-) See, Robin is afraid of the angry crowd ;-) You have to hide now ;-) Stas has chosen another solution, based on TT2. In a private discussion with him, he said that it should be trivial to get that system to export XML, which we could then import into another site (perhaps take23.org ?) so that we could have an AxKit based mirror of the site, with all the cool stuff us XML froods love. Currently the rendering engine is not tied very tightly to the code, so once you come up with whatever other rendering engine you prefer we will generalize things and support it directly, and any other rendering engines that may be added in the future. I needed to get things done so I moved on with TT2 for the site generation, since I know it and it's a great toolkit. By all means do check the project out, see how you can put your expertise in and have everybody happy. My point is still that design has nothing to do with whether you do it with template toolkit, xml or what not. If it really prevents you from submitting your design, just send it in whatever way you prefer. It'll make be hard to integrate it then, but I hope that will be do-able. But let's move this discussion to the docset mailing list. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
RE: cgi-object not cacheable
That's usually pretty accurate, so I guess it really takes that long on your system. Try Apache::Request! Or even one of the lighter CGI modules like CGI_Lite. in my case it means up to 4 connections per process, cause in fact it is not one module but 2 (input and output) and each needs to handle 2 different connections. If you could reduce that, it would certainly help your application's performance. You should be able to recude that a fair pile. Unless you're connecting to multiple Boxes, via Multiple DBI-connect statements, you should be able to piggyback all requests to a given DB server down the one connection. SELECT fields FROM database.tablename ... I use that a fair bit to avoid the overhead of keeping an extra connection in Memory. If it's a function of userids, you should work with your DBA to ensure that one user account can do what's needed from the pages. I really can't imagine that you _need_ to connect to 4 different datasources in most pages. This would be something I would actually prefer to Apache::DBI, but I dont know if its possible, but I'll try. Such a thing would be very important, especially on slow servers with less ram, where Apache::DBI opens to many connections in peak-times and leaves the system in a bad condition ('to many open filehandles') I still think you'd be better off just limiting the total number of servers with MaxClients. Put a reverse proxy in front and you'll offload all the work that doesn't require a database handle. I agree with Perrin here. On my systems, the mod_perl processes never have a peak time where they start openning more connections, since I just configure Apache to start 110 Processes and never launch more than 110 Processes. The Database always has 110 connections to it. Just about the only time you *can't* use Apache::DBI is if you're deliberately re-connecting on page load. Typically the only reason you'd do this is if you were changing the authentication parameters of the connection based on the request data. In that case, Apache::DBI would prove no aid. If you're getting 'too many open filehandles' it sounds like there's some additional tuning to do on the OS level. FreeBSD needs to be tuned to properly run mod_perl, I suspect you may need to increase the Maxfiles and Maxfilesperproc (or whatever OS equiv) on your system. As Perrin says, just limit the number of httpd-Mod_perl processes, offload any and all text/images which is not request driven to a proxy system. --A attachment: winmail.dat
Doing Authorization using mod_perl from a programmers perspective
I am trying to create a website with predominantly dynamic content (mod_perl + DBI + mySQL) for an online community. I can manage Perl and mySQL fairly proficently, however I've no idea how to successfully create what I want using mod_perl and Apache (actually, I know next to nothing about them). --- Background information --- The website shall be split into a public and private section, and will share a common layout and appearance (although I might add little visual clues to indicate which section they are in). When members wish to login I want them to do so via the public section (from that page), and then be able to access the additional links/features of the private section. I wish to handle all the database actions in my own code, unless something fits perfectly. When members try to login, my aims are: 1. Check login name, and password. 2. Check member hasn't been suspended. 3. Return the membership ID number for the next stage. The membership ID number will be used to decide what access level the members have (what forums, tools etc they can see and use). The SQL table is specified as: CREATE TABLE access ( member_id int(10) unsigned NOT NULL, account_name varchar(16) NOT NULL, account_password varchar(16) NOT NULL, state enum('A', 'S') DEFAULT 'A' NOT NULL, PRIMARY KEY (account_name) ); Imagine I now create an object to wrap around this, with the following method: my $permission = $access-check($account_name, $account_password); which returns the membership number if valid, or the value -1 for a suspended account, or undef for no account. --- Questions --- 1. Can this be done (nicely) as a authentication/authorization handlier? 2. Do most hosting companies allow authentication/authorization handlers? (Using HostRocket at the moment). 3. What is the most appropriate session management system? I'm thinking of using cookies (client side) to store a session key, rather than resubmitting the password data. The server side stores this session key in the database. 4. How does the membership ID get passed to the next stage? 5. What is the time to do additional access checking (for senior/admin users)? I was planning to do it a little later on, but it is probably better to do it once (i.e. with this). 6. What is a realistic time to expect all this to happen in? I'm sure I've missed a few questions... Any help appriecated, especially links to relevent documentation. Jonathan Paton NB - Whilst my preferred answer to these questions is a coded solution, I have a restriction (self imposed) - I'd prefer to have full copyright on the final code, thus I ask any major ideas/code includes permission to use it freely - or else be good enough to be worth adding your name provide I use it :) __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com
Re: asp perl problem
Julian Martin wrote: Hi I am new to perl and would like to make a asp page with a script that will find all files in a given directory and create links to different files in another directory. The two sets of files are images (thumbnails and big pics) so I would also like to show the thumbnails on the page and have the links to the bigger pics. I already have all the images and do not need a thumbnail generator. I just want it so that when I add new images thats it. I am not asking for a complete answer only a pointer towards which functions would best do this job etc. Any help you can give would be great. Ju. This isn't really an Apache::ASP ( or modperl ) question, so in the future another forum should be used for posting perl questions of this nature like news:comp.lang.perl.misc ... for Apache::ASP issues the list is [EMAIL PROTECTED], subscribe at [EMAIL PROTECTED] # find all files in a given directory my @files = globa(/path/to/dir); # create a link to another file, see perldoc -f symlink symlink($old_file, $new_file) || die(can't symlink $old_file to $new_file: $!); If you are unix, and are more familiar with command line commands, then you can also do: my $output = `ln -s $old_file $new_file`; $output || die(error doing ln -s $old_file $new_file: $output); If glob() doesn't work on your platform, you can try opendir(), readdir(), closedir() Since it sounds like you are writing a gallery, you might try instead to use one already written like Apache::Gallery. --Josh _ Joshua Chamas Chamas Enterprises Inc. NodeWorks Founder Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Re: Doing Authorization using mod_perl from a programmers perspective
Hi there, On Wed, 14 Nov 2001, [iso-8859-1] Jonathan E. Paton wrote: I am trying to create a website [snip] NB - Whilst my preferred answer to these questions is a coded solution, [snip] We like people to think for themselves on this list. :) I'm sure I've missed a few questions... Read http://perl.apache.org/guide and Writing Apache Modules with Perl and C, ISBN 1-56592-567-X (otherwise known as the Eagle Book) which will answer almost all the questions you can think of, and a great many that you can't (yet). Some of your questions have no answer. Please don't ask questions that are answered in these publications on this list, people here have a habit of directing you to them for guidance. This implies a lot of patience on your part, because they are fairly lengthy and concentrated technical works, and not much patience on our part (for whatever reasons :). Despite the quip about thinking people above, there are lots of coded solutions in these books which you can adapt or otherwise mangle. TMTOWTDI y'know. 73, Ged.
RE: mod_perl.so not built after building mod_perl
Hi there, On Wed, 14 Nov 2001, Manjrekar Pratiksha wrote: Could you please suggest me a apache version as well as a mod_perl version compatible to it in the Solaris environment? If you search the mod_perl mailing list I'm sure you will find many references to Apache and mod_perl being used with Solaris. 73, Ged.
Re: [challenge] new mod_perl site
On Thu, 15 Nov 2001, Stas Bekman wrote: Antoine Quint wrote: If you[1] don't like the way the site is now, don't bitch about it but change it completing the challenge. Well, I'd be up to having a crack at it... Would you be ok publishing the site with AxKit? Coding websites with it is so easy! Antoine, reread my original post. We are talking about suggesting a *design*, not how the site should be published ;) Well, he offered to design it, using the tools he knows how to use best. Since you are asking for people to give of their time and skills, perhaps you should be less imperious about _how_ you want it done. Perhaps you should be less imperious in general. Your challenge came off to me as imperious enough that I wasn't interested in offering to help, anyways. For God's sake, you made it seem like not only had all the decisions been made already (by you), but that if I didn't use the right subject line format for my contributions, I might as well not bother! Remember that while you have been lucky enough to get a nice paycheck for jam_ph-ing, the folks whose expertise you are trying to solicit will be volunteering their time and work. Be nice! Lately your postings here seem to be preponderantly of a critical tone, more concerned with taking people to task for not using [OT] in their subject line, or whatever, than with providing assistance and support to those who are seeking it, as you used to do so well. No one doubts your commitment to mod_perl, or your hard -- and unpaid -- work on the guide and many other things. But if you want to be a leader who inspires people to collaborate and work as a team under your direction, you'd do well to work on bringing your people skills up to par with your technical skills, IMHO. Have a nice day :) -nick
Re: Doing Authorization using mod_perl from a programmers perspective
1. Can this be done (nicely) as a authentication/authorization handlier? Sure, or you could do it as part of another phase if it's easier for you. There are good exmples on CPAN or in the Eagle book. 2. Do most hosting companies allow authentication/authorization handlers? (Using HostRocket at the moment). Most hosting companies don't allow mod_perl. 3. What is the most appropriate session management system? I'm thinking of using cookies (client side) to store a session key, rather than resubmitting the password data. The server side stores this session key in the database. That sounds fine. There are examples of this in the book too. Make sure your session keys can't be forged. 4. How does the membership ID get passed to the next stage? It's typically stored in the session data. 5. What is the time to do additional access checking (for senior/admin users)? Impossible to answer. Totally depends on your setup. 6. What is a realistic time to expect all this to happen in? Also impossible to answer, since it depends on your developers and the full requirements. - Perrin
Re: [challenge] new mod_perl site
At 10:44 am -0800 14/11/01, Nick Tonkin wrote: No one doubts your commitment to mod_perl, or your hard -- and unpaid -- work on the guide and many other things. But if you want to be a leader who inspires people to collaborate and work as a team under your direction, you'd do well to work on bringing your people skills up to par with your technical skills, IMHO. uh oh. having just read this: http://www.geocrawler.com/lists/3/SourceForge/4/125/7038861/ I'm feeling rather nervous about silly insults directed at the leaders of open-source projects on which my livelihood depends. brickbats are the price of celebrity,i suppose, but i really don't think this one is justified at all. best will ps. i found the [challenge] quite persuasive, and the restrictions just a clear and sensible brief. but then i'm shallow and seek glory.
Re: Doing Authorization using mod_perl from a programmers perspective
Hi, Perrin Harkins wrote: 2. Do most hosting companies allow authentication/authorization handlers? (Using HostRocket at the moment). Most hosting companies don't allow mod_perl. I had fears about that one, since I thought Perl might not mean mod_perl - as I know mod_perl is rather cosy with Apache (that's the whole point). With the functionality I had in mind it'd take too long to compile them on the fly. Seemingly I can do Apache handlers though, so I *might* be okay. Looks like I may have to run it off my friends ADSL connection, as I'm stuck in 56k hell. That adds nice domain redirection and uptime problems (of ADSL) to my life ;-) 6. What is a realistic time to expect all this to happen in? Also impossible to answer, since it depends on your developers and the full requirements. My developers? - What's a developer? :P The best I've got are inexperienced amatures with relevatively little coding experience with Perl. Tough challenge eh? With some determination we'll get it finished by Christmas (not this year :P ) I rather ambigously asked the question: How many milliseconds might this stage take, on a commerial hosting company's servers. Suppose without mod_perl this would be at least 300ms, or probably worse. Ged Haywood wrote: I am trying to create a website [snip] NB - Whilst my preferred answer to these questions is a coded solution, [snip] We like people to think for themselves on this list. :) Okay, I forgot the smiley on that. I don't really expect anyone to code it for me, that's asking too much... unless people are willing to share what they've already done. I'd owe someone too many brownie points if they coded it for me. The Background was there for interest really, and to suggest what I'm trying to do. Please don't flame me, I'll go away... honest :P Jonathan Paton __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com
Re: Doing Authorization using mod_perl from a programmers perspective
Seemingly I can do Apache handlers though, so I *might* be okay. If you look at http://perl.apache.org/guide/, there's information on how to determine if you're really running mod_perl or not. If you can get a PerlHandler directive to work, you have mod_perl. I rather ambigously asked the question: How many milliseconds might this stage take, on a commerial hosting company's servers. Suppose without mod_perl this would be at least 300ms, or probably worse. It depends on what you're doing in that stage. In relative terms, programs that access databases usually run many times faster in mod_perl than with CGI. - Perrin
Re: Doing Authorization using mod_perl from a programmers perspective
Jonathan E. Paton [EMAIL PROTECTED] writes: Please don't flame me, I'll go away... honest :P I wonder if you're trying to do too much too soon? If you're concerned about hosting then *gulp* PHP might server you better. I rent a dedicated server because I want absolute control and the ability to run my own handler. -- David Hodgkinson, Wizard for Hirehttp://www.davehodgkinson.com Editor-in-chief, The Highway Star http://www.deep-purple.com Deep Purple Family Tree news http://www.slashrock.com Interim Technical Director, Web Architecture Consultant for hire
RE: mod_perl.so not built after building mod_perl
Hi..., As per ur suggestion, I have installed Apache 1.3.20 and mod_perl 1.26. It seems, the environement is OK.. whenever I am running some simple PERL scripts, it ran. But whenever I am running my project, I got the following error in the apache error log file. [Wed Nov 14 21:14:05 2001] [error] [Wed Nov 14 21:14:05 2001] null: Undefined subroutine Apache::ROOT::vswap1_2e1_2e5::index_2eeml::my_start called at /apps/vswap1.1.5/index.eml line 13. The source code for the index.eml file is as follows : # -*-perl-*- # #(C) 1998, 1999 X/Open Co Ltd. (C) 1999, 2000 WAP Forum Ltd. All rights reserved #! /usr/local/bin/perl -w # use TestRuntime; $wmlname = $TestConfig::TEST_SUITE_NAME; $wmlname =~ m/[\s\(]/; $wmlname = $`; my_start(Wireless Application Protocol Application Layer Test Suite) ; if ($mode eq html) { #p qq(brbrcenteremfont color = red size=+4UNDERGOING INSTALLATION AND TESTbr/Please do not use on 4th Dec 2000/font/em/centerbrbr); my_p(q( Welcome to The Open Group Verification Suite for WAP Clients. This test suite is designed to exercise WAP clients and gateway servers against the requirements in the WAP 1.1 specifications from the WAP Forum.)); main::p(qq(pemPlease bCreate a New Account/b when first accessing this release of VSWAP1.1.5. To do thi s you will need to enter the designated WAP Forum username and password. If not known, this can obtained from your WAP Forum WIG representative./em/p)); my_p(q(From this page, you can perform the following operations:)); my_menu; my_item (Manage Test Sessions, run/menu.eml); my_item (Review Test Results, run/review.eml); if ($TestConfig::SITE_USER_MANAGEMENT) { my_item (Create a New Account, public/agree-license.eml); } my_item (View the Release Notes, readme.html); my_item (View the Quick Start User Guide, guide.eml); p(qq(brbView the Test Specifications/bbrbr)); my_item (View the WML 1.1 Test Specification, tests/wap/specs/wml11ts.html); my_item (View the WMLScript 1.1 Test Specification, tests/wap/specs/wmls11ts.html); my_item (View the WMLScript Standard Libraries 1.1 Test Specification, tests/wap/specs/wmlssl11ts.html); my_item (View the WAP Caching Model 1.1 Test Specification, tests/wap/specs/wcm11ts.html); my_item (View the WAE Low-level Test Specification, tests/wap/specs/lowlevel11ts.html); my_menu_end; p(qq(font size=-1i($TestConfig::TEST_SUITE_NAME : $TestConfig::TEST_SUITE_REL_DATE)/font/i)); } else { p(qq(pWAP Test Suitebr/$wmlnamebr/ a href=$SR/run/menu.emlRun tests/a/p)); } my_end_index; what might be reason for the above problem.. Can any one suggest., it will be grateful.. Thanx in advance, rgds, Pratiksha -Original Message- From: Wayne Pascoe [SMTP:[EMAIL PROTECTED]] Sent: 14 November 2001 18:24 To: [EMAIL PROTECTED] Cc: 'Wayne Pascoe'; '[EMAIL PROTECTED]' Subject:Re: mod_perl.so not built after building mod_perl Manjrekar Pratiksha [EMAIL PROTECTED] writes: Hi there, Sorry to be pedantic, but could you please post your reply's to messages under the message. It makes life a lot easier for me to read and respond. As you suggested I have used apache1.3.22 version.. However I have the following problem: 1. While installing modperl v1.24, i got a warning message that apache1.3.0 is recommended..Should I go ahead with it?(since you recommended apache1.3.22) I would suggest mod_perl 1.26 as it is most current. 2. I also tried apache v1.3.0 .During the process, I had to change my modperl version to 1.24_01. This again had quite some problems. I would not use 1.3.0. There have been many bugs and security issues resolved with Apache over time, as well as performance and feature improvements. Could you please suggest me a apache version as well as a mod_perl version compatible to it in the Solaris environment? Thanks in advance, I am running Solaris 8 with Apache 1.3.20 and mod_perl 1.26 without any problems. I have not yet had time to upgrade to 1.3.22 but I'll test later and see if this works. It should. This is just my recommendation and is in no way a statement by the authors and maintainers of Solaris, Apache or mod_perl. Please excuse my spelling as ispell is still installing :) -- - Wayne Pascoe | If you hurt her, I'll hunt you down [EMAIL PROTECTED] | and kill you with a shovel... A vague http://www.penguinpowered.org.uk | disclaimer is no-one's friend. | ** The information contained in this message or any of its attachments may be confidential and is intended for the exclusive use of the addressee(s). Any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited without the express permission of the sender. The views expressed in this email are those of the individual and not necessarily those of Sony or Sony
RE: mod_perl.so not built after building mod_perl
On Wed, 14 Nov 2001, Manjrekar Pratiksha wrote: [Wed Nov 14 21:14:05 2001] [error] [Wed Nov 14 21:14:05 2001] null: Undefined subroutine Apache::ROOT::vswap1_2e1_2e5::index_2eeml::my_start called at /apps/vswap1.1.5/index.eml line 13. [snip] what might be reason for the above problem.. Probably the subroutine my_start is not defined 73, Ged.
mod_perl make test fails
Hi there! I'm trying to compile apache_1.3.22+mod_perl-1.26 on a redhat 7.1 linux box. I replace the original gcc 2.xx with gcc version 3.0.2 and perl 5.6.0 with perl 5.6.1 both compiled in the same box. Any help will be highly appreciated _ Jose Albert These are the last lines of the output of 'make test' ../apache_1.3.22/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t httpd listening on port 8529 will write error_log to: t/logs/error_log letting apache warm up...\c done /usr/bin/perl t/TEST 0 Can't locate object method new via package URI::URL (perhaps you forgot to load URI::URL?) at ../blib/lib/Apache/test.pm line 252. make: *** [run_tests] Error 255 * This is the error log ** [root@lancelot mod_perl-1.26]# cat t/logs/error_log [notice] Destruction-DESTROY called for $global_object [Wed Nov 14 12:41:28 2001] [warn] [notice] child_init for process 4115, report any problems to [no address given]
Re: [challenge] new mod_perl site
At 10:44 AM -0800 11/14/01, Nick Tonkin wrote: No one doubts your commitment to mod_perl, or your hard -- and unpaid -- work on the guide and many other things. But if you want to be a leader who inspires people to collaborate and work as a team under your direction, you'd do well to work on bringing your people skills up to par with your technical skills, IMHO. Ouch! I think you misunderstood. Stas laid out very clearly what it was he wanted and how to deliver it. I could only hope for so much from the people I work with. Stas is a popular guy, and I'm sure the only reason he asked for specific subject lines is to make submissions easier to find in the mass of email garbage I'm sure he receives. Paid or Unpaid, Stas' contributions to the mod_perl world are nothing short of remarkable. And with this challenge, he's giving other people the opportunity to prove that he isn't the only remarkable contributor to mod_perl. Rob -- Only two things are infinite: The universe, and human stupidity. And I'm not sure about the former. --Albert Einstein
RE: mod_perl.so not built after building mod_perl
actually all the subroutines are under TestRuntime.pm I have used use TestRuntime. Is it solve this problem or still something is there to configure.. Any suggestions.. Thanx, Pratiksha -Original Message- From: Ged Haywood [SMTP:[EMAIL PROTECTED]] Sent: 14 November 2001 21:36 To: Manjrekar Pratiksha Cc: '[EMAIL PROTECTED]' Subject:RE: mod_perl.so not built after building mod_perl On Wed, 14 Nov 2001, Manjrekar Pratiksha wrote: [Wed Nov 14 21:14:05 2001] [error] [Wed Nov 14 21:14:05 2001] null: Undefined subroutine Apache::ROOT::vswap1_2e1_2e5::index_2eeml::my_start called at /apps/vswap1.1.5/index.eml line 13. [snip] what might be reason for the above problem.. Probably the subroutine my_start is not defined 73, Ged. ** The information contained in this message or any of its attachments may be confidential and is intended for the exclusive use of the addressee(s). Any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited without the express permission of the sender. The views expressed in this email are those of the individual and not necessarily those of Sony or Sony affiliated companies. Sony email is for business use only. This email and any response may be monitored by Sony UK. If you have received this transmission in error, please contact our Helpdesk by email on [EMAIL PROTECTED] (6) **
RE: cgi-object not cacheable
One of the reasons you should probably not have a persistent/global CGI object is that upon a new the CGI module reads in numerous environment variables and setups up its internal structures for that particular query. If $q (in $q=new CGI) was persistent/global you would possibly have the wrong internal data in $q for the current request. -Original Message- From: Peter Pilsl [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 14 November 2001 9:19 AM To: [EMAIL PROTECTED] Subject: cgi-object not cacheable One run of my script takes about 2 seconds. This includes a lot of database-queries, calculations and so on. about 0.3 seconds are used just for one command: $query=new CGI; I tried to cache the retrieved object between several requests by storing to a persistent variable to avoid this long time, but it is not cacheable. (in the meaning of : operations on a cached CGI-object will just produce nothing) This is not a problem of my persistent variables, cause this works with many other objects like db-handles (cant use Apache::DBI cause this keeps to many handles opened, so I need to cache and pool on my own), filehandles etc. any idea ? thnx, peter -- mag. peter pilsl phone: +43 676 3574035 fax : +43 676 3546512 email: [EMAIL PROTECTED] sms : [EMAIL PROTECTED] pgp-key available
Re: [challenge] new mod_perl site
Nick Tonkin wrote: On Thu, 15 Nov 2001, Stas Bekman wrote: Antoine Quint wrote: If you[1] don't like the way the site is now, don't bitch about it but change it completing the challenge. Well, I'd be up to having a crack at it... Would you be ok publishing the site with AxKit? Coding websites with it is so easy! Antoine, reread my original post. We are talking about suggesting a *design*, not how the site should be published ;) Well, he offered to design it, using the tools he knows how to use best. Since you are asking for people to give of their time and skills, perhaps you should be less imperious about _how_ you want it done. Perhaps you should be less imperious in general. Your challenge came off to me as imperious enough that I wasn't interested in offering to help, anyways. For God's sake, you made it seem like not only had all the decisions been made already (by you), but that if I didn't use the right subject line format for my contributions, I might as well not bother! Remember that while you have been lucky enough to get a nice paycheck for jam_ph-ing, the folks whose expertise you are trying to solicit will be volunteering their time and work. Be nice! Lately your postings here seem to be preponderantly of a critical tone, more concerned with taking people to task for not using [OT] in their subject line, or whatever, than with providing assistance and support to those who are seeking it, as you used to do so well. No one doubts your commitment to mod_perl, or your hard -- and unpaid -- work on the guide and many other things. But if you want to be a leader who inspires people to collaborate and work as a team under your direction, you'd do well to work on bringing your people skills up to par with your technical skills, IMHO. Instead of starting to critisize without figuring out the reasoning for things being the way they are you could better nicely ask why I've imposed the rules and restrictions. So let's say that you didn't post this negative reply but in fact asked me why? Here are my answers: - *I* made the decisions because nobody cares to do anything about the site (other than Nat who actually did ;). Everybody cares to send helpful comments, but no real help. - *I* have spent the last 3-4 weeks writing the code that will generate the site and documentation and revamping the site, instead of doing a much more challenging mod_perl 2.0 coding. - *I*'m thinking about how to make the site and documentation easily manageable because currently no one else has suggested to help me out and I've no choice but to decide which templates to use and how to build the site. - You are talking about *me* soliciting other people's time? If I was a designer I won't ask for it, but I'm not. The whole thing is based on volunteering and many people are willing to help but don't know how. I don't understand what's wrong with helping folks to figure out how to help. Once people join my efforts this *I* will gladly become *we*. I'm looking forward to it. You are talking about me being less active at the users list? That's true, but remember this is a volunteer effort. My effort just goes into new things. Have you seen all the documentation I'm working on for mod_perl 2.0? When 2.0 comes out when *you* will not have to ask questions, the answers will be in TFM already. As for less questions getting answered on the list, why don't *you* step forward and help Perrin and other folks who are doing a great job? The open source movement goes like this: learn, code, share, learn, code, share. I'm in the learn and code mod_perl 2.0 stages now, so I can share when the time comes. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: [challenge] new mod_perl site
Nick Tonkin wrote: No one doubts your commitment to mod_perl, or your hard -- and unpaid -- work on the guide and many other things. But if you want to be a leader who inspires people to collaborate and work as a team under your direction, you'd do well to work on bringing your people skills up to par with your technical skills, IMHO. Have a nice day :) -nick Personally, I think Stas is a doing a fine job as a leader. Even if he is getting paid now, I'm sure he is still *under* paid for what he's doing. Most of us don't even notice all the things he is doing behind the scenes. Remember he is juggling many tasks now, whereas most of us only contribute a single piece of the puzzle. With a single polite e-mail he inspired me to bring the ApacheBench module up-to-date, which had gotten way out of date (from the newest ab) due to my laziness. BTW Stas, the next update with Keep-Alives is almost ready. Next will be authentication and proxy support, then SSL support. my 2c. -Adi -- We are Linux. Resistance is an indication that you missed the point.
Re: how to install the XML::LibXSLT along with libxslt?
here is a list of install procedures ive used for getting these all going http://drfrog.fdns.net/x3d/howto.html
cvs commit: modperl-2.0/src/modules/perl mod_perl.c
dougm 01/11/14 17:30:46 Modified:src/modules/perl mod_perl.c Log: save globals before populating %ENV vars Revision ChangesPath 1.94 +2 -2 modperl-2.0/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.93 retrieving revision 1.94 diff -u -r1.93 -r1.94 --- mod_perl.c2001/11/01 23:50:32 1.93 +++ mod_perl.c2001/11/15 01:30:45 1.94 @@ -524,6 +524,8 @@ } #endif +modperl_perl_global_request_save(aTHX_ r); + /* default is +SetupEnv, skip if PerlOption -SetupEnv */ if (MpDirSETUP_ENV(dcfg) || !MpDirSeenSETUP_ENV(dcfg)) { modperl_env_request_populate(aTHX_ r); @@ -532,8 +534,6 @@ if (MpDirPARSE_HEADERS(dcfg)) { rcfg-wbucket.header_parse = 1; } - -modperl_perl_global_request_save(aTHX_ r); h_stdout = modperl_io_tie_stdout(aTHX_ r); h_stdin = modperl_io_tie_stdin(aTHX_ r);
cvs commit: modperl-2.0/t/modperl .cvsignore
dougm 01/11/14 19:02:43 Modified:src/modules/perl mod_perl.c modperl_env.c modperl_env.h t/conf modperl_extra.pl t/modperl .cvsignore Log: more complete implementation of tie %ENV to r-subprocess_env Revision ChangesPath 1.95 +2 -7 modperl-2.0/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -r1.94 -r1.95 --- mod_perl.c2001/11/15 01:30:45 1.94 +++ mod_perl.c2001/11/15 03:02:42 1.95 @@ -147,6 +147,8 @@ return; } +modperl_env_init(); + base_perl = modperl_startup(base_server, p); #ifdef USE_ITHREADS @@ -538,21 +540,14 @@ h_stdout = modperl_io_tie_stdout(aTHX_ r); h_stdin = modperl_io_tie_stdin(aTHX_ r); -#if 0 -/* current implementation of tie %ENV to $r-subprocess_env - * is not threadsafe - */ modperl_env_request_tie(aTHX_ r); -#endif retval = modperl_response_handler_run(r, FALSE); modperl_io_handle_untie(aTHX_ h_stdout); modperl_io_handle_untie(aTHX_ h_stdin); -#if 0 modperl_env_request_untie(aTHX_ r); -#endif modperl_perl_global_request_restore(aTHX_ r); 1.19 +150 -41 modperl-2.0/src/modules/perl/modperl_env.c Index: modperl_env.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_env.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- modperl_env.c 2001/11/12 22:14:36 1.18 +++ modperl_env.c 2001/11/15 03:02:43 1.19 @@ -1,6 +1,7 @@ #include mod_perl.h #define EnvMgObj SvMAGIC((SV*)ENVHV)-mg_ptr +#define EnvMgLen SvMAGIC((SV*)ENVHV)-mg_len static MP_INLINE void modperl_env_hv_store(pTHX_ HV *hv, apr_table_entry_t *elt) @@ -87,7 +88,6 @@ const apr_array_header_t *array; apr_table_entry_t *elts; - if (MpReqSETUP_ENV(rcfg)) { return; } @@ -118,69 +118,178 @@ MpReqSETUP_ENV_On(rcfg); } -static int modperl_env_request_set(pTHX_ SV *sv, MAGIC *mg) +void modperl_env_request_tie(pTHX_ request_rec *r) { -const char *key, *val; -STRLEN klen, vlen; -request_rec *r = (request_rec *)EnvMgObj; +EnvMgObj = (char *)r; +EnvMgLen = -1; + +#ifdef MP_PERL_HV_GMAGICAL_AWARE +SvGMAGICAL_on((SV*)ENVHV); +#endif +} + +void modperl_env_request_untie(pTHX_ request_rec *r) +{ +EnvMgObj = NULL; + +#ifdef MP_PERL_HV_GMAGICAL_AWARE +SvGMAGICAL_off((SV*)ENVHV); +#endif +} + +/* to store the original virtual tables + * these are global, not per-interpreter + */ +static MGVTBL MP_PERL_vtbl_env; +static MGVTBL MP_PERL_vtbl_envelem; -key = (const char *)MgPV(mg,klen); -val = (const char *)SvPV(sv,vlen); +#define MP_PL_vtbl_call(name, meth) \ +MP_PERL_vtbl_##name.svt_##meth(aTHX_ sv, mg) -apr_table_set(r-subprocess_env, key, val); +#define MP_dENV_KEY \ +STRLEN klen; \ +const char *key = (const char *)MgPV(mg,klen) + +#define MP_dENV_VAL \ +STRLEN vlen; \ +const char *val = (const char *)SvPV(sv,vlen) -/*return magic_setenv(sv, mg);*/ +/* + * XXX: what we do here might change: + * - make it optional for %ENV to be tied to r-subprocess_env + * - make it possible to modify environ + * - we could allow modification of environ if mpm isn't threaded + * - we could allow modification of environ if variable isn't a CGI + *variable (still could cause problems) + */ +/* + * problems we are trying to solve: + * - environ is shared between threads + * + Perl does not serialize access to environ + * + even if it did, CGI variables cannot be shared between threads! + * problems we create by trying to solve above problems: + * - a forked process will not inherit the current %ENV + * - C libraries might rely on environ, e.g. DBD::Oracle + */ +static int modperl_env_magic_set_all(pTHX_ SV *sv, MAGIC *mg) +{ +request_rec *r = (request_rec *)EnvMgObj; +if (r) { +if (PL_localizing) { +/* local %ENV = (FOO = 'bar', BIZ = 'baz') */ +HE *entry; +STRLEN n_a; + +hv_iterinit((HV*)sv); +while ((entry = hv_iternext((HV*)sv))) { +I32 keylen; +apr_table_set(r-subprocess_env, + hv_iterkey(entry, keylen), + SvPV(hv_iterval((HV*)sv, entry), n_a)); +} +} +} +else { +return
cvs commit: modperl-2.0/t/response/TestModperl env.pm
dougm 01/11/14 19:03:22 Added: t/response/TestModperl env.pm Log: add test for tie of %ENV to r-subprocess_env Revision ChangesPath 1.1 modperl-2.0/t/response/TestModperl/env.pm Index: env.pm === package TestModperl::env; use strict; use warnings FATAL = 'all'; use Apache::Test; use Apache::Const -compile = 'OK'; sub handler { my $r = shift; plan $r, tests = 20; my $env = $r-subprocess_env; ok $ENV{MODPERL_EXTRA_PL}; #set in t/conf/modperl_extra.pl ok $ENV{MOD_PERL}; $ENV{FOO} = 2; ok $ENV{FOO} == 2; ok $env-get('FOO') == 2; $ENV{FOO}++; ok $ENV{FOO} == 3; ok $env-get('FOO') == 3; $ENV{FOO} .= 6; ok $ENV{FOO} == 36; ok $env-get('FOO') == 36; delete $ENV{FOO}; ok ! $ENV{FOO}; ok ! $env-get('FOO'); ok $ENV{SERVER_SOFTWARE}; ok $env-get('SERVER_SOFTWARE'); { local %ENV = (FOO = 1, BAR = 2); ok $ENV{FOO} == 1; ok $env-get('FOO') == 1; ok ! $ENV{SERVER_SOFTWARE}; ok ! $env-get('SERVER_SOFTWARE'); } ok ! $ENV{FOO}; #ok ! $env-get('FOO'); #XXX: keys in the original subprocess_env are restored # but new ones added to the local %ENV are not removed # after the local %ENV goes out of scope #skip r-subprocess_env + local() doesnt fully work yet, 1; ok 1; #the skip() message is just annoying ok $ENV{SERVER_SOFTWARE}; ok $env-get('SERVER_SOFTWARE'); Apache::OK; } 1; __END__ SetHandler perl-script
Re: [challenge] new mod_perl site
Hi! On Wed, Nov 14, 2001 at 01:31:52AM +0800, Stas Bekman wrote: Obviously the site should be very light on graphics, but since you are a good web designer you know this and all the other requirements already. The only requirement we have is that this is an information site, so avoid fancy graphics and god forbid flash splashes :) What about an additional requirement: The site should be validated sucessfully by validator.w3.org (The current design doesn't, BTW) I know that it is hard to get a page validated there, but IMO there should be more clean/standard-compatible websites. I guess you all know the reasons for this, so I won't repeat them here. Anyway, I think I will give it a try ... -- D_OMM O_xyderkes M_echanenhttp://domm.zsi.at M_asteuei
Re: [challenge] new mod_perl site
On Tuesday 13 November 2001 11:57, Thomas Klausner wrote: Hi! On Wed, Nov 14, 2001 at 01:31:52AM +0800, Stas Bekman wrote: Obviously the site should be very light on graphics, but since you are a good web designer you know this and all the other requirements already. The only requirement we have is that this is an information site, so avoid fancy graphics and god forbid flash splashes :) - - - snip - - - Anyway, I think I will give it a try ... Hi: Well, take your time. As soon as I find out from the SuSE list what the path is to Apache on 7.1 to use, I'm goona try out the http://perl.apache.org/embperl/IntroEmbperlObject.pod.2.html Say, there's no deadline on this thing, is there? grin Tom
Re: [challenge] new mod_perl site
What about an additional requirement: The site should be validated sucessfully by validator.w3.org Maybe we should give the horse a chance to catch up to the cart... Once there is a design that people are satisfied with, you are more than welcome to submit patches to fix validation problems. - Perrin