How do i know for certain i am using SSL?
Hi, is there any method that will work through all the different apache ssl implementations? Currently what i do (with openssl) is: my $s = $r-lookup_uri($r-uri); my $ssl = $s-subprocess_env('HTTPS'); $ssl becomes 'on' , but i don't know if this is compatible with other ssl implementations. Maybe this HTTPS env could be mapped to mod_perl %ENV, or using something similar for each ssl implementation so that a developer could trust on one place to know whether the request is using ssl or not. Thank your for you attention, Joao Pedro
Re: PerlSetupEnv is evil
On Mon, Jul 24, 2000 at 05:47:46PM +0200, Eric Cholet wrote: I've just committed a change which fixes this. Please try it and let me know if it works for you. It does; now a single global "PerlSetupEnv Off" does the job. Thanks! -- Roger Espel Llima, [EMAIL PROTECTED] http://www.iagora.com/~espel/index.html
Re: module multi-config strategy
Perrin, you mean that I can actually set my environment per virtual-host? that's encouraging in the one-implementation per site scenario. Now I does block any use of persistent variables, unless I store them in a RDBMS or in the 'Globals' module you mentioned. It could really be a module that just exported references to internal hashes. I'm starting to like it. A module that exported persistent hashes (not across server restarts, just across requests ... short lived persistence). Maybe it could be loading the 'config' hashes from disk every once in a while, say every 10 seconds, to be able to reconfig without restarting. And the ability to commit a given hash ('config') to disk to make it permanent. mmmh. an idea is shaping here in my tiny head ... anyone care to comment? martin Perrin Harkins wrote: You can have a module full of globals that is different for each site (it doesn't have to go in the same directory as your other shared code), or you can put things in httpd.conf with PerlSetVar and read them with $r-dir_config(), which allows a separate configuration for each virtual host. - Perrin
SIGNAL 11 - Help anyone?
Here's the backtrace, [root@app perl]# gdb /www/bin/httpd GNU gdb 4.18 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux"...(no debugging symbols found)... (gdb) run -X Starting program: /www/bin/httpd -X Program received signal SIGSEGV, Segmentation fault. 0x811b160 in Perl_sv_setsv () (gdb) bt #0 0x811b160 in Perl_sv_setsv () #1 0x81122f3 in Perl_pp_sassign () #2 0x8111f7d in Perl_runops_standard () #3 0x80da005 in perl_call_sv () #4 0x80d9bc4 in perl_call_sv () #5 0x8108a61 in Perl_vdie () #6 0x8108b84 in Perl_die () #7 0x813741c in Perl_pp_die () #8 0x8111f7d in Perl_runops_standard () #9 0x80da005 in perl_call_sv () #10 0x80d9dce in perl_call_sv () #11 0x807dd1b in perl_call_handler () #12 0x807d6c6 in perl_run_stacked_handlers () #13 0x807c40d in perl_handler () #14 0x8097383 in ap_invoke_handler () #15 0x80aa999 in ap_some_auth_required () #16 0x80aa9fc in ap_process_request () #17 0x80a229e in ap_child_terminate () #18 0x80a242c in ap_child_terminate () #19 0x80a2589 in ap_child_terminate () #20 0x80a2bb6 in ap_child_terminate () #21 0x80a3343 in main () #22 0x400d21eb in __libc_start_main (main=0x80a2ffc main, argc=2, argv=0xbc04, init=0x8062820 _init, fini=0x814f3dc _fini, rtld_fini=0x4000a610 _dl_fini, stack_end=0xbbfc) at ../sysdeps/generic/libc-start.c:90 (gdb) Platform: Linux RedHat 6.1 Perl 5.6.0 Apache 1.3.12 mod_perl 1.24 Compiled statically with Apache without any other third-party modules Modules used: (all recent versions) Apache::DBI DBI CGI CGI::Carp HTML::Template I also encountered occasionally the "Bizarre copy of ARRAY in aassign at /usr/lib/perl5/5.6.0/Carp/Heavy.pm line 79" error discussed some time before on the list. Can anyone give me some pointer? TIA, Kenneth
Re: How do i know for certain i am using SSL?
how about the scheme of the request URL? hmm.. but that needs parsing the URL... Joao Pedro Gonçalves wrote: Hi, is there any method that will work through all the different apache ssl implementations? Currently what i do (with openssl) is: my $s = $r-lookup_uri($r-uri); my $ssl = $s-subprocess_env('HTTPS'); $ssl becomes 'on' , but i don't know if this is compatible with other ssl implementations. Maybe this HTTPS env could be mapped to mod_perl %ENV, or using something similar for each ssl implementation so that a developer could trust on one place to know whether the request is using ssl or not. Thank your for you attention, Joao Pedro
Re: How do i know for certain i am using SSL?
Following your suggestion, use Apache::URI (); $r-parsed_uri-scheme; returns http or https. However this value comes from apache's util_uri where https is mapped to DEFAULT_HTTPS_PORT. src/include/httpd.h:#define DEFAULT_HTTPS_PORT443 However with OpenSSL and mod_ssl, this still works because somewhere at ssl_engine_ext.c DEFAULT_HTTPS_PORT is overwritten and the schema returns https on other port when ssl is engaged. So, the question is, can i trust this? Thanks, João Pedro Kenneth Lee wrote: how about the scheme of the request URL? hmm.. but that needs parsing the URL... Joao Pedro Gonçalves wrote: Hi, is there any method that will work through all the different apache ssl implementations? Currently what i do (with openssl) is: my $s = $r-lookup_uri($r-uri); my $ssl = $s-subprocess_env('HTTPS'); $ssl becomes 'on' , but i don't know if this is compatible with other ssl implementations. Maybe this HTTPS env could be mapped to mod_perl %ENV, or using something similar for each ssl implementation so that a developer could trust on one place to know whether the request is using ssl or not. Thank your for you attention, Joao Pedro
Re: How do i know for certain i am using SSL?
"j" == joaop Joao writes: j Following your suggestion, j use Apache::URI (); j $r-parsed_uri-scheme; j returns http or https. The "s" in https says use SSL. The port number is irrelevent, just as the port number in http is irrelevent to using the HTTP protocol. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D.Khera Communications, Inc. Internet: [EMAIL PROTECTED] Rockville, MD +1-301-545-6996 GPG MIME spoken herehttp://www.khera.org/~vivek/
Apache::ASP
Hi : I copy the ./site/eg/ directory to /home/httpd/asp. (this directory is created by me. ) From the Quick Start of Install page : You must put "AllowOverride All" in your httpd.conf config section to let the .htaccess file in the ./site/eg installation directory do its work. This means I need put the following lines in the httpd.conf ? Directory "/home/httpd/asp" AllowOverride All Order allow,deny Allow from all /Directory If you want a starter config file for Apache::ASP, just look at the .htaccess file in the ./site/eg/ directory. Can I just cp the .htaccess file to /home/http/asp ? Do I need change the PerlSetVar Global (from /tmp to /home/httpd/asp ??) and PerlSetVar StateDir ( from /tmp/asp_demo to /home/httpd/asp??) ? Jacky
Apache::ASP version conflicts
I'am currently having trouble with asp and perl. Here's the situation. Recently perl was upgraded to 5.6, all the other programs including httpd see perl as 5.6 with the exception of the asp module. It's installation script (Makefile.pl) sees and uses perl 5.6 however version.asp reports the previous version of perl. "This is version 5.00503" ASP not using the newer version of perl is making a few of the scripts not run correctly. I've checked all the paths I could find with the various asp files and they're all points to the correct place but it still doesnt help. Where else should I check or is there something I'am overlooking?
Re: Apache::ASP version conflicts
"JW" == Jamie Warren [EMAIL PROTECTED] writes: JW installation script (Makefile.pl) sees and uses perl 5.6 however JW version.asp reports the previous version of perl. "This is version JW 5.00503" ASP not using the newer version of perl is making a few of the When you build mod_perl, perl is embedded into your httpd. If you upgrade your perl and want the newer one in your mod_perl, you need to rebuild and reinstall mod_perl.
Re: Apache::ASP version conflicts
Jamie Warren wrote: I'am currently having trouble with asp and perl. Here's the situation. Recently perl was upgraded to 5.6, all the other programs including httpd see perl as 5.6 with the exception of the asp module. It's installation script (Makefile.pl) sees and uses perl 5.6 however version.asp reports the previous version of perl. "This is version 5.00503" ASP not using the newer version of perl is making a few of the scripts not run correctly. I've checked all the paths I could find with the various asp files and they're all points to the correct place but it still doesnt help. Where else should I check or is there something I'am overlooking? Apache::ASP will use whatever version of perl that mod_perl was compiled with. You may need to recompile your modperl. Also, when installing Apache::ASP, make sure you install it with the perl that the modperl is associated with. -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Re: Apache::ASP
jacky wrote: Directory "/home/httpd/asp" AllowOverride All Order allow,deny Allow from all /Directory If you want a starter config file for Apache::ASP, just look at the .htaccess file in the ./site/eg/ directory. Can I just cp the .htaccess file to /home/http/asp ? Yes. But you should really copy all of ./site to this directory as the docs and examples are set up this way. Do I need change the PerlSetVar Global (from /tmp to /home/httpd/asp ??) and PerlSetVar StateDir ( from /tmp/asp_demo to /home/httpd/asp??) ? Global is set in the .htaccess Global config to "." so that the global.asa in ./site/eg will be found. -- Joshua
Re: VBScript parser (was Re: Apache::ASP Question)
[EMAIL PROTECTED] wrote: -- On Mon, 24 Jul 2000 13:19:51 Joshua Chamas wrote: Until I write a VBScript to perl parser, yes you can only use perl under Apache::ASP. Ok, so are you actually going to write a VBScript to perl parser? I was actually thinking of undertaking this project myself, but I've never written a lexer or a parser or anything like that. If you _are_ going to do this I'd be glad to help. If not, I'm probably going to get started with it anyways. I realized a huge need for something like this since I've been working on a large site (high volume + large codebase) converting from WinNT/ASP to Solaris/Perl/CGI (with mod_perl of course). I've written a _really_ simple script that converts stuff like "For i = 1 To 10" to "for (1..10) {" etc., but it's of course really flaky and unreliant (although it knocks out about 90% of the manual code conversion). Ok, so what was the point again?? Oh yeah, are you really going to do this? :-) Or is someone else already in the process? Like Matt suggested you can start with his simple vbscript to perlscript converter, but I would recommend to do a really complete job that you use a full on grammar and something like Parse::Yapp to do the parse tree. I personally would find this approach the most enjoyable, but it may be that the parse times that result from this are too slow, and you might need to take the approach that Matt did and brute force your way through the code to render to perlscript. I have not started on this, and likely would not for a while yet so feel free to have at it. If you decomped this functionality into a module like Parse::VBScript or some such ( I don't know about this CPAN namespace ) and presented an interface like: my $vbparser = Parse::VBScript-new($string_ref); my $perlscript_ref = $vbparser-perlscript(); this interface would allow me to use your code from Apache::ASP easily by passing the VBScript code into the parser, and get the equivalent perlscript. The passing by ref would just save on some of the string copying that may be unnecessary otherwise. There is a HUGE need for this vbscript emulation, and this would greatly add to the functionality of Apache::ASP, so many thanks ahead of time! -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Newbie Installation Problem
ModPerl 1.24 configures fine on Redhat 6.2, but sometimes during it's installation I receive this error ... + make install root=/tmp/modperl_1.24-buildroot (cd ./apaci make) make[1]: Entering directory `/home/adelaide/src/BUILD/mod_perl-1.24/apaci' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/adelaide/src/BUILD/mod_perl-1.24/apaci' make[1]: Entering directory `/home/adelaide/src/BUILD/mod_perl-1.24/Apache' make[1]: Leaving directory `/home/adelaide/src/BUILD/mod_perl-1.24/Apache' make[1]: Entering directory `/home/adelaide/src/BUILD/mod_perl-1.24/Connection' make[1]: Leaving directory `/home/adelaide/src/BUILD/mod_perl-1.24/Connection' make[1]: Entering directory `/home/adelaide/src/BUILD/mod_perl-1.24/Constants' make[1]: Leaving directory `/home/adelaide/src/BUILD/mod_perl-1.24/Constants' make[1]: Entering directory `/home/adelaide/src/BUILD/mod_perl-1.24/File' make[1]: Leaving directory `/home/adelaide/src/BUILD/mod_perl-1.24/File' make[1]: Entering directory `/home/adelaide/src/BUILD/mod_perl-1.24/Leak' make[1]: Leaving directory `/home/adelaide/src/BUILD/mod_perl-1.24/Leak' make[1]: Entering directory `/home/adelaide/src/BUILD/mod_perl-1.24/Log' make[1]: Leaving directory `/home/adelaide/src/BUILD/mod_perl-1.24/Log' make[1]: Entering directory `/home/adelaide/src/BUILD/mod_perl-1.24/ModuleConfig' make[1]: Leaving directory `/home/adelaide/src/BUILD/mod_perl-1.24/ModuleConfig' make[1]: Entering directory `/home/adelaide/src/BUILD/mod_perl-1.24/PerlRunXS' make[1]: Leaving directory `/home/adelaide/src/BUILD/mod_perl-1.24/PerlRunXS' make[1]: Entering directory `/home/adelaide/src/BUILD/mod_perl-1.24/Server' make[1]: Leaving directory `/home/adelaide/src/BUILD/mod_perl-1.24/Server' make[1]: Entering directory `/home/adelaide/src/BUILD/mod_perl-1.24/Symbol' make[1]: Leaving directory `/home/adelaide/src/BUILD/mod_perl-1.24/Symbol' make[1]: Entering directory `/home/adelaide/src/BUILD/mod_perl-1.24/Table' make[1]: Leaving directory `/home/adelaide/src/BUILD/mod_perl-1.24/Table' make[1]: Entering directory `/home/adelaide/src/BUILD/mod_perl-1.24/URI' make[1]: Leaving directory `/home/adelaide/src/BUILD/mod_perl-1.24/URI' make[1]: Entering directory `/home/adelaide/src/BUILD/mod_perl-1.24/Util' make[1]: Leaving directory `/home/adelaide/src/BUILD/mod_perl-1.24/Util' Warning: You do not have permissions to install into /usr/lib/perl5/site_perl/5.005/i386-linux at /usr/lib/perl5/5.00503/ExtUtils/Install.pm line 61. mkdir /usr/lib/perl5/site_perl/5.005/i386-linux/auto/Apache/include: Permission denied at /usr/lib/perl5/5.00503/ExtUtils/Install.pm line 114 make: *** [pure_site_install] Error 2 I don't know what's the matter with it because this error occurs on and off. TIA, Adelaide
Re: VBScript parser (was Re: Apache::ASP Question)
On Tue, 25 Jul 2000, Joshua Chamas wrote: Like Matt suggested you can start with his simple vbscript to perlscript converter, but I would recommend to do a really complete job that you use a full on grammar and something like Parse::Yapp to do the parse tree. I personally would find this approach the most enjoyable, but it may be that the parse times that result from this are too slow, and you might need to take the approach that Matt did and brute force your way through the code to render to perlscript. Well you might find this interesting: http://compilers.iecc.com/comparch/article/00-05-085 Sounds a lot like parsing perl :-) -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
RE: Newbie Installation Problem
On 25-Jul-2000 Adelaide Yip wrote: ModPerl 1.24 configures fine on Redhat 6.2, but sometimes during it's installation I receive this error ... Warning: You do not have permissions to install into /usr/lib/perl5/site_perl/5.005/i386-linux at /usr/lib/perl5/5.00503/ExtUtils/Install.pm line 61. mkdir /usr/lib/perl5/site_perl/5.005/i386-linux/auto/Apache/include: Permission denied at /usr/lib/perl5/5.00503/ExtUtils/Install.pm line 114 make: *** [pure_site_install] Error 2 The error says it all. You don't have permissions to install into the standard perl lib directory. You probably need to be root. If you want to install somewhere other than the standard lib directory than you need to add: PREFIX=/tmp/foo/bar to your ./configure command. -- Jason Bodnar + [EMAIL PROTECTED] + Team Linux Homer: I keep hearing this horrible irregular thumping noise. Pump Jockey: It's your heart. And I think it's on its last thump. Homer: Whew, I was afraid it was my transmission. Homer's Triple Bypass
RE: Perl as DSO...whats wrong with it, specifically?
I run mod_perl as a DSO without a problem. Just don't try to mix it with php as a DSO. On 25-Jul-2000 Michael Nachbaur wrote: I'm working with IBM (sorry! Its not my choice!) to try to get mod_perl compiled into their custom version of Apache, and their techs want to know why I can't run mod_perl as a DSO. So, I need to know, whats specifically wrong with it? Like, what are the repurcussions of it? This is going to be run under a lot of load as well. Thanks for your feedback in advance. --man Michael A. Nachbaur (KE6WIA) mnachba(at)rei(dot)com mike(at)nachbaur(dot)com http://www.nachbaur.com "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein -- Jason Bodnar + [EMAIL PROTECTED] + Team Linux Uh, so. Let's have a conversation. Uh, I think we'll find that we have very little in common. -- Homer Simpson The Last Temptation of Homer
Re: Perl as DSO...whats wrong with it, specifically?
"MN" == Michael Nachbaur [EMAIL PROTECTED] writes: MN I'm working with IBM (sorry! Its not my choice!) to try to get MN mod_perl compiled into their custom version of Apache, and their MN techs want to know why I can't run mod_perl as a DSO. So, I need MN to know, whats specifically wrong with it? Like, what are the MN repurcussions of it? This is going to be run under a lot of load MN as well. Thanks for your feedback in advance. As long as you have the latest version of mod_perl (probably from CVS) you're ok I think. I have no trouble with it on a BSD/OS system whatsoever. Others may disagree... I think it also depends on your OS. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D.Khera Communications, Inc. Internet: [EMAIL PROTECTED] Rockville, MD +1-301-545-6996 GPG MIME spoken herehttp://www.khera.org/~vivek/
RE: Perl as DSO...whats wrong with it, specifically?
So, if it depends on such variables as what its compiled with and what platform you're running on, then may I infer that it is somewhat flaky on unknown platforms? I'm going to be running this in a high-load environment on an AIX server with a not-too-current version of Perl (5.005_03 something-er-other), with misc. IBM libraries compiled into the binary. I'd say thats pretty iffy, but I'd like to get your opinions on it first. Thanks. -Original Message- From: Vivek Khera [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 25, 2000 1:22 PM To: Michael Nachbaur Cc: mod_perl Maillist Subject: Re: Perl as DSO...whats wrong with it, specifically? "MN" == Michael Nachbaur [EMAIL PROTECTED] writes: MN I'm working with IBM (sorry! Its not my choice!) to try to get MN mod_perl compiled into their custom version of Apache, and their MN techs want to know why I can't run mod_perl as a DSO. So, I need MN to know, whats specifically wrong with it? Like, what are the MN repurcussions of it? This is going to be run under a lot of load MN as well. Thanks for your feedback in advance. As long as you have the latest version of mod_perl (probably from CVS) you're ok I think. I have no trouble with it on a BSD/OS system whatsoever. Others may disagree... I think it also depends on your OS. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D.Khera Communications, Inc. Internet: [EMAIL PROTECTED] Rockville, MD +1-301-545-6996 GPG MIME spoken herehttp://www.khera.org/~vivek/
Re: Perl as DSO...whats wrong with it, specifically?
On Tue, Jul 25, 2000 at 01:14:32PM -0700, Michael Nachbaur wrote: I'm working with IBM (sorry! Its not my choice!) to try to get mod_perl compiled into their custom version of Apache, and their techs want to know why I can't run mod_perl as a DSO. So, I need to know, whats specifically wrong with it? Like, what are the repurcussions of it? This is going to be run under a lot of load as well. I am running mod_perl as a DSO on AIX and it works fine with the exception of a memory leak on each apachectl restart. As a workaround I use a real stop every few weeks to get the server memory footprint back to normal. -- Jens-Uwe Mager HELIOS Software GmbH Steinriede 3 30827 Garbsen Germany Phone: +49 5131 709320 FAX:+49 5131 709325 Internet: [EMAIL PROTECTED]
RE: Perl as DSO...whats wrong with it, specifically?
"MN" == Michael Nachbaur [EMAIL PROTECTED] writes: MN So, if it depends on such variables as what its compiled with and MN what platform you're running on, then may I infer that it is MN somewhat flaky on unknown platforms? I'm going to be running this I recall seeing some AIX specific workarounds to some things within mod_perl. I don't recall if those were DSO specific. I know for sure that on BSD/OS with perl 5.004_04 it is stable as a DSO using the latest mod_perl and apache from CVS (as of June 9, 2000 at least). I think if you make it and it works you're ok. You probably won't have a half-working result. It will either work or it will crash and burn violently. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D.Khera Communications, Inc. Internet: [EMAIL PROTECTED] Rockville, MD +1-301-545-6996 GPG MIME spoken herehttp://www.khera.org/~vivek/
Re: Perl as DSO...whats wrong with it, specifically?
On Tue, 25 Jul 2000, Michael Nachbaur wrote: I'm working with IBM (sorry! Its not my choice!) to try to get mod_perl compiled into their custom version of Apache, and their techs want to know why I can't run mod_perl as a DSO. So, I need to know, whats specifically wrong with it? Like, what are the repurcussions of it? This is going to be run under a lot of load as well. is this the continuation of a thread, or a new question? this has come up a lot in the mailing list.. have you checked the archives? -- Blue Lang Unix Systems Admin QSP, Inc., 3200 Atlantic Ave, Ste 100, Raleigh, NC, 27604 Home: 919 835 1540 Work: 919 875 6994 Fax: 919 872 4015
Re: Perl as DSO...whats wrong with it, specifically?
On Tue, Jul 25, 2000 at 04:33:12PM -0400, Vivek Khera wrote: I recall seeing some AIX specific workarounds to some things within mod_perl. I don't recall if those were DSO specific. I know for sure that on BSD/OS with perl 5.004_04 it is stable as a DSO using the latest mod_perl and apache from CVS (as of June 9, 2000 at least). There are a few patches necessary that must be applied to the _perl_ distribution to fix bugs I did in the original dl_aix.xs from perl around 1992 or so. But the latest CVS versions work fine on my AIX boxes. -- Jens-Uwe Mager HELIOS Software GmbH Steinriede 3 30827 Garbsen Germany Phone: +49 5131 709320 FAX:+49 5131 709325 Internet: [EMAIL PROTECTED]
Re: Perl as DSO...whats wrong with it, specifically?
ive personally not had any probs with mod_perl as a dso blue wrote: On Tue, 25 Jul 2000, Michael Nachbaur wrote: I'm working with IBM (sorry! Its not my choice!) to try to get mod_perl compiled into their custom version of Apache, and their techs want to know why I can't run mod_perl as a DSO. So, I need to know, whats specifically wrong with it? Like, what are the repurcussions of it? This is going to be run under a lot of load as well. is this the continuation of a thread, or a new question? this has come up a lot in the mailing list.. have you checked the archives? -- Blue Lang Unix Systems Admin QSP, Inc., 3200 Atlantic Ave, Ste 100, Raleigh, NC, 27604 Home: 919 835 1540 Work: 919 875 6994 Fax: 919 872 4015
Re: Perl as DSO...whats wrong with it, specifically?
On Tue, Jul 25, 2000 at 01:14:32PM -0700, Michael Nachbaur wrote: I'm working with IBM (sorry! Its not my choice!) to try to get mod_perl compiled into their custom version of Apache, and their techs want to know why I can't run mod_perl as a DSO. So, I need to know, whats specifically wrong with it? Like, what are the repurcussions of it? This is going to be run under a lot of load as well. Thanks for your feedback in advance. Well, it works now in most cases, if you use the current version. It's not necessarily a good idea if you're dealing with x86 (it has to be built PIC, and thus increases register pressure). But other than the slight PIC slowdown it hasn't caused problems in a few months. Dan /\ /\ | Daniel Jacobowitz|__|SCS Class of 2002 | | Debian GNU/Linux Developer__Carnegie Mellon University | | [EMAIL PROTECTED] | | [EMAIL PROTECTED] | \/ \/
On the fly do (require)
Hope I asking this question on the right place. ýI got some problem migrating me CGI to mod_perl.ý ýI'm "require" parameter file on the fly using the user inputý ýto decided which file to load.ý ýLet say I got tree files:ý ýmain.cgi, param1.pl, param2.plý ýThe main.cgi load configuration parameters from one of theý ýparam's file and then print the parameters to the browser.ý ý- main.cgi ý ý#!/usr/local/bin/perl -wý ýuse strict;ý ýmy ($forum,$back_url);ý ýuse CGI;ý ý$q = new CGI;ý ý$forum = $q-param('forum');ý ýdo "c:/home2/rami/www/forums/setups/".$forum.".setup" ||ý ý print("Can't requirebr\n");ý ýprint SOME HTML STUFF ...ý ýprint "h1the forum is: $forumbr\n";ý ýprint "back_url $back_urlbr\n";ý ýprint SOME HTML STUFF ...ý ý-- param2.pl -ý ý.ý ý.ý ý.ý ý$back_url = "123";ý ý.ý ý.ý ý.ý ý-- param3.pl -ý ý.ý ý.ý ý.ý ý$back_url = "456";ý ý.ý ý.ý ý---ý ýThe phenomenon is that on every $forum number I loadý ý$back_url (or any other variable) is allways null.ý ýIs there a way to use my old CGI come with our massive rewrite?ý ýRegards,ý ýRami Addadyý ý[EMAIL PROTECTED]ý
save as
Hello folks, This may be a weak question, but I have to ask it anyway. I have a script running under mod_perl. It works fine, but every once in a while the browser/\"web server\" offers to save the script instead of executing it. Any ideas ? Thanks! Arshavir
RE: save as
It's being sent as a content-type that the web-server/browser doesn't know how to handle -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 25, 2000 5:37 PM To: [EMAIL PROTECTED] Subject: save as Hello folks, This may be a weak question, but I have to ask it anyway. I have a script running under mod_perl. It works fine, but every once in a while the browser/\"web server\" offers to save the script instead of executing it. Any ideas ? Thanks! Arshavir
save as
Hello folks, This may be a weak question, but I have to ask it anyway. I have a script running under mod_perl. It works fine, but every once in a while the browser/\\\"web server\\\" offers to save the script instead of executing it. Any ideas ? Thanks! Arshavir
Re: Perl as DSO...whats wrong with it, specifically?
On Tue, Jul 25, 2000 at 04:04:12PM -0500, John Marquart wrote: In general - all of the previous threads on this topic have either gone off-list or were never resolved. Sorry, I dropped your last post onto the floor somehow. I will answer in a seperate post about these. I spent several weeks trying various configurations w/ mod_perl-1.24 apache 1.3.12 on an AIX 4.3.3 box running perl 5.00503 and using xlc as my compiler. From the last post from you I have you appeared to use mod_perl-1.22. What exactly have you been using? I was never able to successfully compile a DSO mod_perl. However, most of the versions have a patch that needs to be applied to the dynamic loader code in perl. perl needs then to be recompiled before building mod_perl. even w/ these patches I was unable to build it successfully. I tried to use perl 5.6 as well - but ran into more problems (unrelated?) then I had w/ 5.00503. That is strange - what kind of errors do you get? -- Jens-Uwe Mager HELIOS Software GmbH Steinriede 3 30827 Garbsen Germany Phone: +49 5131 709320 FAX:+49 5131 709325 Internet: [EMAIL PROTECTED]
Re: Perl as DSO...whats wrong with it, specifically?
On Tue, Jul 25, 2000 at 11:57:56PM +0200, Jens-Uwe Mager wrote: From the last post from you I have you appeared to use mod_perl-1.22. What exactly have you been using? Oops - I did misread, you said you are using 1.24. -- Jens-Uwe Mager HELIOS Software GmbH Steinriede 3 30827 Garbsen Germany Phone: +49 5131 709320 FAX:+49 5131 709325 Internet: [EMAIL PROTECTED]
Re: SIGNAL 11 - Help anyone?
...segv trace... I also encountered occasionally the "Bizarre copy of ARRAY in aassign at /usr/lib/perl5/5.6.0/Carp/Heavy.pm line 79" error discussed some time before on the list. Both the segv and the 'bizarre copy' are fixed by this Perl 5.6 patch: //depot/perl/cop.h#49 (text) Index: perl/cop.h --- perl/cop.h.~1~ Thu Jun 8 06:58:03 2000 +++ perl/cop.h Thu Jun 8 06:58:03 2000 @@ -106,13 +106,9 @@ } STMT_END #endif /* USE_THREADS */ -#ifdef USE_ITHREADS - /* junk in @_ spells trouble when cloning CVs, so don't leave any */ -# define CLEAR_ARGARRAY() av_clear(cx-blk_sub.argarray) -#else -# define CLEAR_ARGARRAY() NOOP -#endif /* USE_ITHREADS */ - +/* junk in @_ spells trouble when cloning CVs and in pp_caller(), so don't + * leave any */ +#define CLEAR_ARGARRAY() av_clear(cx-blk_sub.argarray) #define POPSUB(cx,sv) \ STMT_START { \ //depot/perl/t/op/runlevel.t#16 (xtext) Index: perl/t/op/runlevel.t --- perl/t/op/runlevel.t.~1~Thu Jun 8 06:58:03 2000 +++ perl/t/op/runlevel.tThu Jun 8 06:58:03 2000 @@ -349,3 +349,18 @@ bar B 2 bar + +sub n { 0 } +sub f { my $x = shift; d(); } +f(n()); +f(); + +sub d { +my $i = 0; my @a; +while (do { { package DB; @a = caller($i++) } } ) { +@a = @DB::args; +for (@a) { print "$_\n"; $_ = '' } +} +} +EXPECT +0 End of Patch. -- Jeremy Howard [EMAIL PROTECTED]
Re: mod_perl success!
Pramod: We are actually going to be generalizing it and releasing it (maybe) but we need to get approval first, so can't just send the code :) It'll probably happen in a few weeks though. So here's what you have to do: - Clean up the systems-level modules (like database stuff, base libraries) and packages that are used a lot (stuff like date conversions and other random operations) by making sure they pass "perl -w" and "use strict" - Install mod_perl into Apache - Make Apache handle CGIs through PerlRun with PerlRunOnce Off - Put the clean packages that you want to keep in memory in a startup.pl file that is PerlRequire'd by the httpd.conf file - Write the handler (more details below) - After the PerlRequire statement, install the handler as a PerlCleanupHandler That should do it. Here are the details about the cleanup handler in pseudocode: BEGIN { load the list of packages that are in memory now into a global variable } sub handler { look through the list of packages in memory and see if there are entries in the global variable if not, then flush them out (code you can copy from PerlRun.pm in mod_perl source) after flushing it out, then clear the entry in %INC } The BEGIN {} makes it so that you NEED to load this handler after the startup.pl stuff because otherwise the handler will flush the clean packages you have listed in the startup.pl file. Also, we actually wrote a database package that acts exactly like Apache::DBI (but has some customized features) so we didn't end up using the Apachage::DBI package. However, for persistent connections this might be something that you want to look into. I hope this makes sense. Let me know if you have any questions. If you can wait a few weeks (2-3) you can just grab the handler from me :) Just so you know, after all the optimizations that we have been able to practically deal with (cleaning systems modules, that kind of thing) we are getting 100%-400% speed increases. Pretty nice, huh? Andrew Chen Intern, Architecture [EMAIL PROTECTED] 206-219-8445 The Cobalt Group, Inc. On Tue, 25 Jul 2000, Pramod Sokke wrote: Hi Andrew, I've been following your mails regarding porting your CGIs to mod_perl on the mod_perl mailing list, but I got lost after a few mails. But I know that you celebrated success at the end of it allanother mod_perl sucess. Basically, the reason I'm writing to you now is because I have the exact same challenge as you had when you started this project - migrate CGIs to mod_perl. As with your case, our code is too dirty to use Apache::Registry, so I have to use Apache::PerlRun. Our code base is huge and our application is very database intense, in the sense that there are too many calls to the database. I would appreciate if you could tell me in as much detail as possible about how exactly you went about doing this migration. I know this is too much trouble for you, but you'll be helping another soul a lot :) I'm not in a big hurry, so you can take your time to write this up. It'll be really useful if you can give me as much details as possible. If you already have a document that you wrote about this, that would great too. Thanks in advance! -Pramod
RE: Newbie Installation Problem
I tried doing PREFIX=/usr (I'm using Redhat layout), but still the same error. I also checked the permissions and I did have write permissions to /usr/lib/perl5/5.00503/ExtUtils/ . Thing is, I installed with no problems yesterday using the same method as today and now it suddenly has an error. Anyways, thanks for your time Jason. Adelaide =) On Tue, 25 Jul 2000, you wrote: On 25-Jul-2000 Adelaide Yip wrote: ModPerl 1.24 configures fine on Redhat 6.2, but sometimes during it's installation I receive this error ... Warning: You do not have permissions to install into /usr/lib/perl5/site_perl/5.005/i386-linux at /usr/lib/perl5/5.00503/ExtUtils/Install.pm line 61. mkdir /usr/lib/perl5/site_perl/5.005/i386-linux/auto/Apache/include: Permission denied at /usr/lib/perl5/5.00503/ExtUtils/Install.pm line 114 make: *** [pure_site_install] Error 2 The error says it all. You don't have permissions to install into the standard perl lib directory. You probably need to be root. If you want to install somewhere other than the standard lib directory than you need to add: PREFIX=/tmp/foo/bar to your ./configure command. -- Jason Bodnar + [EMAIL PROTECTED] + Team Linux Homer: I keep hearing this horrible irregular thumping noise. Pump Jockey: It's your heart. And I think it's on its last thump. Homer: Whew, I was afraid it was my transmission. Homer's Triple Bypass
RE: Newbie Installation Problem
The permissions problems don't appear to be with the ExtUtils directory. It's trying to mkdir /usr/lib/perl5/site_perl/5.005/i386-linux/auto/Apache/include. Somewhere among those directories you don't have permission. And, I misspoke before about PREFIX. First, PREFIX doesn't do everything correctly. You need to use 'LIB=/tmp/foo/bar INSTALLMAN3DIR=/tmp/foo/bar/man'. Second, PREFIX, LIB or whatever for mod_perl needs to be added to 'perl Makefile.PL' as so: perl Makefile.PL whatever mod_perl/apache options you're setting LIB=/tmp/foo/bar INSTALLMAN3DIR=/tmp/foo/bar/man On 25-Jul-2000 Adelaide Yip wrote: I tried doing PREFIX=/usr (I'm using Redhat layout), but still the same error. I also checked the permissions and I did have write permissions to /usr/lib/perl5/5.00503/ExtUtils/ . Thing is, I installed with no problems yesterday using the same method as today and now it suddenly has an error. Anyways, thanks for your time Jason. Adelaide =) On Tue, 25 Jul 2000, you wrote: On 25-Jul-2000 Adelaide Yip wrote: ModPerl 1.24 configures fine on Redhat 6.2, but sometimes during it's installation I receive this error ... Warning: You do not have permissions to install into /usr/lib/perl5/site_perl/5.005/i386-linux at /usr/lib/perl5/5.00503/ExtUtils/Install.pm line 61. mkdir /usr/lib/perl5/site_perl/5.005/i386-linux/auto/Apache/include: Permission denied at /usr/lib/perl5/5.00503/ExtUtils/Install.pm line 114 make: *** [pure_site_install] Error 2 The error says it all. You don't have permissions to install into the standard perl lib directory. You probably need to be root. If you want to install somewhere other than the standard lib directory than you need to add: PREFIX=/tmp/foo/bar to your ./configure command. -- Jason Bodnar + [EMAIL PROTECTED] + Team Linux Homer: I keep hearing this horrible irregular thumping noise. Pump Jockey: It's your heart. And I think it's on its last thump. Homer: Whew, I was afraid it was my transmission. Homer's Triple Bypass -- Jason Bodnar + [EMAIL PROTECTED] + Team Linux Homer: Ooh, look at this one! The Hammer of Thor! (Reading) "It will send your pins to ... Valhalla?" Lisa? Lisa: Valhalla is where vikings go when they die. Homer: Ooh, that's some ball. The Telltale Head
further adventures with taint
Solaris 2.6, Perl 5.6, apache 1.3.9, mod_perl 1.24. I see intermittent Apache error_log entries like: [Mon Jul 24 04:08:02 2000] [error] Insecure dependency in require while running with -T switch at (eval 85) line 3. Here's what perldiag says: Insecure dependency in %s (F) You tried to do something that the tainting mechanism didn't like. The tainting mechanism is turned on when you're running setuid or setgid, or when you specify -T to turn it on explicitly. The tainting mechanism labels all data that's derived directly or indirectly from the user, who is considered to be unworthy of your trust. If any such data is used in a "dangerous" operation, you get this error. See the perlsec manpage for more information. OK, I (normally) run with PerlTaintCheck on, and I've read perlsec. My PATH is ''. How can I find out where this insecure dependency _is_, so I can turn taint back on? The timestamp tells me which script failed, and it uses a whole slew of modules. use strict; use Apache::Constants qw/:http/; use LWP; use tuner; use MIME::Lite; use HTML::Parse; I suspect MIME::Lite, but the code won't work if I remove it. How can I be sure if it's to blame, os I can attempt to patch it (or its dependencies)? Is there anything like a Taint::Carp, that'd give me a full back-trace from the insecure code (and works under mod_perl)? Running with PERL5OPT=-d is no good; the problem never shows up. perl -cwT shows nothing (which confirms that it's a runtime error, I suppose). The Guide, perlrun, perlsec, and the perl books I've read are... a little weak on Taint debugging techniques. If I can ever work through the problems I'm having, I'll be delighted to contribute some docs on this. I'd really like to run with PerlTaintCheck on - any ideas? thanks, -- Mike
Re: save as
I think you should check the httpd.conf. You should tell the Apache to handle the *.cgi or *.pl in some dir as CGI programs. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 26, 2000 6:36 AM Subject: save as Hello folks, This may be a weak question, but I have to ask it anyway. I have a script running under mod_perl. It works fine, but every once in a while the browser/\"web server\" offers to save the script instead of executing it. Any ideas ? Thanks! Arshavir
Re: Perl as DSO...whats wrong with it, specifically?
On Tue, 25 Jul 2000, Jens-Uwe Mager wrote: On Tue, Jul 25, 2000 at 04:04:12PM -0500, John Marquart wrote: In general - all of the previous threads on this topic have either gone off-list or were never resolved. Sorry, I dropped your last post onto the floor somehow. I will answer in a seperate post about these. Many thanks - very much appreciated. even w/ these patches I was unable to build it successfully. I tried to use perl 5.6 as well - but ran into more problems (unrelated?) then I had w/ 5.00503. That is strange - what kind of errors do you get? Using the following config. line: perl Makefile.PL EVERYTHING=1 USE_APACI=1 APACI_ARGS='--enable-shared=perl' Everything builds up to this point ... === src/modules/standard Target "all" is up to date. === src/modules/standard === src/modules/perl rm -f libperl.so ld -bhalt:4 -bM:SRE -bI:/usr/local/lib/perl5/5.00503/aix/CORE/perl.exp - bE:.exp -b noentry -lc -L/usr/local/lib -bI:/httpd.exp -o libperl.so mod_perl.lo perlxsi.lo perl_config.lo perl_util.lo perlio.lo mod_perl_opmask.lo Apache.lo Constants.lo ModuleConfig.lo Log.lo URI.lo Util.lo Connection.lo Server.lo File. lo Table.lo ld: 0706-004 Cannot find or read export file: .exp ld:accessx(): A file or directory in the path name does not exist. make: 1254-004 The error code from the last command is 255. Stop. make: 1254-004 The error code from the last command is 1. Stop. make: 1254-004 The error code from the last command is 1. Stop. make: 1254-004 The error code from the last command is 2. Stop. make: 1254-004 The error code from the last command is 2. Stop. make: 1254-004 The error code from the last command is 2. Stop. Since the problem appears the improper definition of the export file (I believe mod_perl.exp) I tried to link it by hand - but I don't understand the .lo files. I also tried changing -bE:$(BASEEXT).exp to -bE:mod_perl.exp. Neither of these helped. I haven't messed w/ apxs much yet - but will try it when i have time. (my mod_perl problems have actually taken back seat at the moment) thanks for all your alls help! -jamie John "Jamie" Marquart | This message posted 100% MS free. Digital Library SysAdmin| Work: 812-856-5174 Pager: 812-334-6018 Indiana University Libraries| ICQ: 1131494 D'net Team: 6265
Re: perldoc gateway/handler
Ian Mahuron wrote on Thu, 29 Jun 2000 13:59:45: Does anyone know of a good mod_perl handler or CGI for browsing the perl docs and various module docs? I'd prefer to offer this functionality to my developers on our intranet, rather then sending them off to http://search.cpan.org I've written a perldoc browser by hacking over a version of Pod::Html from Tom Christiansen and making a wrapper that shows the several modules trees overlaid onto one tree. The thing relies on my fastcgi based framework (see testwww.ethz.ch/eile). You can download both from http://testwww.ethz.ch/eile/download/ and see it in action on http://testwww.ethz.ch/perldoc/. It has some small bugs on making links, but works good enough for me. Christian.
Re: VBScript parser (was Re: Apache::ASP Question)
| so are you actually going to write a VBScript to perl parser? I was actually | thinking of undertaking this project myself, but I've never written a lexer | or a parser or anything like that. For what it's worth: Some months ago I was facing the problem of moving several ASP scripted IIS/Microsoft SQL sites to a Unix Apache/mySQL server. And instead of doing things by hand, I wrote a tool do do the conversion. It did the trick for the projects I initially intended it for. But after extending functionality over and over together with a collegue who's perl knowledge is far less advanced, I finally abonded development of my tool when it reached 1500 obfuscated lines of perl code and things got unreadible even for myself. I am planning to do a complete OO rewrite someday - but my resources are very limited at the moment. For basic VBScripting and it generates working stand-alone perl scripts suitable for plain CGI and mod_perl, test it on http://www.guru4hire.nl/asp2pl Let me know if someone starts with Parse::VBScript, I am willing to contribute. Ime
Re: perldoc gateway/handler
On Wed, 26 Jul 2000, Christian Jaeger wrote: testwww.ethz.ch/eile). You can download both from http://testwww.ethz.ch/eile/download/ and see it in action on This link doesn't seem to be working. I'm really interested in this. -dave /*== www.urth.org We await the New Sun ==*/
save as
[EMAIL PROTECTED] writes: This may be a weak question, but I have to ask it anyway. I have a script running under mod_perl. It works fine, but every once in a while the browser/\"web server\" offers to save the script instead of executing it. Any ideas ? Thanks! you should save the file, you'll probably find that it's not your perl script at all, but instead it's an error. (and that when that error is displayed, be sure to set the content-type) -- [EMAIL PROTECTED]
Perl as DSO...whats wrong with it, specifically?
I'm working with IBM (sorry! Its not my choice!) to try to get mod_perl compiled into their custom version of Apache, and their techs want to know why I can't run mod_perl as a DSO. So, I need to know, whats specifically wrong with it? Like, what are the repurcussions of it? This is going to be run under a lot of load as well. Thanks for your feedback in advance. --man Michael A. Nachbaur (KE6WIA) mnachba(at)rei(dot)com mike(at)nachbaur(dot)com http://www.nachbaur.com "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein
cvs commit: modperl/src/modules/perl Apache.xs
cholet 00/07/25 10:59:49 Modified:.Changes src/modules/perl Apache.xs Log: return code from stat() call was being ignored Revision ChangesPath 1.502 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.501 retrieving revision 1.502 diff -u -r1.501 -r1.502 --- Changes 2000/07/24 13:22:50 1.501 +++ Changes 2000/07/25 17:59:45 1.502 @@ -10,6 +10,9 @@ =item 1.24_01-dev +flush r-finfo cache if r-filename fails +[Roger Espel Llima [EMAIL PROTECTED]] + fix per-dir merging of PerlSetupEnv [Eric Cholet [EMAIL PROTECTED]] INSTALL.raven update [Adam Qualset [EMAIL PROTECTED]] 1.99 +3 -1 modperl/src/modules/perl/Apache.xs Index: Apache.xs === RCS file: /home/cvs/modperl/src/modules/perl/Apache.xs,v retrieving revision 1.98 retrieving revision 1.99 diff -u -r1.98 -r1.99 --- Apache.xs 2000/06/05 18:18:49 1.98 +++ Apache.xs 2000/07/25 17:59:48 1.99 @@ -1870,7 +1870,9 @@ get_set_PVp(r-filename,r-pool); #ifndef WIN32 if(items 1) - stat(r-filename, r-finfo); + if ((laststatval = stat(r-filename, r-finfo)) 0) { +r-finfo.st_mode = 0; + } #endif OUTPUT: