Apache::ASP [undefined subroutine]
[I have full support from my hosting company to set this Apache::ASP module up] Apache::ASP version 0.18 Server : Apache/1.3.11 (Unix) mod_perl/1.21 PHP/3.0.14 mod_frontpage/3.0.4.3 mod_ssl/2.5.0 OpenSSL/0.9.4 Problem : Error msg --> Undefined subroutine &Apache::ASP::Demo::ServerVariables called at (eval 12) line 2. I know I have to do something with defining the stuff, but the /site/ didn't give me much help :(( Is ServerVariables a 'default' subroutine ??? Another script is also bugging on me : http://www.aitsh.nl/dev/test/hangman.asp You can view my .htaccess & global.asa [just copied from /site/eg/] : http://www.aitsh.nl/dev/test/.htaccess http://www.aitsh.nl/dev/test/global.asa Source of files : http://www.aitsh.nl/dev/test/source.asp?file=hangman.asp http://www.aitsh.nl/dev/test/source.asp?file=getenv.asp /site/ directory : http://www.aitsh.nl/dev/Apache-ASP-0.18/site/ I also copied DemoASP.pm from somewhere, cause this global.asa required it... Please give me a hand so I can run 'normal/standard' ASP-scripts from for example www.aspin.com Regards and thanks in advance, -- Wouter de Jong Advanced IT Services Holland PS. The site can be difficult to dispaly [I'm sorry], but that's because they got new lines [to AMS-IX (backbone)]
UPDATED: HelloWorld Benchmarks with Resin & OpenASP !
Hey, The HelloWorld benchmarks at http://www.chamas.com/bench/ have been updated with numbers for Resin's JSP and OpenASP's VBScript, and with developer feedback, now shows more accurate groupings by system and code type. Check out in particular http://www.chamas.com/bench/hello_bysystem.html#group29 which shows JSP to be faster than a mod_perl handler on WinNT apache 1.3.6 ... mod_perl runs much faster on Linux than WinNT so would expect this to even out on a Unix box, but all the same, pretty darn fast. Also note Resin's optimized httpd serves the JSP faster than IIS serves VBScript. Note about testing Resin, the resin httpd is tricky to benchmark because the WinNT version comes with logging off by default. For the Hello World benchmark to be reasonable, you must turn logging on, all the same the Resin httpd seems to intelligently buffer output to the log file, so it didn't make much difference anyway. -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks >> free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
ANNOUNCE: Apache::ASP v.18 with Cookieless Sessions!
Hey, The latest version of Apache::ASP v.18 is up in your local CPAN, or http://www.perl.com/CPAN-local/modules/by-module/Apache/ The biggest deal in this release is cookieless session support, which might become more of an issue for sites with the likes of DoubleClick scaring off users from using cookies. Cookieless session support is tricky business, and you can read on a couple of implementations at: http://www.nodeworks.com/asp/cookies.html http://www.nodeworks.com/asp/config.html#Cookieless%20Sessions and see them in action at: http://www.nodeworks.com/asp/eg/session.asp http://www.nodeworks.com/asp/eg/session_query_parse.asp Below is a list of changes for this module, or if you want a historical look, check out: http://www.nodeworks.com/asp/changes.html Major new config settings include UseStrict, StatScripts, FileUploadMax, FileUploadTemp, SessionQuery*, and StateSerializer which you can view at: http://www.nodeworks.com/asp/config.html ENJOY! -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks >> free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051 +Documented SessionQuery* & $Server->URL() and cleaned up formatting some, as well as redoing some of the sections ordering for better readability. Document the cookieless session functionality more in a new COOKIES section. Also documented new FileUpload configs and $Request->FileUpload collection. Documented StatScripts. +StatScripts setting which if set to 0 will not reload includes, global.asa, or scripts when changed. +FileUpload filehandles cleanup at garbage collection time so developer does not have to worry about lazy coding and undeffing filehandles used in code. Also set uploaded filehandles to binmode automatically on Win32 platforms, saving the developer yet more typing. +FileUploadTemp setting, default 0, if set will leave a temp file on disk during the request, which may be helpful for processing by other programs, but is also a security risk in that others could potentially read this file while the script is running. The path to the temp file will be available at $Request->{FileUpload}{$form_field}{TempFile}. The regular use of file uploads remains the same with the <$filehandle> to the upload at $Request->{Form}{$form_field}. +FileUploadMax setting, default 0, currently an alias for $CGI::POST_MAX, which determines the max size for a file upload in bytes. +SessionQueryParse only auto parses session-ids into links when a session-id COOKIE is NOT found. This feature is only enabled then when a user has disabled cookies, so the runtime penalty of this feature won't drag down the whole site, since most users will have cookies turned on. -StatINC & StatINCMatch will not undef Fnctl.pm flock functions constants like O_RDWR, because the code references are not well trackable. This would result in sporadic 500 server errors when a changed module was reloaded that imported O_* flock functions from Fnctl. +SessionQueryParse & SessionQueryParseMatch settings that enable auto parsing session ids into URLs for cookieless sessions. Will pick up URLs in , , , , , , , $Response->Redirect($URL) and the first URL in script tags like *.location.href=$URL These settings require that buffering be enabled, as Apache::ASP will parse through the buffer to parse the URLs. With SessionQueryParse on, it will just parse non-absolute URLs, but with SessionQueryParseMatch set to some server url regexp, like http://www.mysite.com, will also parse in the session id for URLs that match that. When testing, the performance hit from this parsing a script dropped from 12.5 hits/sec on my WinNT box to 11.7 hits per second for 1K of buffered output. The difference is .007 of my PII300's processing power per second. For 10K of output then, my guess is that this speed of script, would be slowed to 6.8 hits per second. This kind of performance hit would also slow a script running at 40 hits per second on a UNIX box to 31 hits/sec for 1K, and to 11 hits/sec for 10K parsed. Your mileage may vary and you will have to test the difference yourself. Get yourself a valid URL with a session-id in it, and run it through ab, or socrates, with SessionQuery turned on, and then with SessionQueryParse set to see the difference. SessionQuery just enables of session id setting from the query string but will not auto parse urls. -If buffering, Content-Length will again be set. It broke, probably while I was tuning in the past couple versions. +UseStrict setting compiles all scripts including global.asa with "use strict" turned on for catching more coding errors. With this setting enableb, use strict errors die during compilation forcing Apache::ASP to
RE: newbie question: extra Content-Type headers?
Thanks. Upgrading to 2.56 did fix it. My system still had CGI version 2.36. -john. > -Original Message- > From: Stas Bekman [mailto:[EMAIL PROTECTED]] > Sent: Saturday, February 05, 2000 1:33 AM > To: Wendell > Cc: John Darrow; [EMAIL PROTECTED] > Subject: Re: newbie question: extra Content-Type headers? > > > > On Fri, Feb 04, 2000 at 06:21:21PM -0800, John Darrow wrote: > > > I apologize if this is a dumb question, but I just installed > Apache and > > > mod_perl and all seems to have gone well. The trouble comes > in when I try > > > to run a script using Apache::Registry and CGI.pm. I get an extra > > > Content-Type in the resulting page, and I can't figure out > where it's coming > > > from. > > [snipped the rest] > > > > perldoc cgi_to_mod_perl > > > > search the pod for "PerlSendHeader" > > CGI.pm long ago has become mod_perl aware. If you remove PerlSendHeader, > other scripts that don't use CGI.pm won't work correctly. > > Upgrade CGI.pm as suggested by Brian and your problem will disappear. > > ___ > Stas Bekmanmailto:[EMAIL PROTECTED] http://www.stason.org/stas > Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC > perl.apache.orgmodperl.sourcegarden.org perlmonth.comperl.org > single o-> + single o-+ = singlesheavenhttp://www.singlesheaven.com >
HELP! Core dumps using $r->pnotes().
I'm getting occasional segfaults when calling the $r->pnotes() method. There are no errors in the error log, until I get a line like this: [Sat Feb 5 19:36:58 2000] [notice] child pid 19989 exit signal Segmentation fault (11), possible coredump in /backend/scratch (I ran the mod_perl server on a high port as an unprivileged user so that it doesn't have to suid and is allowed to dump core.) I've got a braindead apache proxy running on port 80 which proxies back to the mod_perl server for dynamic content. I've got a PerlTransHandler which runs for each request and sticks a bunch of data (acquired from cookies or munged urls) into a session object (of my own devising, not Apache::Session) which gets passed from handler to handler as a request pnote.bvg The segfault behavior didn't come up in testing in our lab, but under the heavy loads of the production systems it comes up every 1000-2000 hits or so, manifesting as a cluster of segfaulting child processes. My knowledge of Perl internals is sketchy at best, but from the backtrace below, it looks like the segfaults are happening when Perl tries to allocate a new Hash struct for an undefined pnote. Doug? Anyone? Does anyone have a clue as to what's going on here? Code Snippet: -- sub handler{ my $r = shift; . . # a bunch of code that determines what types of requests to decline . my $emusic_param; my $Session = Emusic::Session->new; (undef,$emusic_param,@rest) = split '/', $r->uri; $Session->parse_emusic_params($emusic_param); # gets useful info out of the munged uri and puts it in the Session object $r->pnotes('session' => Session); . .# then we rebuild the URI from the leftovers... . return DECLINED; } -- Configuration: -- Apache 1.3.6, mod_per 1.21 (statically linked) Linux 2.2.5 Makefile.pl options: EVERYTHING=1 PERL_DEBUG=1 ADD_MODULE=so,rewrite,proxy Linked against libperld.a. -- Here's a backtrace from gdb: -- #0 XS_Apache_pnotes (cv=0x8230500) at Apache.xs:1636 1636if(!cfg->pnotes) cfg->pnotes = newHV(); (gdb) bt #0 XS_Apache_pnotes (cv=0x8230500) at Apache.xs:1636 #1 0x811a7f7 in Perl_pp_entersub () at pp_hot.c:2255 #2 0x8113504 in Perl_runops_debug () at run.c:66 #3 0x80d3092 in perl_call_sv (sv=0x895af10, flags=4) at perl.c:1317 #4 0x809114b in perl_call_handler (sv=0x895af10, r=0x89b289c, args=0x0) at mod_perl.c:1510 #5 0x809097b in perl_run_stacked_handlers (hook=0x817282a "PerlTransHandler", r=0x89b289c, handlers=0x895af40) at mod_perl.c:1239 #6 0x808f6fd in perl_translate (r=0x89b289c) at mod_perl.c:884 #7 0x80a8e14 in run_method (r=0x89b289c, offset=0, run_all=0) at http_config.c:360 #8 0x80a8e70 in ap_translate_name (r=0x89b289c) at http_config.c:372 #9 0x80bc00c in process_request_internal (r=0x89b289c) at http_request.c:1112 #10 0x80bc4ec in ap_process_request (r=0x89b289c) at http_request.c:1236 #11 0x80b41ee in child_main (child_num_arg=14) at http_main.c:3906 #12 0x80b444c in make_child (s=0x81a570c, slot=14, now=949779152) at http_main.c:4034 #13 0x80b44f9 in startup_children (number_to_start=36) at http_main.c:4061 #14 0x80b4b16 in standalone_main (argc=1, argv=0xbd34) at http_main.c:4348 #15 0x80b5283 in main (argc=1, argv=0xbd34) at http_main.c:4649 #16 0x400a4cb3 in __libc_start_main (main=0x80b4f5c , argc=1, argv=0xbd34, init=0x80607f0 <_init>, fini=0x816903c <_fini>, rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbd2c) at ../sysdeps/generic/libc-start.c:78 -- 'perl -V' sez: -- Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=linux, osvers=2.2.5-15smp, archname=i686-linux uname='linux zebra.zoo.emusic.com 2.2.5-15smp #1 smp mon apr 19 22:43:28 edt 1999 i686 unknown ' hint=recommended, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef Compiler: cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) cppflags='-Dbool=char -DHAS_BOOL' ccflags ='-Dbool=char -DHAS_BOOL' stdchar='char', d_stdstdio=undef, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt libc=, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Built under linux Compiled at Jul 15 1999 02:15:18 @INC: /usr/lib/perl5/5.00503/i686-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i686-linux /usr/lib/perl5/site_perl/5.005 . --
[RareModules] CGI::WeT
Not in the Apache::* list, but designed to use mod_perl. It's a module, and it's rare. The best way to describe this is as a module trying to do in mod_perl with HTML what the Cacoon project is trying to do with XML in Java ( http://xml.apache.org/cocoon/index.html ). The module is designed to work trivially with scripts written with CGI.pm by replacing the `use CGI qw(:standard);' line with `use CGI::WeT qw(:standard);' and one additional line of code at the end of the script: `CGI::WeT->show_page if $CGI::WeT::VERSION;' to actually render the page. I haven't figured out yet how to make it any easier... Any suggestions would be appreciated. The name comes from '_We_b _T_hem{ing,es}'. The module design should allow easy modification to work with XML as Cacoon does. If anyone is interested, let me know. The Authen::Ticket package (also available on CPAN) is designed to work with either CGI.pm or CGI::WeT, whichever is available. N.B.: Please direct communication regarding this package to <[EMAIL PROTECTED]>. -- James Smith <[EMAIL PROTECTED]>, 409-862-3725 Texas A&M CIS Operating Systems Group, Unix
does ssl encrypt basic auth?
Is a basic authentication password, entered via a connection to an https/SSL server, encrypted or plain text across the wire?
Re: module/sandwich kills otherwise nice make test
I have been experiencing the same problem, I am running Redhat 6.1 also, but using Apache/1.3.11. CPAN also says the latest version of Sandwich is installed. In the end I deleted sandwich.t from the t folder to build apache and it seems to work to the extent I have tested it, but I haven't done any thorough testing yet, since I am still trying to get the httpd_docs server to build nicely :) But if anyone has a solution better than deleting sandwich.t i'd be interested to hear it... -- James Furness <[EMAIL PROTECTED]> ICQ #: 4663650 - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 04, 2000 9:30 PM Subject: module/sandwich kills otherwise nice make test > Hello, I searched the mod_perl archive and couldn't > find any instances where module/sandwich (which I don't > need or want) was the one test which failed in the > installation of mod_perl. > modules/sandwichFAILED test 1 > Failed 1/1 tests, 0.00% okay > Failed Test Status Wstat Total Fail Failed List of failed > -- -modules/sandwic 11 100.00% 1
Re: Logging problem with manual authentication
At 03:07 PM 02/05/00 +0100, Rene' Seindal wrote: >Below is a small test program, which manages to send back a 401 response >to get the browser to prompt for a password, and to extract the username >and password on the following request. The program works as expected, >except that the entries in the access_log give a status code of 200 for >both requests, even though the first returns a 401. I have tested with >lynx -trace and manually, and the servers does reply with a 401, only it >logs a 200. > print $q->header(-type=>'text/plain', >-nph=>1, >-status=>'401 Unauthorized', > -WWW_Authenticate=>'Basic realm="hej"'); Instead of the above, try setting $r->status(AUTH_REQUIRED) and then call exit. There's also the special %>s custom log format. Check that out in the Apache docs, but I'm not sure if it will work here. Bill Moseley mailto:[EMAIL PROTECTED]
[RareModules] new Apache::Status features (Memory Usage)
Someone has asked how to check the compiled size of subs and vars in mod_perl. New Apache::Status does it for you. There are many new features in the new Apache::Status, this post covers only the 'Memory Usage' feature. Apparently it's a very easy task. Installation: * grab the latest CVS snaphost of mod_perl (you need the latest Apache::Status module) perl.apache.org/from-cvs/modperl * build mod_perl * install B::TerseSize Configuration: * Configure /perl-status if you didn't before, e.g: SetHandler perl-script PerlHandler Apache::Status order deny,allow #deny from all #allow from ... * Add to httpd.conf PerlSetVar StatusOptionsAll On PerlSetVar StatusTerse On PerlSetVar StatusTerseSize On PerlSetVar StatusTerseSizeMainSummary On * start the server (best in httpd -X mode) Usage: >From your favorite Netscape browser * fetch http://localhost/perl-status * clock on 'Loaded Modules' or 'Compiled Registry Scripts' * click on module or script of your choice (you might need to run some script/handler before you will see it here unless it was preloaded) * click on 'Memory Usage' at the bottom * Now you will see all the variables and subs and their sizes. Note (you might have to reload it a few times, at least it failed for me every 2nd reload). Now you can start to optimize your code, or choose one of the 2 versions. To show you how you can help yourself let's prepare 2 script one For example let's compare OO vs methods CGI.pm's interfaces: As you will see below the first OO script uses about 2k bytes while the second script (methods interface) uses about 18k. I'm not trying to prove a thing, just bringing an example so please no protest is required :) Here are the code and the numbers: Code: 1) use CGI (); my $q = new CGI; print $q->header; print $q->b("Hello"); 2) use CGI qw(:standard); print header(); print b("Hello"); Sizes: 1) Totals: 1966 bytes | 27 OPs handler 1514 bytes | 27 OPs exit 116 bytes | 0 OPs 2) Totals: 17969 bytes | 19 OPs handler 1117 bytes | 19 OPs start_multipart_form 132 bytes | 0 OPs use_named_parameters 132 bytes | 0 OPs end_multipart_form130 bytes | 0 OPs restore_parameters130 bytes | 0 OPs server_software 127 bytes | 0 OPs server_protocol 127 bytes | 0 OPs path_translated 127 bytes | 0 OPs save_parameters 127 bytes | 0 OPs scrolling_list126 bytes | 0 OPs request_method126 bytes | 0 OPs password_field126 bytes | 0 OPs checkbox_group126 bytes | 0 OPs query_string 124 bytes | 0 OPs import_names 124 bytes | 0 OPs virtual_host 124 bytes | 0 OPs remote_ident 124 bytes | 0 OPs content_type 124 bytes | 0 OPs image_button 124 bytes | 0 OPs remote_addr 123 bytes | 0 OPs remote_host 123 bytes | 0 OPs URL_ENCODED 123 bytes | 0 OPs tmpFileName 123 bytes | 0 OPs server_port 123 bytes | 0 OPs param_fetch 123 bytes | 0 OPs radio_group 123 bytes | 0 OPs server_name 123 bytes | 0 OPs script_name 123 bytes | 0 OPs remote_user 123 bytes | 0 OPs uploadInfo122 bytes | 0 OPs start_html122 bytes | 0 OPs autoEscape122 bytes | 0 OPs start_form122 bytes | 0 OPs user_agent122 bytes | 0 OPs raw_cookie122 bytes | 0 OPs Delete_all122 bytes | 0 OPs blockquote122 bytes | 0 OPs popup_menu122 bytes | 0 OPs url_param 121 bytes | 0 OPs user_name 121 bytes | 0 OPs MULTIPART 121 bytes | 0 OPs startform 121 bytes | 0 OPs cgi_error 121 bytes | 0 OPs auth_type 121 bytes | 0 OPs path_info 121 bytes | 0 OPs filefield 121 bytes | 0 OPs textfield 121 bytes | 0 OPs textarea 120 bytes | 0 OPs basefont 120 bytes | 0 OPs checkbox 120 bytes | 0 OPs redirect 120 bytes | 0 OPs defaults 120 bytes | 0 OPs end_html 120 bytes | 0 OPs frameset 120 bytes | 0 OPs end_form 120 bytes | 0 OPs self_url 120 bytes | 0 OPs endform 119 bytes | 0 OPs comment 119 bytes | 0 OPs referer 119 bytes | 0 OPs isindex 119 bytes | 0 OPs caption 119 bytes | 0 OPs address 119 bytes | 0 OPs Accept118 bytes | 0 OPs upload118 bytes | 0 OPs hidden118 bytes | 0 OPs strike118 bytes | 0 OPs Delete118 bytes | 0 OPs submit118 bytes | 0 OPs button118 bytes | 0 OPs Select118 bytes | 0 OPs ilayer118 bytes | 0 OPs header118 bytes | 0 OPs applet118 by
Re: module/sandwich kills otherwise nice make test
Per Your Request (Thanks again Vivek): According to -MCPAN -e shell I *am* using the most current Apache::Sandwich. For those of us who have just tuned in, I am installing mod_perl1.21 on redhat6.1 apache1.3.9 and generally using the CPAN shell and have installed just the basics (MD5, Bundle::libnet, Bundle::Apache, Bundle::CPAN, Bundle::DBD::mysql) The perl Makefile.PL AND make of mod_perl report nothing unusual. make test groans... modules/sandwichFAILED test 1 Failed 1/1 tests, 0.00% okay Sadly make test TEST_VERBOSE=1 doesn't provide any more insight with... modules/sandwichmodule Apache::Sandwich is installed 1..1 not ok 1 FAILED test 1 Failed 1/1 tests, 0.00% okay The (new/salient) feature of this message to the modperl board is the t/logs/error_log output. (Expected Errors Expurgated) [notice] Destruction->DESTROY called for $global_object [Fri Feb 4 17:30:11 2000] [warn] [notice] child_init for process 22421, report any problems to [no address given] [Fri Feb 4 17:30:16 2000] [warn] [client 127.0.0.1] log __ANON__ OK [Fri Feb 4 17:30:19 2000] [error] [client 127.0.0.1] File does not exist: /.cpan/build/mod_perl-1.21/t/docs/STAGE/u1/test.html [Fri Feb 4 17:30:19 2000] [error] [client 127.0.0.1] File does not exist: /.cpan/build/mod_perl-1.21/t/docs/STAGE/u1/nochance.html [Fri Feb 4 17:30:19 2000] [error] [client 127.0.0.1] File does not exist: /.cpan/build/mod_perl-1.21/t/docs/nochance.html Subroutine exit redefined at (eval 172) line 1 *** The following [error] is expected, no cause for alarm *** [Fri Feb 4 17:30:23 2000] [error] Missing right bracket at /.cpan/build/mod_perl-1.21/t/docs/badsyntax.pl line 9, at end of line syntax error at /.cpan/build/mod_perl-1.21/t/docs/badsyntax.pl line 9, at EOF [notice] child process 22421 terminating [notice] push'd PerlChildExitHandler called, pid=22421 [notice] push'd PerlChildExitHandler called, pid=22421 [notice] END block called for startup.pl [notice] Destruction->DESTROY called for $global_object PS. Apparently there is no [EMAIL PROTECTED] mailing list :)
Logging problem with manual authentication
Hi, I have a minor problem with Apache and mod_perl regarding the logging of response status codes to the access_log. I have a program where I want to do the authentication manually. The program has to have a user database anyway, so I would like to authenticate against that. Below is a small test program, which manages to send back a 401 response to get the browser to prompt for a password, and to extract the username and password on the following request. The program works as expected, except that the entries in the access_log give a status code of 200 for both requests, even though the first returns a 401. I have tested with lynx -trace and manually, and the servers does reply with a 401, only it logs a 200. localhost - - [05/Feb/2000:14:48:10 +0100] "GET /auth.cgi HTTP/1.0" 200 - localhost - - [05/Feb/2000:14:48:58 +0100] "GET /auth.cgi HTTP/1.0" 200 82 Also the username doesn't show up in the log, but that is probably because I bypass the server based authentication completely. Do I have to make a specialised PerlAuthenHandler to get this right? Never tried that before. I would probably have to reinstall Apache and mod_perl for that. Anyway, I would be happy if somebody could thred a bit of light on this. I use Apache 1.3.9, modperl 1.21, CGI.pm 2.46 -- René Seindal ([EMAIL PROTECTED]) http://www.seindal.dk/rene/ #!/usr/bin/perl -w use CGI; use Apache; use MIME::Base64; &main(new CGI()); exit(0); sub main { my ($q) = @_; my $r = Apache->request; my $auth = $r->header_in('Authorization'); if ($auth) { print $q->header('text/plain', '200 OK'); print("ACCESS OK\n"); print("Debug output\n"); print("Authorization: $auth\n"); my ($user, $pw) = split(/:/, decode_base64(substr($auth, 6))); print("User $user, Password $pw\n"); } else { local $| = 1; print $q->header(-type=>'text/plain', -nph=>1, -status=>'401 Unauthorized', -WWW_Authenticate=>'Basic realm="hej"'); print("You need a password\n"); } } ---
exit signal Alarm Clock (14)
Apache/1.3.9 (Unix) mod_perl/1.21 perl 5.005_03 [notice] child pid 16903 exit signal Alarm Clock (14) I'm confused by this one. I was thinking that this was the case of: http://perl.apache.org/guide/debug.html#Handling_the_server_timeout_case Which I though was fixed for $SIG{ALRM} and I didn't need Sys::Signal for alarms. Is something else causing that message? BTW -- does that message mean that child process was killed? Here's an example of how I'm using $SIG{ALRM} eval { local $SIG{__DIE__}; local $SIG{ALRM} = CORE::sub { die "Timeout" }; alarm $Flock_Wait_Time; flock( LOG_FILE, LOCK_EX ) or die "failed to set lock '$!'"; }; alarm 0; # just in case it wasn't timeout if ( $@ Bill Moseley mailto:[EMAIL PROTECTED]
Re: X-Forwarded-For problem
Hello Ewan, ïÿòíèöà, 4 ôåâðàëÿ 2000 ã., you wrote: EE> Module Name: mod_proxy_add_forward.c EE> Content handlers: none EE> Configuration Phase Participation: none EE> Request Phase Participation: Fixups EE> Module Directives: none EE> Looks good to me. My guess is that I'm missing something obvious, but I EE> can't imagine what. I've checked the list archive for similar problems, EE> but I can't find examples of anyone complaining about the header not EE> appearing once the proxy_add_forward module was successfully compiled EE> into the front-end server. EE> Any assistance would be greatly appreciated. It looks like wrong module execution order. By using ClearModuleList/AddModule you can easily correct this. Note that modules are being executed in 'reverse' order, i.e. module that you 'Add' first will be executed last. Best regards, Ilyamailto:[EMAIL PROTECTED]
Re: newbie question: extra Content-Type headers?
> On Fri, Feb 04, 2000 at 06:21:21PM -0800, John Darrow wrote: > > I apologize if this is a dumb question, but I just installed Apache and > > mod_perl and all seems to have gone well. The trouble comes in when I try > > to run a script using Apache::Registry and CGI.pm. I get an extra > > Content-Type in the resulting page, and I can't figure out where it's coming > > from. > [snipped the rest] > > perldoc cgi_to_mod_perl > > search the pod for "PerlSendHeader" CGI.pm long ago has become mod_perl aware. If you remove PerlSendHeader, other scripts that don't use CGI.pm won't work correctly. Upgrade CGI.pm as suggested by Brian and your problem will disappear. ___ Stas Bekmanmailto:[EMAIL PROTECTED] http://www.stason.org/stas Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC perl.apache.orgmodperl.sourcegarden.org perlmonth.comperl.org single o-> + single o-+ = singlesheavenhttp://www.singlesheaven.com
Re: newbie question: extra Content-Type headers?
On Fri, Feb 04, 2000 at 06:21:21PM -0800, John Darrow wrote: > I apologize if this is a dumb question, but I just installed Apache and > mod_perl and all seems to have gone well. The trouble comes in when I try > to run a script using Apache::Registry and CGI.pm. I get an extra > Content-Type in the resulting page, and I can't figure out where it's coming > from. [snipped the rest] perldoc cgi_to_mod_perl search the pod for "PerlSendHeader" - wendell
Re: .makepl_args.mod_perl
At 12:39 PM 2/4/00 -0500, you wrote: >> > Also I noted that in the guide most paramters are listed in the >> > blue boxes as PERL-* instead of PERL_*. This could be confusing to >> > newcomers. >> Excuse me? There is no a single PERL- in there. >I am not sure what is going on here. You are right! In Netscape it appears >correctly as underscores. But in IE5 on my machine it does use hyphens >everywhere! (IE5 bug? Could someone please verify this?). In the guide (ie. http://perl.apache.org/guide/install.html#Discovering_whether_some_option_) search for the text PERL_HEADER_PARSER. (for one who asked what this was about). It looks correct in IE5 - I am viewing it on an NT. Netscape is good too. off topic: The blue boxes look purple to me, but that can be a matter of video cards. Maria
socket.pm
I was having some trouble with Socket.pm. I was calling from a file called ao.pl and it runs to a point in the code a hangs. The line is 203: local({SIG{ALRM}) = $timeout ? sub { under $fh;} : SIG{ALRM} || 'DEFAULT'; I am running the perl code from an apache server with linux. Does you know a solution [EMAIL PROTECTED]