Re: Weird Perl behaviour
On Tue, Jul 18, 2000 at 11:30:44PM -0400, Rick Myers wrote: Another interesting thing about this issue: if I assign $port{$portname} + 1 to $Port, and not just $port{$portname}, it works! If I ever try to return $Port to the needed value, e.g. using the -- operator, it doesn't work again. This completely stumps me. I tried just about any trick you can think of to get the value from $port{$portname} to $Port, but I can't -- if I add to it or substract from it, it's fine, but if it somehow gets back to the original value, in any way, it doesn't work again. Does that give any new ideas as to the source of this issue? Yes. The source of the issue is that you sent your ErrorLog to /dev/null. Send it somewhere else where you can read it and you should find the error in short order. That's what I do in my configuration file -- I just trimmed it down to show just the code that matters in the sample that I sent to the list. Here's the error I get in the error log: [Wed Jul 19 10:07:14 2000] [crit] (13)Permission denied: make_sock: could not bind to port 80 It couldn't bind to port 80 because another web server is running there. This means that it didn't recognize the $Port setting, although printing $Port from within the config file prints 8010 properly. That's precisely the problem. -- Alex Shnitman [EMAIL PROTECTED] LiveLinx Extensible Solutions Ltd.
Re: Where are mod_perl coders?
davidu [EMAIL PROTECTED] writes: Hi, Our company, like.com, has been looking for some experianced mod_perl coders. We have checked most of the major job sites, including guru.com and have not come across any that have real skills. Where do all the mod_perl coders hang out? Here mostly :-) -- Dave Hodgkinson, http://www.hodgkinson.org Editor-in-chief, The Highway Star http://www.deep-purple.com Apache, mod_perl, MySQL, Sybase hired gun for, well, hire -
Segmentation Fault
Hello all, I posted this just before everyone got all excited about the ORA conference and I think it may have been overlooked. I'd really appreciate hearing from anyone who can give me some clues regarding the back trace. Cheers, Greg. I have recompiled mod_perl/apache with PERL_DEBUG=1 running gdb httpd followed by run httpd -X produces the following output: startup.pl is attempting to modify the include path... startup.pl is attempting to modify the include path... Program received signal SIGSEGV, segmentation fault 0x807ca20 in perl_handler_ismethod() (It is interesting that the "...modification..." line appears twice. I added it (once only!) to the beginning of my startup.pl so that I could see if it was being found. It somehow seems to be being found more than I expected! [Ged has pointed me at something in the guide that has a partial explanation for this...]) bt produces: #0 0x807ca20 in perl_handler_ismethod() #1 0x807d2c4 in perl_call_handler() #2 0x807ce36 in perl_run_stacked_handler() #3 0x807bb7d in perl_handler() #4 0x8096af3 in ap_invoke_handler() #5 0x80aa0f9 in ap_some_auth_required() #6 0x80aa15c in ap_process_request() #7 0x80a1a0e in ap_child_terminate() #8 0x80a1b9c in ap_child_terminate() #9 0x80a1cf9 in ap_child_terminate() #10 0x80a2326 in ap_child_terminate() #11 0x80a2ab3 in main() #12 0x400d31eb in --libc_start_main (main=0x80a276c main, argc=3, argv=0xbce4, init=0x8061f9c _init, fini=0x8136d7c _fini, rtld_fini=0x4000a610 _dl_fini, stack_end=0xbcdc) at ../sysdeps/generic/libc-start.c:90 If this makes sense to anybody please drop me a line, I've read all the way through chapters 1-6 and I'm itching to try out some code... just can't get the setup straight. Thanks, Greg PS. Here is the config again, just to be sure: Perl 5.6.0 Apache 1.3.12 mod_perl-1.24 ServerRoot is /usr/local/apache underneath which I have created the lib/perl/Apache tree for holding mod_perl modules, and dutifully entered the required code in a file called Hello.pm in this directory. DocumentRoot is /usr/local/apache/htdocs in httpd.conf I have added the following: -- IfModule mod_perl.c Include conf/perl.conf /IfModule -- conf/perl.conf looks like this: -- PerlRequire conf/startup.pl PerlFreshRestart On Location /hello/world SetHandler perl-script PerlHandler Apache::Hello /Location --- and startup.pl looks like this: --- #!/usr/local/bin/perl print "\n\tstartup.pl is attempting to modify the include path...\n\n"; BEGIN { use Apache(); use lib Apache-server_root_relative('lib/perl'); } use Apache::Registry use Apache::Constants use CGI qw(-compile :all); use CGI::Carp; 1; --
Re: ORA conference
Would someome please register sorostitiute.com? John [EMAIL PROTECTED]
Anyone know a good perl mailing list?
Hello, Whilst I am subscribed to modperl mailing list does anyone know a good general perl mailing list preferably from perl.org or .com I tried subscribing to a few but links where outdated. Any help appreciatted KS
Re: Anyone know a good perl mailing list?
kevin [EMAIL PROTECTED] writes: Hello, Whilst I am subscribed to modperl mailing list does anyone know a good general perl mailing list preferably from perl.org or .com I tried subscribing to a few but links where outdated. This is what the comp.lang.perl* Usenet newsgroups are there for. Cheers, Dave -- Dave Hodgkinson, http://www.hodgkinson.org Editor-in-chief, The Highway Star http://www.deep-purple.com Apache, mod_perl, MySQL, Sybase hired gun for, well, hire -
Re: Filtering HTML files with mod_proxy and mod_perl
Alvar Freude ([EMAIL PROTECTED]) said something to this effect: Hi, I want to create a service which filters HTML files like this: http://www.a-blast.org/web-blast.html == http://www.a-blast.org/web-blast.plx?url=http://www.nsa.gov/programs/employ/ The user should enter a proxy in his Browser config, e.g. superproxy2000.here.org:, and after this he can surf through the web and gets filtered files. Is this possible with mod_perl and md_proxy? This is what mod_proxy does on its own, no mod_perl needed. If you wanted to do it in "pure" mod_perl (no mod_proxy), write a TransHandler similar to the ones listed in chapter 7 of the Eagle book, pp 368 - 381 (pp 372 - 373, for example, is an anonymoizing proxy, and pp 374 - 381 is an ad-blocking proxy). This chapter is available on the web in its entirety at http://www.modperl.com/book/chapters/ch7.html. Pretty simple, all in all. (darren) -- Think like a man of action, act like a man of thought.
Re: Redirecting Users
Yann Ramin ([EMAIL PROTECTED]) said something to this effect: Hi. I'm trying to redirect users via. a Location header (internal redirect is not ideal - I need the browser to send the cookie to the page). The problem is specifying the header in a header_out doesn't cause it to be sent. This is my current implementation code: Yann, Check out http://perl.apache.org/guide/snippets/#Sending_Cookies_in_REDIRECT_Resp, which should answer your question. It looks like all you need to do is return REDIRECT in addition to what you're already doing. Also, http://perl.apache.org/guide/snippets/#Reading_POST_Data_then_Redirect might help, as far as REDIRECTs go. (darren) -- Blore's Razor: Given a choice between two theories, take the one which is funnier.
Re: Apache::AuthenDBI Intermittent problems
Mark Solomon ([EMAIL PROTECTED]) said something to this effect: I have been using AuthenDBI for a while and, while I cannot isolate a specific system change, apache gives a 500 error 1 out of 10 times with this in the error_log: I've tryed calling Apache::AuthenDBI from both the startup.pl and httpd.conf like this: in httpd.conf: PerlModule Apache::DBI; PerlModule Apache::AuthenDBI; I've been using Apache::AuthenDBI for a while, without any hiccoughs. I suspect the problem might be your use of Apache::DBI, since Apache::AuthenDBI makes its own database connection. Try commenting out the Apache::DBI line and see if that helps. (darren) -- I have to think hard to name an interesting man who does not drink. -- Richard Burton
Re:[OT] Anyone know a good perl mailing list?
--- David Hodgkinson [EMAIL PROTECTED] wrote: kevin [EMAIL PROTECTED] writes: Hello, Whilst I am subscribed to modperl mailing list does anyone know a good general perl mailing list preferably from perl.org or .com I tried subscribing to a few but links where outdated. This is what the comp.lang.perl* Usenet newsgroups are there for. True enough, but I can't read newsgroups through our company firewall. Email I can get. Is there *not* a list? ~sigh~ Paul __ Do You Yahoo!? Get Yahoo! Mail Free email you can access from anywhere! http://mail.yahoo.com/
Re:[OT] Anyone know a good perl mailing list?
What about reading it through deja.com? As long as you can live with the ads ... Brgds, Mike. On Wed, 19 Jul 2000 08:14:04 -0700 (PDT), Paul wrote: --- David Hodgkinson [EMAIL PROTECTED] wrote: kevin [EMAIL PROTECTED] writes: Hello, Whilst I am subscribed to modperl mailing list does anyone know a good general perl mailing list preferably from perl.org or .com I tried subscribing to a few but links where outdated. This is what the comp.lang.perl* Usenet newsgroups are there for. True enough, but I can't read newsgroups through our company firewall. Email I can get. Is there *not* a list? ~sigh~ Paul __ Do You Yahoo!? Get Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/
Re: [OT] Anyone know a good perl mailing list?
Paul wrote: --- David Hodgkinson [EMAIL PROTECTED] wrote: kevin [EMAIL PROTECTED] writes: Hello, Whilst I am subscribed to modperl mailing list does anyone know a good general perl mailing list preferably from perl.org or .com I tried subscribing to a few but links where outdated. This is what the comp.lang.perl* Usenet newsgroups are there for. True enough, but I can't read newsgroups through our company firewall. Email I can get. Is there *not* a list? ~sigh~ Could you not use deja or Remarq. Alternatively, for a small fee (per message) I will email you each and every message on your required NG and will mail any of your replies under the pseudonym 'Arthur Drainpipe'. Jon.
Re: [OT] Anyone know a good perl mailing list?
Paul [EMAIL PROTECTED] writes: True enough, but I can't read newsgroups through our company firewall. Email I can get. www.deja.com? -- Dave Hodgkinson, http://www.hodgkinson.org Editor-in-chief, The Highway Star http://www.deep-purple.com Apache, mod_perl, MySQL, Sybase hired gun for, well, hire -
Re: [OT] Anyone know a good perl mailing list?
On Wed, 19 Jul 2000, Jon Wyatt wrote: Is there *not* a list? ~sigh~ Could you not use deja or Remarq. deja just plain sucks. i am willing to set up a mailing list, if anyone is interested. i also have no patience with usenet. -- 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: What's this error?
Hi there, On Wed, 19 Jul 2000, Paul wrote: Segmentation Fault (11) I get this, too, a *LOT*. unfortunately won't have any time to RTFM for a few weeks yet. Then read .../mod_perl/SUPPORT. 73, Ged.
Re: [OT] Anyone know a good perl mailing list?
blue [EMAIL PROTECTED] writes: deja just plain sucks. i am willing to set up a mailing list, if anyone is interested. i also have no patience with usenet. But deja isn't usenet. Usenet is a decent threaded newsreader hanging off a fast NNTP feed. -- Dave Hodgkinson, http://www.hodgkinson.org Editor-in-chief, The Highway Star http://www.deep-purple.com Apache, mod_perl, MySQL, Sybase hired gun for, well, hire -
Using fork() in programs running under apache
Hi, I have a script that uses a smtp to send a message and this is causing an overload of my server, because the execution time (that would be some milisecs) is delayed by about 5 secs. I thought I could solve this by forking the process, so the user would get a faster answer and the forked process would be more light than the 7MB of apache. Does anyone have any experience in forking processes under apache? I made some tests and it looked ok, but I'm not so sure that this won't cause problems in the future. Thanks. []s Luis
Re: [OT] Anyone know a good perl mailing list?
blue wrote: On Wed, 19 Jul 2000, Jon Wyatt wrote: Is there *not* a list? ~sigh~ Could you not use deja or Remarq. deja just plain sucks. i am willing to set up a mailing list, if anyone is interested. i also have no patience with usenet. I've wanted something like this for a while also, so I just created [EMAIL PROTECTED] To subscribe, send an e-mail to [EMAIL PROTECTED] If anyone is interested in co-moderating, let me know. In any case, anyone interested in general Perl development is extremely welcome. Come help make a great list. Tom Barron [EMAIL PROTECTED]
segmentation fault with CGI::Application
I have been trying to get CGI::Application to work under mod_perl today. So far with no success. Finally I removed everything except CGI::Application from the config files, and the server dumps core on startup. I have a very stripped odwn httpd.conf that basically loads the bare minimum apache modules, then does "PerlModule CGI::Appliation". Starting httpd dumps core when it tries to start up. Running it through the debugger produces this: This GDB was configured as "i386-redhat-linux"... Core was generated by `httpd -f /nis.home/mschout/dev/gkgdrs/gkgnsi/conf/redirect/httpd.conf'. Program terminated with signal 11, Segmentation fault. #0 0x80ad4d2 in Perl_gv_init () (gdb) bt #0 0x80ad4d2 in Perl_gv_init () #1 0x80ae690 in Perl_gv_fetchpv () #2 0x806a0a5 in perl_section_hash_init () #3 0x806a375 in perl_section () #4 0x806a16d in perl_section_self_boot () #5 0x8068033 in perl_cmd_module () #6 0x8080519 in invoke_cmd () #7 0x808089c in ap_handle_command () #8 0x80808e8 in ap_srm_command_loop () #9 0x8080c57 in ap_process_resource_config () #10 0x80812e4 in ap_read_config () #11 0x8088bc5 in main () #12 0x400d79cb in __libc_start_main (main=0x80889e0 main, argc=3, argv=0xb904, init=0x8062c24 _init, fini=0x8123e1c _fini, rtld_fini=0x4000ae60 _dl_fini, stack_end=0xb8fc) at ../sysdeps/generic/libc-start.c:92 Taking out the "PerlModule CGI::Application" line causes the server to start up normally. Taking a quick glance through Application.pm, I dont see anything that should be causing the interpreter to freak out. I suspect the problem is outside of CGI::Application somewhere, but CGI::Application is demonstrating some bug here ;). Anyone have any ideas? I'm using: perl 5.6.0 mod_perl 1.24 Linux 2.2.x Has anyone else gotten CGI::Application to run in this environment? Anyone else seen this? Mike
Re: Apache::AuthenDBI Intermittent problems
I've commented it out and will report on any changes. On Wed, 19 Jul 2000, darren chamberlain wrote: Mark Solomon ([EMAIL PROTECTED]) said something to this effect: I have been using AuthenDBI for a while and, while I cannot isolate a specific system change, apache gives a 500 error 1 out of 10 times with this in the error_log: I've tryed calling Apache::AuthenDBI from both the startup.pl and httpd.conf like this: in httpd.conf: PerlModule Apache::DBI; PerlModule Apache::AuthenDBI; I've been using Apache::AuthenDBI for a while, without any hiccoughs. I suspect the problem might be your use of Apache::DBI, since Apache::AuthenDBI makes its own database connection. Try commenting out the Apache::DBI line and see if that helps. (darren) -- I have to think hard to name an interesting man who does not drink. -- Richard Burton - Mark Solomon - Information Technology Manager SEVAnet / VECTEC http://www.seva.net/ Office 757-594-7092 FAX 757-594-7833
Help! Need strategy for upgrading production system!
Hello, I have a production system (solaris 7) with apache 1.3.6 system with mod_perl.1.19 and mod_ssl.2.3.1 I would like to somehow install the latest apache + mod_perl + mod_ssl + DBI/DBD versions on the production system, BUT without interrupting the current production system. And then, after I have moved over and tested the production web application in the new server, cleanly switch over. In other words, is it possible to install new versions of apache + mod_perl + mod_ssl + DBI/DBD (and all the dependant modules) into a separate directory on the production system -- WITHOUT affecting the older apache production server? How in the world do I cleanly upgrade apache + mod_perl + mod_ssl + DBI/DBD? Thanks, Keith
Re: Help! Need strategy for upgrading production system!
For this sort of thing, I assign a second IP address to the machine, then configure everything to bind to that IP address (making sure the original implementation binds to the first IP address only). For apache and the modules, you can just create separate source directories, and designate a unique target for installation. You might want to make the target match up with the version of Apache. I.e. make the target for the new one "/usr/local/apache1.3.12". As long as the source is also separate from the production source, the modules should slide in without touching anything else. Change the configuration to point at your production document dir and script dirs, or create new document and script dirs if you're ultra paranoid. Test out on the second IP address all you want. While the server will be running on the same machine (and that presents a little bit of risk exposure), it'll be a separate instance with separate files and everything. When it comes time to move to production, shut down the test server. Change the conf file to bind to the primary address. Then, in quick succession, stop the production server and start the new server. Change over (hopefully). The trick is to start using versioned target directories for your stuff. Instead of just cramming it all in /usr/local/bin, set up /usr/local/apache1.3.12/bin etc. doug On Wed, 19 Jul 2000, Keith Kwiatek wrote: Hello, I have a production system (solaris 7) with apache 1.3.6 system with mod_perl.1.19 and mod_ssl.2.3.1 I would like to somehow install the latest apache + mod_perl + mod_ssl + DBI/DBD versions on the production system, BUT without interrupting the current production system. And then, after I have moved over and tested the production web application in the new server, cleanly switch over. In other words, is it possible to install new versions of apache + mod_perl + mod_ssl + DBI/DBD (and all the dependant modules) into a separate directory on the production system -- WITHOUT affecting the older apache production server? How in the world do I cleanly upgrade apache + mod_perl + mod_ssl + DBI/DBD? Thanks, Keith
RE: Filtering HTML files with mod_proxy and mod_perl
Hi Alvar, On 19-Jul-2000 Alvar Freude wrote: Hi, I want to create a service which filters HTML files like this: http://www.a-blast.org/web-blast.html == http://www.a-blast.org/web-blast.plx?url=http://www.nsa.gov/programs/employ/ But it should go through a proxy, you don't need to access another site and all filtering works transparent in background, within the proxy. So my idea was to make this with mod_proxy and mod_perl, but I did not found any documentation to do this. The user should enter a proxy in his Browser config, e.g. superproxy2000.here.org:, and after this he can surf through the web and gets filtered files. Is this possible with mod_perl and md_proxy? And if yes: where I can find documentation for this? Or has somebody code snippets? ;) I've created something like this. I've attached the script I used to build mod_proxy and mod_perl, and a short Apache::MyFilter to show how to use this. Note: I've cut down the handler from my version without really testing it, so it may have a couple syntax errors. I'm using it like this: VirtualHost _default_:8080 PerlTransHandler Apache::SurfLogin /VirtualHost so that I can still have a normal webserver on port 80. Hope that helps, Wim Kerkhoff, Software Engineer NetMaster Networking Solutions [EMAIL PROTECTED] MyFilter.pm BuildApache-without-modssl
RE: Filtering HTML files with mod_proxy and mod_perl
On 19-Jul-2000 Alvar Freude wrote: Is this possible with mod_perl and md_proxy? Yes (see me other post) And if yes: where I can find documentation for this? Look at http://www.apache.org/docs/mod/mod_proxy.html, as well as perldoc Apache::Proxy (once you've installed Apache::Proxy). Regards, Wim Kerkhoff, Software Engineer NetMaster Networking Solutions [EMAIL PROTECTED]
Re: Subroutine redefined errors at startup
On Tue, Jul 18, 2000 at 07:10:07PM -0700, Jim Serio wrote: I'm running Perl 5.6 and recently re-compiled Apache 1.3.12 and mod_perl 1.24 and I'm not getting various redefined errors at startup that I never got before. I've also made no changes to my startup file or httpd.conf. Here's a few of the errors: - Subroutine handler redefined at /usr/local/lib/perl5/site_perl/5.6.0/i686-linux/Apache/Registry.pm line 27. Subroutine compile redefined at /usr/local/lib/perl5/site_perl/5.6.0/i686-linux/Apache/Registry.pm line 173. - They seem to be focused on Registry and DBI. When I remove the startup.pl file from httpd.conf, I get no errors. Here's the cgi-perl section of httpd.conf: - Location /cgi-perl/ SetHandler perl-script PerlModule Apache::Registry PerlHandler Apache::Registry::handler PerlModule Apache::DBI PerlInitHandler Apache::StatINC Options ExecCGI PerlSendHeader On /Location - Here's part of my startup.pl file: - use Apache::Registry (); use Apache::Constants (); use Apache::Sandwich (); use Apache::Include (); use DBI (); use Apache::DBI (); - Should I not duplicate these modules and just have all of them in the startup file? Jim from the ApacheDBI-0.87 README: " If you plan to use persistent database connections, there is only one thing to do: add the following configuration directive to conf/httpd.conf or to your startup.pl: PerlModule Apache::DBI# this comes first !! # other modules using DBI compare to your startup.pl. might be relevant -- Carl Hansen Pictopia.com, Inc. [EMAIL PROTECTED] 510 841 6400 x 117
ApacheCon Europe - thoughts please ?
Dear All As some of you are at a conferance at the mo and I am still at work ;-( I thought I'd ask about apacheCon Europe - although not strictly mod_perl there is a relevance - even if tenous. I've never been to an IT conferance like these - and they appear quite popular. Especially the BOF's. I am considering going to the ApacheCon Europe to see what's said and put a few faces to names and meet a few people. However, I've just seen the prices - I am not saying that everyone should do this for free or not be paid thier travel / hotels, but it seems a little expensive. Three days off work + threeday pass + other expenses + travel = 5% of my income (I am contractor - hence I pay for it all). Am I being a scruge or is this a fair reflection of the cost of going to an event ? Will there be out-of-Conference events that non-conference-goeres can attend ? Thoughts from anyone ? Greg Cope
Re: segmentation fault with CGI::Application [SOLVED]
Ok. Turns out that what the real problem here was that CGI::Application uses CGI::Carp, and I needed a newer version of CGI::Carp. So I seem to have sovled this :) Mike On Wed, 19 Jul 2000, Michael J Schout wrote: I have been trying to get CGI::Application to work under mod_perl today. So far with no success. Finally I removed everything except CGI::Application from the config files, and the server dumps core on startup. I have a very stripped odwn httpd.conf that basically loads the bare minimum apache modules, then does "PerlModule CGI::Appliation". Starting httpd dumps core when it tries to start up. Running it through the debugger produces this: This GDB was configured as "i386-redhat-linux"... Core was generated by `httpd -f /nis.home/mschout/dev/gkgdrs/gkgnsi/conf/redirect/httpd.conf'. Program terminated with signal 11, Segmentation fault. #0 0x80ad4d2 in Perl_gv_init () (gdb) bt #0 0x80ad4d2 in Perl_gv_init () #1 0x80ae690 in Perl_gv_fetchpv () #2 0x806a0a5 in perl_section_hash_init () #3 0x806a375 in perl_section () #4 0x806a16d in perl_section_self_boot () #5 0x8068033 in perl_cmd_module () #6 0x8080519 in invoke_cmd () #7 0x808089c in ap_handle_command () #8 0x80808e8 in ap_srm_command_loop () #9 0x8080c57 in ap_process_resource_config () #10 0x80812e4 in ap_read_config () #11 0x8088bc5 in main () #12 0x400d79cb in __libc_start_main (main=0x80889e0 main, argc=3, argv=0xb904, init=0x8062c24 _init, fini=0x8123e1c _fini, rtld_fini=0x4000ae60 _dl_fini, stack_end=0xb8fc) at ../sysdeps/generic/libc-start.c:92 Taking out the "PerlModule CGI::Application" line causes the server to start up normally. Taking a quick glance through Application.pm, I dont see anything that should be causing the interpreter to freak out. I suspect the problem is outside of CGI::Application somewhere, but CGI::Application is demonstrating some bug here ;). Anyone have any ideas? I'm using: perl 5.6.0 mod_perl 1.24 Linux 2.2.x Has anyone else gotten CGI::Application to run in this environment? Anyone else seen this? Mike
JOB: Mod perl Consultant/Mentor Need IMMEDIATELY
I HAVE AN URGENT NEED FOR AN EXPERIENCED MOD_PERL CONSULTANT ! I would prefer someone in the Santa Monica/Los Angeles area for onsite work, but will consider tele-workers if necessary. This is initially a short and intense project to port a relatively small number of somewhat complex perl scripts (that talk to Oracle) to mod_perl. David Wachtel Chief Technology Officer US Search.com
Re: Anyone know a good perl mailing list?
The perl-win32-users list is quite good. It is definitely NOT limited to win32 issues. Pretty active and helpful list. Subscribe at http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
Customized Module For Logging In Transfer Log
Hi, I am new to apche and mod_perl. I am trying to write apache module to write some additional parameters to transfer log (access.log). Is anybody have an idea, how can we write additional stuff to access.log including the defaults. Any help appreciated. Thanks, SGoyal
JOB: Application Perl Person needed
Hey folks, Viralon is hiring perl monkeys. We're in San Francisco: http://www.viralon.com/Employment.html#appdev -- j u l e s @ p o p m o n k e y . c o m http://www.popmonkey.com/jules
Re: Filtering HTML files with mod_proxy and mod_perl
On 19-Jul-2000 Alvar Freude wrote: Hi Wim, I've created something like this. I've attached the script I used to build mod_proxy and mod_perl, and a short Apache::MyFilter to show how to use this. Note: I've cut down the handler from my version without really testing it, so it may have a couple syntax errors. thanx! But ... I think it doesn't work in my case, because I have to change the HTML-content itself. Or do you get somewhere the plain HTML-Content of the final HTTP-Request? If yes this part is missing in the example! ;) Nope... Apache::Proxy just passes it on, AFAIK. If you find a way to do it with Apache::Proxy, let the list know. One of the major reasons I went this route over something like the examples in the mod_perl book, was speed. Downloading big files using the examples book was slow, as apache first gathers the content up into a variable (where you can do your regular expressions or whatever manipulating), then sent it to the browser. You would need a lot of memory in this situation. With mod_proxy, apache starts pushing data of to the client as soon as it gets it from the server. Regards, Wim Kerkhoff, Software Engineer NetMaster Networking Solutions [EMAIL PROTECTED]
[OT]: Re: ApacheCon Europe - thoughts please ?
At 11:18 AM 7/19/00 +, Greg Cope wrote: Dear All As some of you are at a conferance at the mo and I am still at work ;-( I thought I'd ask about apacheCon Europe - although not strictly mod_perl there is a relevance - even if tenous. I've never been to an IT conferance like these - and they appear quite popular. Especially the BOF's. I can see why you are having trouble understanding why the expense is worth it if you've never gone. I am considering going to the ApacheCon Europe to see what's said and put a few faces to names and meet a few people. However, I've just seen the prices - I am not saying that everyone should do this for free or not be paid thier travel / hotels, but it seems a little expensive. Three days off work + threeday pass + other expenses + travel = 5% of my income (I am contractor - hence I pay for it all). 795 pounds for early bird special? Translates to about US$1400. That seems pretty reasonable for a 3-day conference. I've seen ones that cost more. Am I being a scruge or is this a fair reflection of the cost of going to an event ? Will there be out-of-Conference events that This is the fair cost and you are being a scruge. There are cheaper conferences around but they are usually grass roots, holed up in a university etc... non-conference-goeres can attend ? Thoughts from anyone ? Yeah, you're being pretty cheap. :) Well, I'm sort of kidding here. But the reality is that a conference offers a lot -- not just knowledge (then just attend a tutorial locally at Sun or someplace) but networking. The coordination of a conference is a huge task. Anyway, most conferences do have a free vendor expo, but I don't think that it's nearly as good as going to a whole conference. If you really want to attend a conference for "free", why don't you contribute back to the community that has been helping you make a living and give a talk? Let's put it this way, conferences are pure and simple a business expense BUT they are also fun. Don't go if it's not fun. Then look at it like this... what do you pay to go on vacation? Surely it's the same basic formula minus the conference fee which by itself is less expensive than getting training the equivalent days at SUN. If you didn't go on vacation because it cost you 5% of your salary... OK then... that's your choice... then I guess I would find it hard to convince you that it's also worth it to go to a conference. Later, Gunther __ Gunther Birznieks ([EMAIL PROTECTED]) eXtropia - The Web Technology Company http://www.extropia.com/
Re: Weird Perl behaviour
On Jul 19, 2000 at 10:09:36 +0300, Alex Shnitman twiddled the keys to say: On Tue, Jul 18, 2000 at 11:30:44PM -0400, Rick Myers wrote: Another interesting thing about this issue: if I assign $port{$portname} + 1 to $Port, and not just $port{$portname}, it works! If I ever try to return $Port to the needed value, e.g. using the -- operator, it doesn't work again. This completely stumps me. I tried just about any trick you can think of to get the value from $port{$portname} to $Port, but I can't -- if I add to it or substract from it, it's fine, but if it somehow gets back to the original value, in any way, it doesn't work again. Does that give any new ideas as to the source of this issue? Yes. The source of the issue is that you sent your ErrorLog to /dev/null. Send it somewhere else where you can read it and you should find the error in short order. That's what I do in my configuration file -- I just trimmed it down to show just the code that matters in the sample that I sent to the list. Here's the error I get in the error log: [Wed Jul 19 10:07:14 2000] [crit] (13)Permission denied: make_sock: could not bind to port 80 It couldn't bind to port 80 because another web server is running there. This means that it didn't recognize the $Port setting, although printing $Port from within the config file prints 8010 properly. That's precisely the problem. After fooling with this for several hours I've finally come to the conclusion that this is probably an Apache "problem". The quickest way to illustrate it is trying this Perl section... Perl my %port = ( zz = 8014 ); warn "PORTHASH: $port\n"; use POSIX (); my $portname = POSIX::getcwd(); chomp $portname; warn "PORTNAME1: '$portname'\n"; $portname =~ s:.*/::; warn "PORTNAME2: '$portname'\n"; $Port = $port{$portname}; warn "PORT: '$Port'\n"; my $ppid = getppid; warn "PPID: $ppid\n"; /Perl Now, try running your server as before, but make sure you have access to the ErrorLog file. You'll notice that several of the warn()'s generate completely different output in the error_log than they do on your shell screen. The first significant difference is that PORTNAME1 points to `/home/zz' (or wherever you started httpd from) in your shell, while in the error_log it points to `/'. I'd almost bet money that the conf file is parsed the first time under your shell, then again after Apache has disassociated itself, thus showing you seemingly valid output on the shell. If you then grep through the Apache source you'll find this in src/main/http_main.c... static void detach(void) { #if !defined(WIN32) !defined(NETWARE) int x; chdir("/"); Bingo! Now the question is how to pass the proper directory name to mod_perl's Perl sections. The answer lies subtly tucked away on p. 423 of the Eagle book. Just add a PerlPassEnv to your conf file... PerlPassEnv PWD Then use $ENV{PWD} instead of POSIX::getcwd() and you should be all set. *whew* Rick Myers[EMAIL PROTECTED] The Feynman Problem 1) Write down the problem. Solving Algorithm 2) Think real hard. 3) Write down the answer.
Re: Filtering HTML files with mod_proxy and mod_perl
Hi Wim, I've created something like this. I've attached the script I used to build mod_proxy and mod_perl, and a short Apache::MyFilter to show how to use this. Note: I've cut down the handler from my version without really testing it, so it may have a couple syntax errors. thanx! But ... I think it doesn't work in my case, because I have to change the HTML-content itself. Or do you get somewhere the plain HTML-Content of the final HTTP-Request? If yes this part is missing in the example! ;) Ciao Alvar -- Alvar C.H. Freude | [EMAIL PROTECTED] Demo: http://www.online-demonstration.org/ | Mach mit! Blast-DE: http://www.assoziations-blaster.de/ | Blast-Dich-Fit Blast-EN: http://www.a-blast.org/ | Blast/english
Re: Filtering HTML files with mod_proxy and mod_perl
Hi, This is what mod_proxy does on its own, no mod_perl needed. including filtering? If you wanted to do it in "pure" mod_perl (no mod_proxy), write a TransHandler similar to the ones listed in chapter 7 of the Eagle book, pp 368 - 381 (pp 372 - 373, for example, is an anonymoizing proxy, and pp 374 - 381 is an ad-blocking proxy). This chapter is available on the web in its entirety at http://www.modperl.com/book/chapters/ch7.html. Pretty simple, all in all. yes, I think this is ECAXTLY this what I an searching for! thanks! Ciao Alvar -- Alvar C.H. Freude | [EMAIL PROTECTED] Demo: http://www.online-demonstration.org/ | Mach mit! Blast-DE: http://www.assoziations-blaster.de/ | Blast-Dich-Fit Blast-EN: http://www.a-blast.org/ | Blast/english
Re: Filtering HTML files with mod_proxy and mod_perl
Hi, If you find a way to do it with Apache::Proxy, let the list know. I am sure it will work with the example given by Darren. If i checked it I think I'll create a small module and can spread it. One of the major reasons I went this route over something like the examples in the mod_perl book, was speed. Downloading big files using the examples book was slow, as apache first gathers the content up into a variable (where you can do your regular expressions or whatever manipulating), then sent it to the browser. You would need a lot of memory in this situation. yes, but if you use a subroutine which handles the incoming chunks, you can pass the file emmediatly. See http://theoryx5.uwinnipeg.ca/CPAN/data/libwww-perl/lwpcook.html at the bottom :) Ciao Alvar -- Alvar C.H. Freude | [EMAIL PROTECTED] Demo: http://www.online-demonstration.org/ | Mach mit! Blast-DE: http://www.assoziations-blaster.de/ | Blast-Dich-Fit Blast-EN: http://www.a-blast.org/ | Blast/english
Re: What's this error?
I have also noted a fair amount of [Wed Jul 19 16:01:58 2000] [notice] child pid 24703 exit signal Segmentation Fault (11) I get this, too, a *LOT*. Err... I'm convinced that our current mod_ssl 2.6.5 is 100% stable and does not produce any segfaults. If you really get segfaults, some other component causes it. Let me guess: You're running PHP or mod_ssl+OpenSSL as a DSO underf Solaris, right? Forgive the "me, too"-ism, here, but this problem just won't seem to go away. I'm running on HP-UX B.10.20 (best the company will spring for) on a PARISC1.1 9000/891. I probably did build DSO, though, and I really don't need it. Hmm think the same prob might apply here? If no, then I've no clue and you have to attach a debugger to find out where it segfaults. Somebody suggest a debugger? I'm feeling pretty ignorant, here, and unfortunately won't have any time to RTFM for a few weeks yet. (~mumblegrumble~) Paul __ Do You Yahoo!? Get Yahoo! Mail Free email you can access from anywhere! http://mail.yahoo.com/