Re: Performance Tuning -- How do I determine the correct value forRLimitMEM?
On Wed, 14 Feb 2001, Franco Finstad wrote: > I have a modper/DBI/Oracle8i/solaris2.7 site and I'm having performance > problem because I have too many apache processes that are too big. The > machine grinds to a crawl for a normal amount of users. > > The problem is that at server startup I immediately have a bunch of apache > process that are already using swap, It's ok on Solaris. > but I have 4GB of RAM. What's going > on?? Try MaxRequestsPerChild from 50 to 100 in httpd.conf This because mod_perl is not freeing memory after serve any request. > > See the output of top below. > > It looks like the apache processes are not using all the available memory. > From top, RES gets lower than SIZE, why? > Should I adjust RLimitMEM, and if so, how to I determine the correct value? > > Any help is greatly appreciated. > > ** Output of top * > load averages: 0.06, 0.07, 0.07 > 18:11:14 > 120 processes: 119 sleeping, 1 on cpu > CPU states: 94.7% idle, 0.0% user, 5.0% kernel, 0.3% iowait, 0.0% swap > Memory: 4096M real, 2834M free, 1235M swap in use, 6252M swap free > > PID USERNAME THR PRI NICE SIZE RES STATE TIMECPU COMMAND > 501 oracle 1 00 2480K 2048K sleep 6:14 2.02% top > 1511 ffinstad 1 00 2440K 2064K cpu20:01 1.92% top > 906 nobody 9 580 46M 22M sleep 0:12 0.07% beans_adapter_e > 1501 ffinstad 1 480 1824K 1344K sleep 0:00 0.06% ksh > 393 oracle 1 580 374M 347M sleep 0:01 0.02% oracle > 163 root 5 580 2848K 2280K sleep 0:00 0.02% automountd > 114 root 6 500 2288K 1440K sleep 0:00 0.01% keyserv > 196 root 8 500 2768K 2328K sleep 0:00 0.01% nscd > 1499 root 1 380 1760K 1368K sleep 0:00 0.00% in.telnetd > 1163 nobody 4 480 33M 21M sleep 0:04 0.00% httpsd > 1162 nobody 4 580 33M 20M sleep 0:04 0.00% httpsd > 1232 oracle 1 20 374M 351M sleep 0:03 0.00% oracle > 1153 nobody 4 500 33M 21M sleep 0:03 0.00% httpsd > 1235 oracle 1 520 374M 352M sleep 0:03 0.00% oracle > 1164 nobody 4 580 33M 21M sleep 0:03 0.00% httpsd > > > ** perl5 configuration *** > Embedded Perl version 5.00503 for Stronghold/2.4.2 Apache/1.3.6 C2NetEU/2412 > (Unix) mod_perl/1.21 > > Apache::DBI 0.87 > DBI 1.13 > DBD::Oracle 1.06 > > Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: > Platform: > osname=solaris, osvers=2.7, archname=sun4-solaris > uname='sunos cabinet 5.7 generic_106541-05 sun4u sparc sunw,ultra-5_10 ' > hint=recommended, useposix=true, d_sigaction=define > usethreads=undef useperlio=undef d_sfio=undef > Compiler: > cc='gcc', optimize='-O', gccversion=2.8.1 > cppflags='-I/usr/local/include' > ccflags ='-I/usr/local/include' > stdchar='char', d_stdstdio=define, usevfork=false > intsize=4, longsize=4, ptrsize=4, doublesize=8 > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 > alignbytes=8, usemymalloc=y, prototype=define > Linker and Libraries: > ld='gcc', ldflags =' -L/usr/local/lib' > libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib > libs=-lsocket -lnsl -ldl -lm -lc -lcrypt > libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' > cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib' > > > > > Vasily Petrushin +7 (095) 2508363 http://www.interfax.ru mailto:[EMAIL PROTECTED]
Re: Segfault: apache-1.3.17+modperl-1.25
On Wed, 14 Feb 2001, Gary Algier wrote: > My children are segfaulting. > > I have: > Solaris 2.6 (w/all latest patches installed right after the OS) > Perl 5.6.0 (no largefiles, no threads) > Apache 1.3.17 > modperl 1.25 (as a DSO) > gcc 2.95.2 (using Sun's as and ld I had same problems. Try to compile mod_perl statically. Works fine. > > If I run apache leaving out: > LoadModule perl_modulelibexec/libperl.so > AddModule mod_perl.c > it runs just fine. Put them in and the child seg faults. I did manage > to gdb the process and it says: > > Program received signal SIGSEGV, Segmentation fault. > 0xef0a2e00 in perl_header_parser () > (gdb) where > #0 0xef0a2e00 in perl_header_parser () > #1 0x20714 in run_method () > #2 0x208e4 in ap_header_parse () > #3 0x3d9bc in process_request_internal () > #4 0x3ded0 in ap_process_request () > #5 0x314c8 in child_main () > #6 0x31854 in make_child () > #7 0x31dcc in perform_idle_server_maintenance () > #8 0x32630 in standalone_main () > #9 0x32f64 in main () > > Unfortunately, there are no debugging symbols so it is limited. It wasn't > easy getting this, though if it would help I will endeavor to rebuild > everything with debugging symbols and try again. > > In general, I know that DSOs are working as I runtime load the max. I also > load php 4.0.4pl1 that way and it works. > > Any ideas? Does the trace help? > > > > -- > Gary Algier, WB2FWZ [EMAIL PROTECTED] +1 856 787 2758 > Ulticom Inc., 1020 Briggs Rd, Mt. Laurel, NJ 08054 Fax:+1 856 866 2033 > >A self-addressed envelope would be addressed "envelope." > Vasily Petrushin +7 (095) 2508363 http://www.interfax.ru mailto:[EMAIL PROTECTED]
Re: are there any missing modules?
Quoting Matt Sergeant <[EMAIL PROTECTED]>: > On Wed, 14 Feb 2001, Stas Bekman wrote: > > > Well, I've finally have cracked this tedious task down. I've pretty > much > > done with the modules chapter for the book (of course I didn't > document > > all of them, it'll require a separate book if I did. but quite many > are > > documented). > > > > So please take a look at this list and tell me whether I've missed > > something and you want it to be on the list. Note that I've re-grouped > > the modules differently from the original Apache::* list. Thanks. > > You're missing Apache::MimeXML, a PerlTypeHandler (actually the only > PerlTypeHandler on CPAN IIRC) I know. I thought you are going to document this anyway :) And one has to get AxKit for this module... I've added the reference to AxKit which wasn't in the original post. I'll add it _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://logilune.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Performance Tuning -- How do I determine the correct value forRLimitMEM?
On Wed, 14 Feb 2001, Franco Finstad wrote: > The problem is that at server startup I immediately have a bunch of apache > process that are already using swap, but I have 4GB of RAM. What's going > on?? i'm not an engineer, but i've run several sites on what i assume it roughly the same equipment. > It looks like the apache processes are not using all the available memory. you don't want _anything_ using all available memory. period. you don't want it coming over 60 or 70% total use, if possible. you must allow for spikes. > >From top, RES gets lower than SIZE, why? > Should I adjust RLimitMEM, and if so, how to I determine the correct value? res is always lower than size. size is the amount of virtual mem allocated, res is the amount of physical ram in use. > 393 oracle 1 580 374M 347M sleep 0:01 0.02% oracle this is nuts.. 350MB oracle proccesses? what's your SGA set at? how many instances are you running? you need to get the web servers off of this box, or figure out what is up with oracle. try running ps -el to see what's actually been swapped. (the 'F' flag will be set to 20, i think) -- Blue Lang, Unix Voodoo Priesthttp://www.gator.net/~blue 202 Ashe Ave, Apt 3, Raleigh, NC. 919 835 1540 "A computer is a state machine. Threads are for people who can't program state machines." - Alan Cox, From Larry McVoy's quote page
PREFIX behavior question...
hey all, I built apache/mod_perl using the PREFIX argument, but am puzzled by the results. I assumed that the Perl modules would be installed into the location specified by PREFIX(according to Stas's guide), which is the case if the location is absolute, but not if it is relative(Stas's guide uses an example with an absolute location- http://perl.apache.org/guide/install.html#Installation_Without_Superuser_P ). Consider the following: JCROTTY:mailroom:/tmp>ls -al drwxr-xr-x 8 jcrotty dvlp 907 Feb 14 20:12 apache_1.3.14/ -rw-r--r-- 1 jcrotty other1824568 Feb 13 18:14 apache_1.3.14.tar.gz drwxr-xr-x 24 jcrotty dvlp2190 Feb 14 20:09 mod_perl-1.25/ -rw-r--r-- 1 jcrotty other 366834 Feb 13 18:14 mod_perl-1.25.tar.gz JCROTTY:mailroom:/tmp/mod_perl-1.25>perl Makefile.PL PREFIX=../joe make make test make install All of the above go smoothly. JCROTTY:mailroom:/tmp/joe/lib/site_perl/5.6.0/sun4-solaris>ls ./ ../auto/ That's it, no modules are present in /tmp/joe/lib/site_perl/5.6.0/sun4-solaris or any of the other /tmp/joe/lib... locations. If I build with perl Makefile.PL PREFIX=/tmp/joe then make, make test and make install we get: JCROTTY:mailroom:/tmp/joe/lib/site_perl/5.6.0/sun4-solaris>ls -al drwxr-xr-x 5 jcrotty dvlp 683 Feb 14 20:24 ./ drwxr-xr-x 3 jcrotty dvlp 114 Feb 14 20:12 ../ drwxr-xr-x 3 jcrotty dvlp1630 Feb 14 20:24 Apache/ -r--r--r-- 1 jcrotty dvlp 34914 Jan 29 10:33 Apache.pm drwxr-xr-x 2 jcrotty dvlp 111 Feb 14 20:24 Bundle/ drwxr-xr-x 4 jcrotty dvlp 149 Feb 14 20:24 auto/ -r--r--r-- 1 jcrotty dvlp3277 Mar 3 2000 cgi_to_mod_perl.pod -r--r--r-- 1 jcrotty dvlp1096 Jan 29 21:08 mod_perl.pm -r--r--r-- 1 jcrotty dvlp 27538 Nov 28 10:45 mod_perl.pod -r--r--r-- 1 jcrotty dvlp2706 Feb 29 2000 mod_perl_cvs.pod -r--r--r-- 1 jcrotty dvlp 512 Feb 14 20:19 mod_perl_hooks.pm -r--r--r-- 1 jcrotty dvlp 43 Jul 18 1998 mod_perl_hooks.pm.PL -r--r--r-- 1 jcrotty dvlp4781 Mar 3 2000 mod_perl_method_handlers.pod -r--r--r-- 1 jcrotty dvlp 11781 Mar 3 2000 mod_perl_traps.pod -r--r--r-- 1 jcrotty dvlp 17520 Mar 3 2000 mod_perl_tuning.pod Am I out to lunch or is there a good reason for this behavior? Joe Crotty
Performance Tuning -- How do I determine the correct value for RLimitMEM?
I have a modper/DBI/Oracle8i/solaris2.7 site and I'm having performance problem because I have too many apache processes that are too big. The machine grinds to a crawl for a normal amount of users. The problem is that at server startup I immediately have a bunch of apache process that are already using swap, but I have 4GB of RAM. What's going on?? See the output of top below. It looks like the apache processes are not using all the available memory. >From top, RES gets lower than SIZE, why? Should I adjust RLimitMEM, and if so, how to I determine the correct value? Any help is greatly appreciated. ** Output of top * load averages: 0.06, 0.07, 0.07 18:11:14 120 processes: 119 sleeping, 1 on cpu CPU states: 94.7% idle, 0.0% user, 5.0% kernel, 0.3% iowait, 0.0% swap Memory: 4096M real, 2834M free, 1235M swap in use, 6252M swap free PID USERNAME THR PRI NICE SIZE RES STATE TIMECPU COMMAND 501 oracle 1 00 2480K 2048K sleep 6:14 2.02% top 1511 ffinstad 1 00 2440K 2064K cpu20:01 1.92% top 906 nobody 9 580 46M 22M sleep 0:12 0.07% beans_adapter_e 1501 ffinstad 1 480 1824K 1344K sleep 0:00 0.06% ksh 393 oracle 1 580 374M 347M sleep 0:01 0.02% oracle 163 root 5 580 2848K 2280K sleep 0:00 0.02% automountd 114 root 6 500 2288K 1440K sleep 0:00 0.01% keyserv 196 root 8 500 2768K 2328K sleep 0:00 0.01% nscd 1499 root 1 380 1760K 1368K sleep 0:00 0.00% in.telnetd 1163 nobody 4 480 33M 21M sleep 0:04 0.00% httpsd 1162 nobody 4 580 33M 20M sleep 0:04 0.00% httpsd 1232 oracle 1 20 374M 351M sleep 0:03 0.00% oracle 1153 nobody 4 500 33M 21M sleep 0:03 0.00% httpsd 1235 oracle 1 520 374M 352M sleep 0:03 0.00% oracle 1164 nobody 4 580 33M 21M sleep 0:03 0.00% httpsd ** perl5 configuration *** Embedded Perl version 5.00503 for Stronghold/2.4.2 Apache/1.3.6 C2NetEU/2412 (Unix) mod_perl/1.21 Apache::DBI 0.87 DBI 1.13 DBD::Oracle 1.06 Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=solaris, osvers=2.7, archname=sun4-solaris uname='sunos cabinet 5.7 generic_106541-05 sun4u sparc sunw,ultra-5_10 ' hint=recommended, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef Compiler: cc='gcc', optimize='-O', gccversion=2.8.1 cppflags='-I/usr/local/include' ccflags ='-I/usr/local/include' stdchar='char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 alignbytes=8, usemymalloc=y, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldl -lm -lc -lcrypt libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'
Re: bug repository???
> "Joseph" == Joseph Crotty <[EMAIL PROTECTED]> writes: Joseph> Is there any sort of mod_perl bug repository?? You mean where the bugs live? I think that's called "the source code". :-) "bug reports" would be a different matter. I presume Doug is keeping track of those. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
bug repository???
Is there any sort of mod_perl bug repository?? Joe Crotty
Re: Segfault: apache-1.3.17+modperl-1.25
did u compile the perl, apache and mod_perl all with the same compiler, assembler and linker?? you may want to search in the archives: solaris dso sigsegv i remember quite a few issues a while back. hth, -- ___cliff [EMAIL PROTECTED]http://www.genwax.com/ Gary Algier wrote: > My children are segfaulting. > > I have: > Solaris 2.6 (w/all latest patches installed right after the OS) > Perl 5.6.0 (no largefiles, no threads) > Apache 1.3.17 > modperl 1.25 (as a DSO) > gcc 2.95.2 (using Sun's as and ld) > > If I run apache leaving out: > LoadModule perl_modulelibexec/libperl.so > AddModule mod_perl.c > it runs just fine. Put them in and the child seg faults. I did manage > to gdb the process and it says: > > Program received signal SIGSEGV, Segmentation fault. > 0xef0a2e00 in perl_header_parser () > (gdb) where > #0 0xef0a2e00 in perl_header_parser () > #1 0x20714 in run_method () > #2 0x208e4 in ap_header_parse () > #3 0x3d9bc in process_request_internal () > #4 0x3ded0 in ap_process_request () > #5 0x314c8 in child_main () > #6 0x31854 in make_child () > #7 0x31dcc in perform_idle_server_maintenance () > #8 0x32630 in standalone_main () > #9 0x32f64 in main () > > Unfortunately, there are no debugging symbols so it is limited. It wasn't > easy getting this, though if it would help I will endeavor to rebuild > everything with debugging symbols and try again. > > In general, I know that DSOs are working as I runtime load the max. I also > load php 4.0.4pl1 that way and it works. > > Any ideas? Does the trace help? >
Re: cron for mod_perl?
Perhaps I've missed something, but in all this discussion no one has asked what it is you're trying to do. All I know is that you want to schedule something in a database and then check that database every minute (or so) and process the scheduled somethings. Generally speaking, 'at' is the simplest alternative. I've used 'at' in similar circumstances (though never from the web). However, this does not meet your needs of using a cached database connection. Another possibility is to write a daemon yourself and use some type of IPC or RPC to schedule events to that daemon. As the daemon runs, it just forks off and processes the scheduled jobs as those times pass. This requires some crafty work with sig alarm or other mechanism. I once remember seeing an alarm lib somewhere that would allow you to set more than one alarm. Without knowing what it is you're trying to implement, I think we've just about exhausted the possibilities for a scheduler within mod_perl/apache. Robert Landrum -- "Only two things are infinite: The universe, and human stupidity. And I'm not sure about the former." --Albert Einstein
Segfault: apache-1.3.17+modperl-1.25
My children are segfaulting. I have: Solaris 2.6 (w/all latest patches installed right after the OS) Perl 5.6.0 (no largefiles, no threads) Apache 1.3.17 modperl 1.25 (as a DSO) gcc 2.95.2 (using Sun's as and ld) If I run apache leaving out: LoadModule perl_modulelibexec/libperl.so AddModule mod_perl.c it runs just fine. Put them in and the child seg faults. I did manage to gdb the process and it says: Program received signal SIGSEGV, Segmentation fault. 0xef0a2e00 in perl_header_parser () (gdb) where #0 0xef0a2e00 in perl_header_parser () #1 0x20714 in run_method () #2 0x208e4 in ap_header_parse () #3 0x3d9bc in process_request_internal () #4 0x3ded0 in ap_process_request () #5 0x314c8 in child_main () #6 0x31854 in make_child () #7 0x31dcc in perform_idle_server_maintenance () #8 0x32630 in standalone_main () #9 0x32f64 in main () Unfortunately, there are no debugging symbols so it is limited. It wasn't easy getting this, though if it would help I will endeavor to rebuild everything with debugging symbols and try again. In general, I know that DSOs are working as I runtime load the max. I also load php 4.0.4pl1 that way and it works. Any ideas? Does the trace help? -- Gary Algier, WB2FWZ [EMAIL PROTECTED] +1 856 787 2758 Ulticom Inc., 1020 Briggs Rd, Mt. Laurel, NJ 08054 Fax:+1 856 866 2033 A self-addressed envelope would be addressed "envelope."
Apache->read timed out
Hello , I am getting "Apache->read timed out messages in my error_log,now i have been looking at this problem for a while now before posting it for help, whats happening is if i test my application from within the network , because the connection being very fast i am not having any problems , but when i try to do the same thing from the external network over a dial up line i get this error message in the error logs and the script gets killed What we are doing is we are uploading large amts of data using HTTP POSTS ,so at the server end i am using the Apache->read function to get the body of the post. I have even tried this by making the application point a cgi-bin/perl script rather than a mod perl script , could this problem be because of buggy read function or is it that some other request running on the same client might have read my STDIN . The reason i say this is some times i have observed if i reload the webserver and immediately try to post something the chances of the upload going thru are good but if i try the same thing after the webserver has run for a while then the post always fails in a time window of around 165 secs . This particular bug was supposed to be fixed in production days ago but still i don't have any clue . i have even tried to write a small client using plain sockets and making the client sleep for some secs after posting each line of the body just to increase the time required for posting the whole content. System config is Stronghold/3.0 , Apache/1.3.12 C2NetEU/3011 , mod_ssl/2.6.4 OpenSSL/0.9.5a mod_perl/1.22 OS : Solaris Pls help Thanks, Sachin Lakhanpal Geocast Network Systems --== Sent via Deja.com ==-- http://www.deja.com/
Re: cron for mod_perl?
On Wed, 14 Feb 2001, Pierre Phaneuf wrote: > I guess two persons "simpler" aren't always the same: I find it easier > laying out a table and querying it than hacking something to fiddle with > my crontab safely. As far as I know, crontab -e is perfectly safe. - Perrin
location and directory directives
Hi All, I have been trying to go through the document directories, find out all the .htaccess files (which have their own authen/author configurations), parse and merge the authorisation info with the mod_perl authentication/authorisation directives in the server config file via the section. The easiest way seemed to me was to use the in the server conf (with AllowOverride None), but it seems Apache did not start the authentication process at all unless I used a or . Any one have any idea on this? I'm using mod_perl 1.25 and A1.3.17. Thanks, Jie
Re: cron for mod_perl?
Perrin Harkins wrote: > Sure, but why waste resources? Because it's easy? :-) > > As for the simplicity, having multiple individual custom cron jobs is > > simpler than one single generic cron job? > > Yes, much simpler, at least for the scheduling and dispatching part. > Instead of designing database tables to hold timing info on jobs and > code to check it that is smart enough to remember when it last ran > and prevent race conditions, you can write a simple crontab with one > call to wget per job. The actual implementation of the jobs is > pretty much identical either way. I guess two persons "simpler" aren't always the same: I find it easier laying out a table and querying it than hacking something to fiddle with my crontab safely. > Do it whatever way suits you. I'm just suggesting that you try the lazy > way if possible. I could mash the two together: have a single URL trigger that looks up the tasks to do in a database, but have it schedule it's next run itself using "at". Whew, there *is* a whole lot more than one way to do it! :-) > > I was thinking of having a variable with a timestamp of when we last > > checked the database > > That will have to be some sort of shared memory or file-based thing, since > you won't be using the same process each time. I was intending on being lazy and let a bunch of processes find out there is nothing to do because one of them already did the work. ;-) Ahh, the joy of wasting resources... Would anyone be interested in seeing an Apache::Schedule, with an API similar to the Tcl API in AOLserver? http://aolserver.com/docs/tcldev/tapi-114.htm http://aolserver.com/docs/tcldev/tapi-113.htm http://aolserver.com/docs/tcldev/tapi-115.htm -- "We make rope." -- Rob Gingell on Sun Microsystem's new virtual memory.
Re: Interested in writing for the O'Reilly Network?
Plus don't forget, if you'd rather not be paid, and/or have previously published articles, take23 is always looking for article content :-) On Mon, 12 Feb 2001, Schuyler Erle wrote: > The O'Reilly Network is looking for a few good mod_perl hackers to share > their expertise with the readers of www.perl.com and www.OnLAMP.com, our > new Open Source web development site. We're looking to buy previously > unpublished articles about mod_perl, Apache, perl, and other similar > subjects, like MySQL. We're interested in all kinds of content, from > beginner to expert, from short to lengthy, from broad to specific -- our > only hard and fast requirements are that submissions have an Open Source > focus, and bear the mark of quality that we've all come to expect from > O'Reilly products. > > So, please contact our Open Source editor, Chris Coleman, at > [EMAIL PROTECTED] with your submissions, as well as any questions or > comments you might have. We can't wait to hear from you! Thanks. > > Schuyler Erle > Web Hacker / The O'Reilly Network > > -- /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Newbie question about AuthCookieDBI
Hi all, I am a newbie user of mod_perl trying to work with Apache::AuthCookieDBI and have been running into several obstacles. I'm hoping someone can point me in the right direction. I just installed Apache::AuthCookie successfully and was able to get it to work with the necessary changes in my httpd.conf file. Now I want to use Apache::AuthCookieDBI to authenticate against a database table. However during my installation, while doing the 'make test' I get the following error message --- Can't locate object method "module" via package "Apache" at /usr/local/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 202. Compilation failed in require at blib/lib/Apache/AuthCookieDBI.pm line 41. BEGIN failed--compilation aborted at blib/lib/Apache/AuthCookieDBI.pm line 41. Compilation failed in require at test.pl line 11. BEGIN failed--compilation aborted at test.pl line 11. make: *** [test_dynamic] Error 255 When I do a 'make install' after this, it appears to install correctly. However I run into trouble when I try to modify my httpd.conf file to use Apache::AuthCookieDBI. When I add the line --- PerlModule Apache::AuthCookieDBI to my httpd.conf file and restart the server, the server returns a message that it has restarted successfully, but in fact doesn't actually start. There are no error messages on my screen or in the error log that indicate anything being wrong but the server is simply not running. In addition to the above PerlModule line, I've also included the following in my httpd.conf file with the appropriate values --- PerlSetVar WhatEverPath / PerlSetVar WhatEverLoginScript /login.pl # These must be set PerlSetVar WhatEverDBI_DSN "DBI:mysql:database=test" PerlSetVar WhatEverDBI_SecretKeyFile /etc/httpd/foo.com.key # These are optional, the module sets sensible defaults. PerlSetVar WhatEverDBI_User "mysql" PerlSetVar WhatEverDBI_Password "mypassword" PerlSetVar WhatEverDBI_UsersTable "users" PerlSetVar WhatEverDBI_UserField "username" PerlSetVar WhatEverDBI_PasswordField "password" PerlSetVar WhatEverDBI_CryptType "none" PerlSetVar WhatEverDBI_GroupsTable "groups" PerlSetVar WhatEverDBI_GroupField "grp" PerlSetVar WhatEverDBI_GroupUserField "user" PerlSetVar WhatEverDBI_EncryptionType "none" PerlSetVar WhatEverDBI_SessionLifetime 00-24-00-00 AuthType Apache::AuthCookieDBI AuthName WhatEver PerlAuthenHandler Apache::AuthCookieDBI->authenticate PerlAuthzHandler Apache::AuthCookieDBI->authorize require valid-user AuthType Apache::AuthCookieDBI AuthName WhatEver SetHandler perl-script PerlHandler Apache::AuthCookieDBI->login The above directory and files locations are unchanged from when I got AuthCookie/AuthCookieHandler to work, except that I change the references from AuthCookieHandler to AuthCookieDBI. Also, the file /etc/httpd/foo.com.key exists, contains a long text string in the first line and is readable only by root. The problematic line in the httpd.conf file seems to be the PerlModule Apache::AuthCookieDBI line. If I comment it out, the server starts up with no problems whatsoever. Of course I need to use AuthCookieDBI, hence the issue.. Can someone possibly shed some light on this? Its completely baffling me and the lack of error messages in both the error log and on screen is only compounding the problem. If it helps, I am running Apache 1.3.14, mod_perl 1.25 and using Apache-AuthCookieDBI-1.18 and Apache-AuthCookie-2.011. Thanks a ton in advance for your help! Renu
Interested in writing for the O'Reilly Network?
The O'Reilly Network is looking for a few good mod_perl hackers to share their expertise with the readers of www.perl.com and www.OnLAMP.com, our new Open Source web development site. We're looking to buy previously unpublished articles about mod_perl, Apache, perl, and other similar subjects, like MySQL. We're interested in all kinds of content, from beginner to expert, from short to lengthy, from broad to specific -- our only hard and fast requirements are that submissions have an Open Source focus, and bear the mark of quality that we've all come to expect from O'Reilly products. So, please contact our Open Source editor, Chris Coleman, at [EMAIL PROTECTED] with your submissions, as well as any questions or comments you might have. We can't wait to hear from you! Thanks. Schuyler Erle Web Hacker / The O'Reilly Network
Re: Slow $r->print
On Tue, Feb 13, 2001 at 12:14:32AM +0100, Alvar Freude wrote: > > When I get really stumped, I whip out strace/ktrace. > > > > I don't know how I used to get along without it. It's time consuming, > > but 95% of the time it will tell you exactly what you need to know. > > hmmm, with mod_perl? Configure Apache to only spawn 1 child handler. Start a trace on the process that is not running as root. Do the request. Everything boils down to running read() and write() to get stuff done. -- Michael Bacarella <[EMAIL PROTECTED]> Technical Staff / System Development, New York Connect.Net, Ltd.
Re: Slow $r->print
On Tue, Feb 13, 2001 at 12:02:33AM +0100, Alvar Freude wrote: > > do you get a high CPU load during those 4 seconds? > > NO! Even if i request 10 documents at the same time, there is no > significant load (except the Postgres load and some DBI stuff in the > beginning before printing). Hmmm, slow name resolution? When I get really stumped, I whip out strace/ktrace. I don't know how I used to get along without it. It's time consuming, but 95% of the time it will tell you exactly what you need to know. -- Michael Bacarella <[EMAIL PROTECTED]> Technical Staff / System Development, New York Connect.Net, Ltd.
Re: mod_vhost_alias / ProxyPassReverse problem
Ime Smits <[EMAIL PROTECTED]> wrote: > >Now this all works fine except when a client side redirect using meta >http-equiv tags occurs, in which case the hostname part in the url holds a >:81 suffix, effectively bypassing the proxy. Use the following config: Listen 81 Port 80 In the presence of a Listen directive, the Port directive acts like ServerName, i.e. it's what the server calls itself regardless of the name that other people use to get to it. Tony. -- f.a.n.finch[EMAIL PROTECTED][EMAIL PROTECTED] FISHER: NORTHWEST 5 OR 6 DECREASING 3. SHOWERS. GOOD.
DBI+mod_perl SegFault!
Hi all- I'm really having a problem I hope I might be able to get some help with. I'm using Apache 1.3.14, mod_perl 1.24, DBI 1.14, MySQL Modules 1.2215, Perl 5.6.0, and MySQL 3.22.32. (I think that's all that's relevant) In my httpd.conf I have the following: #-- SetHandler perl-script PerlHandler Testing #-- And I have a script called Testing.pm that looks like this: #-- package Testing; use strict; use DBI; sub handler { print "Content-type:\n\ntest"; print "Getting Data Sources...\n"; my @drivers = DBI->data_sources('mysql'); print "Done Getting Data Sources...\n"; foreach my $foo (@drivers) { print "DataSource-> $foo \n"; } print "Getting Data Sources Complete...\n"; print "\n"; } 1; #-- Consistantly, I get a SegFault when going to /testing. Using strace, I see that it actually calls DBI and gets the valid results. Everything looks good to me, but it dies after closing the FD. The funny thing is, if I modify the Testing.pm module to be test.pl, it works. #-- #package Testing; use strict; use DBI; #sub handler { print "Content-type:\n\ntest"; print "Getting Data Sources...\n"; my @drivers = DBI->data_sources('mysql'); print "Done Getting Data Sources...\n"; foreach my $foo (@drivers) { print "DataSource-> $foo \n"; } print "Getting Data Sources Complete...\n"; print "\n"; #} #1; #-- Anybody have any ideas? I've tried everything I can come up with. Thanks, -Eric.
Re: cron for mod_perl?
On Wed, 14 Feb 2001, Pierre Phaneuf wrote: > I think you are over-evalutating the stress on my server. With the > speediest time base I was talking about (once per minute cron job), that > would be 1440 HEAD requests per day, each requiring 1 simple database > query that will most probably return no row at all (a query that returns > many rows is slower, because it has to transmit these rows). > > Many sites with database-driven pages have multiple complex queries on > some pages and run in the millions of page-views per day. Sure, but why waste resources? > As for the simplicity, having multiple individual custom cron jobs is > simpler than one single generic cron job? Yes, much simpler, at least for the scheduling and dispatching part. Instead of designing database tables to hold timing info on jobs and code to check it that is smart enough to remember when it last ran and prevent race conditions, you can write a simple crontab with one call to wget per job. The actual implementation of the jobs is pretty much identical either way. Do it whatever way suits you. I'm just suggesting that you try the lazy way if possible. > I was thinking of having a variable with a timestamp of when we last > checked the database That will have to be some sort of shared memory or file-based thing, since you won't be using the same process each time. - Perrin
Newbie question about AuthCookieDBI
Hi all, I am a newbie user of mod_perl trying to work with Apache::AuthCookieDBI and have been running into several obstacles. I'm hoping someone can point me in the right direction. I just installed Apache::AuthCookie successfully and was able to get it to work with the necessary changes in my httpd.conf file. Now I want to use Apache::AuthCookieDBI to authenticate against a database table. However during my installation, while doing the 'make test' I get the following error message --- Can't locate object method "module" via package "Apache" at /usr/local/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 202. Compilation failed in require at blib/lib/Apache/AuthCookieDBI.pm line 41. BEGIN failed--compilation aborted at blib/lib/Apache/AuthCookieDBI.pm line 41. Compilation failed in require at test.pl line 11. BEGIN failed--compilation aborted at test.pl line 11. make: *** [test_dynamic] Error 255 When I do a 'make install' after this, it appears to install correctly. However I run into trouble when I try to modify my httpd.conf file to use Apache::AuthCookieDBI. When I add the line --- PerlModule Apache::AuthCookieDBI to my httpd.conf file and restart the server, the server returns a message that it has restarted successfully, but in fact doesn't actually start. There are no error messages on my screen or in the error log that indicate anything being wrong but the server is simply not running. In addition to the above PerlModule line, I've also included the following in my httpd.conf file with the appropriate values --- PerlSetVar WhatEverPath / PerlSetVar WhatEverLoginScript /login.pl # These must be set PerlSetVar WhatEverDBI_DSN "DBI:mysql:database=test" PerlSetVar WhatEverDBI_SecretKeyFile /etc/httpd/foo.com.key # These are optional, the module sets sensible defaults. PerlSetVar WhatEverDBI_User "mysql" PerlSetVar WhatEverDBI_Password "mypassword" PerlSetVar WhatEverDBI_UsersTable "users" PerlSetVar WhatEverDBI_UserField "username" PerlSetVar WhatEverDBI_PasswordField "password" PerlSetVar WhatEverDBI_CryptType "none" PerlSetVar WhatEverDBI_GroupsTable "groups" PerlSetVar WhatEverDBI_GroupField "grp" PerlSetVar WhatEverDBI_GroupUserField "user" PerlSetVar WhatEverDBI_EncryptionType "none" PerlSetVar WhatEverDBI_SessionLifetime 00-24-00-00 AuthType Apache::AuthCookieDBI AuthName WhatEver PerlAuthenHandler Apache::AuthCookieDBI->authenticate PerlAuthzHandler Apache::AuthCookieDBI->authorize require valid-user AuthType Apache::AuthCookieDBI AuthName WhatEver SetHandler perl-script PerlHandler Apache::AuthCookieDBI->login The above directory and files locations are unchanged from when I got AuthCookie/AuthCookieHandler to work, except that I change the references from AuthCookieHandler to AuthCookieDBI. Also, the file /etc/httpd/foo.com.key exists, contains a long text string in the first line and is readable only by root. The problematic line in the httpd.conf file seems to be the PerlModule Apache::AuthCookieDBI line. If I comment it out, the server starts up with no problems whatsoever. Of course I need to use AuthCookieDBI, hence the issue.. Can someone possibly shed some light on this? Its completely baffling me and the lack of error messages in both the error log and on screen is only compounding the problem. If it helps, I am running Apache 1.3.14, mod_perl 1.25 and using Apache-AuthCookieDBI-1.18 and Apache-AuthCookie-2.011. Thanks a ton in advance for your help! Renu
Perl sections / Location problems
I've been scratching my head on this for quite a while and I cant seem to figure it out. I have a very stripped down configuration, which only contains the following section: use Apache::Status; $Location{"^/perl-status-1\$"} = { SetHandler => 'perl-script', PerlHandler => 'Apache::Status' }; $Location{"^/perl-status-2\$"} = { SetHandler => 'perl-script', PerlHandler => 'Apache::Status' }; If I start the server up, it appears to configure correctly, however, if I access /perl-status-1 I get a 404 Not Found error. If I access /perl-status-2, then I get the expected Apache::Status output. This is very repeatable in that no matter what I shove into the Location hash if its a regexp, the first entry doesnt work. I'm running Apache 1.3.17, mod_ssl 2.8.0, perl 5.6.0, Linux 2.2.16 Anyone have any ideas? I ran the server with MOD_PERL_TRACE=all as: httpd -X -f /nis.home/mschout/httpd.conf.bug during startup, the perl trace output is as follows: perl_parse args: '/dev/null' ...allocating perl interpreter...ok constructing perl interpreter...ok ok running perl interpreter...ok mod_perl: 0 END blocks encountered during server startup loading perl module 'Apache'...loading perl module 'Apache::Constants::Exports'...ok ok loading perl module 'Tie::IxHash'...ok perl_section: perl_section: init `PerlHandler' stack perl_cmd_push_handlers: @PerlHandler, 'Apache::Status' pushing `Apache::Status' into `PerlHandler' handlers PerlHandler Apache::Status (OK) Limit=no SetHandler perl-script (OK) Limit=no perl_section: init `PerlHandler' stack perl_cmd_push_handlers: @PerlHandler, 'Apache::Status' pushing `Apache::Status' into `PerlHandler' handlers PerlHandler Apache::Status (OK) Limit=no SetHandler perl-script (OK) Limit=no perl_section: perl_section: perl_section: perl_section: perl_section: perl_section: . At request time, this is what appears in the error_log `PerlInitHandler' push_handlers() stack is empty PerlInitHandler handlers returned -1 `PerlPostReadRequestHandler' push_handlers() stack is empty PerlPostReadRequestHandler handlers returned -1 `PerlTransHandler' push_handlers() stack is empty PerlTransHandler handlers returned -1 `PerlInitHandler' push_handlers() stack is empty PerlInitHandler handlers returned -1 `PerlHeaderParserHandler' push_handlers() stack is empty PerlHeaderParserHandler handlers returned -1 `PerlAccessHandler' push_handlers() stack is empty PerlAccessHandler handlers returned -1 `PerlTypeHandler' push_handlers() stack is empty PerlTypeHandler handlers returned -1 `PerlFixupHandler' push_handlers() stack is empty PerlFixupHandler handlers returned -1 [Wed Feb 14 15:18:38 2001] [error] [client 209.246.133.20] File does not exist: /nis.home/mschout/dev/gkgdrs/gkgweb/html/perl-status-1 `PerlLogHandler' push_handlers() stack is empty PerlLogHandler handlers returned -1 and running under strace, this is what we see during the request: write(2, "`PerlInitHandler\' push_handlers("..., 49) = 49 write(2, "PerlInitHandler handlers returne"..., 37) = 37 write(2, "`PerlPostReadRequestHandler\' pus"..., 60) = 60 write(2, "PerlPostReadRequestHandler handl"..., 48) = 48 write(2, "`PerlTransHandler\' push_handlers"..., 50) = 50 write(2, "PerlTransHandler handlers return"..., 38) = 38 stat("/nis.home/mschout/dev/gkgdrs/gkgweb/html/perl-status-1", 0xb6dc) = -1 ENOENT (No such file or directory) stat("/nis.home/mschout/dev/gkgdrs/gkgweb/html", {st_mode=S_IFDIR|S_ISGID|0775, st_size=3072, ...}) = 0 open("/.htaccess", O_RDONLY)= -1 ENOENT (No such file or directory) open("/nis.home/.htaccess", O_RDONLY) = -1 ENOENT (No such file or directory) open("/nis.home/mschout/.htaccess", O_RDONLY) = -1 ENOENT (No such file or directory) open("/nis.home/mschout/dev/.htaccess", O_RDONLY) = -1 ENOENT (No such file or directory) open("/nis.home/mschout/dev/gkgdrs/.htaccess", O_RDONLY) = -1 ENOENT (No such file or directory) open("/nis.home/mschout/dev/gkgdrs/gkgweb/.htaccess", O_RDONLY) = -1 ENOENT (No such file or directory) open("/nis.home/mschout/dev/gkgdrs/gkgweb/html/.htaccess", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0664, st_size=194, ...}) = 0 fstat(4, {st_mode=S_IFREG|0664, st_size=194, ...}) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000 read(4, "#\n# $Id: .htaccess,v 1.13 2000/1"..., 4096) = 194 read(4, "", 4096) = 0 close(4)= 0 munmap(0x40018000, 4096)= 0 write(2, "`PerlInitHandler\' push_handlers("..., 49) = 49 write(2, "PerlInitHandler handlers returne"..., 37) = 37 write(2, "`PerlHeaderParserHandler\' push_h"..., 57) = 57 write(2, "PerlHeaderParserHandler handlers"..., 45) = 45 write(2, "`PerlAccessHandler\' push_handler"..., 51) = 51 write(2, "PerlAccessHandler handlers retur"..., 39) = 39 write(2, "`PerlTypeHandler\' push_handlers("..., 49) = 49 write(2, "PerlTypeHandler handlers returne"..., 37) = 37 open("/nis.home/mschout
Re: Is *anybody* running perl 5.6, modperl_1.25, apache_1.3.17 & PHP4.0.4pl1 OK ?
At 19:23 14/02/2001 +, tim fulcher wrote: >Matt Sergeant wrote: >> > --with-sablot=/export/tools/Sablot-0.44 >> ^ >> >> This is most likely your problem. Try with Sablot 0.50 which links to the >> same expat as XML::Parser > >That would be my approach except I can't get XML::Sablotron to work >against 0.5 :-/ >Sablotron itself builds OK and works (well a noddy test with sabcmd >succeeds). Indeed XML::Sablotron make works but then I get an error with make >test I had the same problem. Downloading the sablotron 0.5 binary instead of building from source fixed the problem. Nobody can seem to track down the problem with the 0.5 source (I haven't tried, not my cup of tea, but others have) but it seems that the binary is built against a different source that works (at least that was the conclusion that I saw reached). -- robin b. "Oh no not again !" said the bowl of petunias
Re: cron for mod_perl?
Perrin Harkins wrote: > > Yes, exactly. My plan is to have a table with the tasks in my database, > > and check expired tasks in a cleanup handler. I'll have to lock the > > table, so that only one process does that. I'll also query the database > > only every so often, not at every request cleanup. > > Well, by frequently hitting your web server and having it look in the > database to decide to do nothing, you're putting a lot of unnecessary stress > on your server. What's wrong with making individual cron jobs that call > individual URLs (think of it as RPC) to cause actions on your web server > exactly when you want them done? Doesn't that sound a whole lot simpler? I think you are over-evalutating the stress on my server. With the speediest time base I was talking about (once per minute cron job), that would be 1440 HEAD requests per day, each requiring 1 simple database query that will most probably return no row at all (a query that returns many rows is slower, because it has to transmit these rows). Many sites with database-driven pages have multiple complex queries on some pages and run in the millions of page-views per day. As for the simplicity, having multiple individual custom cron jobs is simpler than one single generic cron job? But still, I don't like my solution very much either. My problem lies in the case where I get a lot of hits, I want to be careful of what I run in my cleanup handler (if I hit the database at every cleanup, I'll start piling up daemons if I get plenty of hits). I was thinking of having a variable with a timestamp of when we last checked the database, and getting into a cleanup handler, we'd hit the database only if it was more than a minute ago that we checked. -- Implementation: n., the fruitless struggle by the talented and underpaid to fulfill promises made by the rich and ignorant.
Re: Is *anybody* running perl 5.6, modperl_1.25, apache_1.3.17 & PHP4.0.4pl1 OK ?
Try setting LD_LIBRARY_PATH to wherever your xml lib is located. Another possiblity is that you're using the old Sablotron.so (0.44) rather than the newer one... I've never used Sablotron, but I've had similar problems with ld.so and oracle (libclntsh.so). In almost every case, setting the LD_LIBRARY_PATH to the correct path fixes the error. Robert Landrum >Matt Sergeant wrote: > >> On Wed, 14 Feb 2001, tim fulcher wrote: >> >> > Hi >> > >> > finally build PHP4 as >> > >> > ./configure --with-apxs=/export/tools/apache/bin/apxs >> > --prefix=/export/tools --with-ldap --disable-xml \ >> > --with-sablot=/export/tools/Sablot-0.44 >> ^ >> >> This is most likely your problem. Try with Sablot 0.50 which links to the >> same expat as XML::Parser > >That would be my approach except I can't get XML::Sablotron to work >against 0.5 :-/ >Sablotron itself builds OK and works (well a noddy test with sabcmd >succeeds). Indeed XML::Sablotron make works but then I get an error with make >test > >humber-1033> make test >PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib >-I/usr/local/lib/perl5/5.6.0/sun4-solaris -I/usr/local/lib/perl5/5.6.0 >test.pl >1..10 >Can't load 'blib/arch/auto/XML/Sablotron/Sablotron.so' for module >XML::Sablotron: ld.so.1: /usr/bin/perl: fatal: relocation error: file >blib/arch/auto/XML/Sablotron/Sablotron.so: symbol SablotGetInstanceData: >referenced symbol not found at >/usr/local/lib/perl5/5.6.0/sun4-solaris/DynaLoader.pm line 200. > at test.pl line 91 >Compilation failed in require at test.pl line 91. >BEGIN failed--compilation aborted at test.pl line 91. >make: *** [test_dynamic] Error 255 > >I was sticking with 0.44 because at least it worked. In fact if you think >Sablotron 0.44 was the problem with my earlier builds, howcome XML::Sabloton >operated just fine under mod_perl ? > >Thanks for the suggestion though > > >Tim -- "Only two things are infinite: The universe, and human stupidity. And I'm not sure about the former." --Albert Einstein
Re: Is *anybody* running perl 5.6, modperl_1.25, apache_1.3.17 & PHP4.0.4pl1 OK ?
On Wed, 14 Feb 2001, tim fulcher wrote: > Matt Sergeant wrote: > > > On Wed, 14 Feb 2001, tim fulcher wrote: > > > > > Hi > > > > > > finally build PHP4 as > > > > > > ./configure --with-apxs=/export/tools/apache/bin/apxs > > > --prefix=/export/tools --with-ldap --disable-xml \ > > > --with-sablot=/export/tools/Sablot-0.44 > > ^ > > > > This is most likely your problem. Try with Sablot 0.50 which links to the > > same expat as XML::Parser > > That would be my approach except I can't get XML::Sablotron to work > against 0.5 :-/ > Sablotron itself builds OK and works (well a noddy test with sabcmd > succeeds). Indeed XML::Sablotron make works but then I get an error with make > test > > humber-1033> make test > PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib > -I/usr/local/lib/perl5/5.6.0/sun4-solaris -I/usr/local/lib/perl5/5.6.0 > test.pl > 1..10 > Can't load 'blib/arch/auto/XML/Sablotron/Sablotron.so' for module > XML::Sablotron: ld.so.1: /usr/bin/perl: fatal: relocation error: file > blib/arch/auto/XML/Sablotron/Sablotron.so: symbol SablotGetInstanceData: > referenced symbol not found at > /usr/local/lib/perl5/5.6.0/sun4-solaris/DynaLoader.pm line 200. > at test.pl line 91 > Compilation failed in require at test.pl line 91. > BEGIN failed--compilation aborted at test.pl line 91. > make: *** [test_dynamic] Error 255 > > I was sticking with 0.44 because at least it worked. In fact if you think > Sablotron 0.44 was the problem with my earlier builds, howcome XML::Sabloton > operated just fine under mod_perl ? *shrug*... Its all a mystery to me :-) Try the PHP lists. -- /||** Founder and CTO ** ** http://axkit.com/ ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** mod_perl news and resources: http://take23.org ** \\// //\\ // \\
Re: Is *anybody* running perl 5.6, modperl_1.25, apache_1.3.17 & PHP4.0.4pl1 OK ?
Matt Sergeant wrote: > On Wed, 14 Feb 2001, tim fulcher wrote: > > > Hi > > > > finally build PHP4 as > > > > ./configure --with-apxs=/export/tools/apache/bin/apxs > > --prefix=/export/tools --with-ldap --disable-xml \ > > --with-sablot=/export/tools/Sablot-0.44 > ^ > > This is most likely your problem. Try with Sablot 0.50 which links to the > same expat as XML::Parser That would be my approach except I can't get XML::Sablotron to work against 0.5 :-/ Sablotron itself builds OK and works (well a noddy test with sabcmd succeeds). Indeed XML::Sablotron make works but then I get an error with make test humber-1033> make test PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.6.0/sun4-solaris -I/usr/local/lib/perl5/5.6.0 test.pl 1..10 Can't load 'blib/arch/auto/XML/Sablotron/Sablotron.so' for module XML::Sablotron: ld.so.1: /usr/bin/perl: fatal: relocation error: file blib/arch/auto/XML/Sablotron/Sablotron.so: symbol SablotGetInstanceData: referenced symbol not found at /usr/local/lib/perl5/5.6.0/sun4-solaris/DynaLoader.pm line 200. at test.pl line 91 Compilation failed in require at test.pl line 91. BEGIN failed--compilation aborted at test.pl line 91. make: *** [test_dynamic] Error 255 I was sticking with 0.44 because at least it worked. In fact if you think Sablotron 0.44 was the problem with my earlier builds, howcome XML::Sabloton operated just fine under mod_perl ? Thanks for the suggestion though Tim
RE: baffled by vs. problem [SOLVED]
Thanks ... I finally figured out what it was ... the path I was using in was not consistent with the one used in DocumentRoot because of the use of symlinks. I fixed that and things are working fine now. Ray
Re: cron for mod_perl?
> > Huh? Why would you call it if there's nothing to do? Are you thinking > > you'll write a cron-ish task/timing spec for your Perl app and just use > > the cron triggers as a constant clock? > > Yes, exactly. My plan is to have a table with the tasks in my database, > and check expired tasks in a cleanup handler. I'll have to lock the > table, so that only one process does that. I'll also query the database > only every so often, not at every request cleanup. > > The more hits I get, the more accurate the "cron" will be, but I think I > will use a cron trigger a request to have a minimum level of accuracy > (could be every half-hour, just to make sure we're never late by more > than that, or whatever is appropriate). > > Anything better? Well, by frequently hitting your web server and having it look in the database to decide to do nothing, you're putting a lot of unnecessary stress on your server. What's wrong with making individual cron jobs that call individual URLs (think of it as RPC) to cause actions on your web server exactly when you want them done? Doesn't that sound a whole lot simpler? - Perrin
Re: Is *anybody* running perl 5.6, modperl_1.25, apache_1.3.17 &PHP 4.0.4pl1 OK ?
On Wed, 14 Feb 2001, tim fulcher wrote: > Hi > > finally build PHP4 as > > ./configure --with-apxs=/export/tools/apache/bin/apxs > --prefix=/export/tools --with-ldap --disable-xml \ > --with-sablot=/export/tools/Sablot-0.44 ^ This is most likely your problem. Try with Sablot 0.50 which links to the same expat as XML::Parser. -- /||** Founder and CTO ** ** http://axkit.com/ ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** mod_perl news and resources: http://take23.org ** \\// //\\ // \\
Is *anybody* running perl 5.6, modperl_1.25, apache_1.3.17 & PHP 4.0.4pl1 OK ?
Hi Has anybody managed to get the combination in the title coexisting happily ? My platform is Solaris 2.6 and my perl config is listed right at the bottom of this message. Evrything compiles without complaint. PHP works fine, Sablotron (via Perl & PHP) works fine, but any script using XML::Parser or XML::XPath itself just bombs. Outside of mod_perl the scripts run fine. I've got the latest versions (Parser 2.30 & XPath 1.04). A couple of backtraces I got from gdb running scripts are below. If I comment out the LoadModule / AddModule for php4 in httpd.conf the scripts work. A script using XML::XPath gives (gdb) run -X -D -f /export/tools/apache/conf/httpd.conf -d /export/tools/apache/perl Starting program: /export/tools/apache/bin/./httpd -X -D -f /export/tools/apache/conf/httpd.conf -d /export/tools/apache/perl Program received signal SIGSEGV, Segmentation fault. 0xef396200 in XML_ErrorString () from /usr/local/lib/libxmlparse.so.1 (gdb) bt #0 0xef396200 in XML_ErrorString () from /usr/local/lib/libxmlparse.so.1 #1 0xef396088 in XML_ErrorString () from /usr/local/lib/libxmlparse.so.1 #2 0xef3918fc in XML_SetBase () from /usr/local/lib/libxmlparse.so.1 #3 0xef48d14c in my_fclose (fd=0x8fa340, MyFlags=-280440836) at my_fopen.c:68 #4 0x13303c in Perl_pp_entersub () #5 0x12c03c in Perl_runops_standard () #6 0xe1b60 in S_call_body () #7 0xe186c in perl_call_sv () #8 0x49314 in perl_call_handler () #9 0x48964 in perl_run_stacked_handlers () #10 0x46594 in perl_handler () #11 0xa9738 in ap_invoke_handler () #12 0xc66c0 in process_request_internal () #13 0xc6744 in ap_process_request () #14 0xb9d60 in child_main () #15 0xb9ff4 in make_child () #16 0xba210 in startup_children () #17 0xbac00 in standalone_main () #18 0xbb7fc in main () A script using just XML::Parser gives gdb) run -X -D -f /export/tools/apache/conf/httpd.conf -d /export/tools/apache/perl Starting program: /export/tools/apache/bin/./httpd -X -D -f /export/tools/apache/conf/httpd.conf -d /export/tools/apache/perl Program received signal SIGBUS, Bus error. 0x9970a0 in ?? () (gdb) Starting program: /export/tools/apache/bin/./httpd -X -D -f /export/tools/apache/conf/httpd.conf -d /export/tools/apache/perl Undefined command: "Starting". Try "help". (gdb) bt #0 0x9970a0 in ?? () #1 0xef484e30 in ttyname_r (__fildes=1870872, __buf=0x1c4ea8 "", __size=9707920) at /usr/include/unistd.h:769 #2 0xef48a1b0 in XS_XML__Parser__Expat_ParseStream () at mf_pack.c:196 #3 0x13303c in Perl_pp_entersub () #4 0x12c03c in Perl_runops_standard () #5 0xe1b60 in S_call_body () #6 0xe186c in perl_call_sv () #7 0x49314 in perl_call_handler () #8 0x48964 in perl_run_stacked_handlers () #9 0x46594 in perl_handler () #10 0xa9738 in ap_invoke_handler () #11 0xc66c0 in process_request_internal () #12 0xc6744 in ap_process_request () #13 0xb9d60 in child_main () #14 0xb9ff4 in make_child () #15 0xba210 in startup_children () #16 0xbac00 in standalone_main () #17 0xbb7fc in main () modperl build: perl Makefile.PL PERL_DEBUG=1 USE_APACI=1 DO_HTTPD=1 PREP_HTTPD=1 EVERYTHING=1 PERL_USELARGEFILES=0 make make install then built Apache as ./configure --with-layout=Apache --prefix=/export/tools/apache --activate-module=src/modules/perl/libperl.a \ --enable-module=most --enable-shared=auth_anon --disable-rule=EXPAT make make install finally build PHP4 as ./configure --with-apxs=/export/tools/apache/bin/apxs --prefix=/export/tools --with-ldap --disable-xml \ --with-sablot=/export/tools/Sablot-0.44 make install If I do strings /export/tools/apache/bin/httpd | grep -i XML I get nothing. Any similar experiences or suggestion would be appreciated. Right now I'm so jaded by all this I might quit & go stack shelves at Tescos :-/ Tim Perl config - humber-45> perl -V Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=solaris, osvers=2.6, archname=sun4-solaris uname='sunos humber 5.6 generic_105181-15 sun4m sparc sunw,sparcstation-20 ' config_args='-Dcc=gcc -B/usr/ccs/bin/' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef Compiler: cc='gcc -B/usr/ccs/bin/', optimize='-O', gccversion=2.95.1 19990816 (release) cppflags='-fno-strict-aliasing -I/usr/local/include' ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' stdchar='unsigned char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, usemymalloc=y, prototype=define Linker and Libraries: ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib ' libpth=/usr/local
RE: [OT] Re: apachecon: BOF?
> -Original Message- > From: Robert Landrum [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 14, 2001 11:06 AM > To: [EMAIL PROTECTED] > Subject: [OT] Re: apachecon: BOF? > > > At the risk of sounding ignorant, what is BOF? well, Birds-Of a-Feather session, in conference-speak. I think the group prefers Beer-is Our-Friend, though :) --Geoff > > Rob > > > > >> I wouldn't mind a mod_perl beer-BOF like the one we had at > the last night > > > of ApacheCon Europe > > -- > "Only two things are infinite: The universe, and human > stupidity. And I'm not > sure about the former." --Albert Einstein >
[OT] Re: apachecon: BOF?
At the risk of sounding ignorant, what is BOF? Rob > >> I wouldn't mind a mod_perl beer-BOF like the one we had at the last night > > of ApacheCon Europe -- "Only two things are infinite: The universe, and human stupidity. And I'm not sure about the former." --Albert Einstein
Re: modperl and win32
On Wed, 14 Feb 2001, Xavier Bouligaud wrote: > if I don't have VC++ on win32, how I can use Perl with Apache. If you're running Win32 ActivePerl, there are some ppm packages of mod_perl and some other Apache::* modules available - see http://perl.apache.org/distributions.html for links. best regards, randy kobes
modperl and win32
if I don't have VC++ on win32, how I can use Perl with Apache.
Re: "idea" modules info
Svante Sörmark wrote: > > > ConfigDBI i Config via DBI andMARKIM > > Oracle's new Apache-based application-server stores its config in > the database. It might be good for some ideas. Any pointer to information? -- "A Perl script is correct if it gets the job done before your boss fires you." -- Larry Wall
Re: dmake on win32 with mod_perl-1.25
On Wed, 14 Feb 2001, Xavier Bouligaud wrote: > When i run dmake, I have > makefile: line 1051: error -- Expecting macro or rule defn, found neither mod_perl on Win32 is currently set up for using VC++, and consequently expects nmake. best regards, randy kobes
Re: cron for mod_perl?
Perrin Harkins wrote: > > Well, if I call the "check for things to do" URI every minute, then I'll > > be just fine. Many times, I'll just check and find nothing to do > > Huh? Why would you call it if there's nothing to do? Are you thinking > you'll write a cron-ish task/timing spec for your Perl app and just use > the cron triggers as a constant clock? Yes, exactly. My plan is to have a table with the tasks in my database, and check expired tasks in a cleanup handler. I'll have to lock the table, so that only one process does that. I'll also query the database only every so often, not at every request cleanup. The more hits I get, the more accurate the "cron" will be, but I think I will use a cron trigger a request to have a minimum level of accuracy (could be every half-hour, just to make sure we're never late by more than that, or whatever is appropriate). Anything better? -- "Unix gives you just enough rope to hang yourself -- and then a couple of more feet, just to be sure." -- Eric Allman
RE: baffled by vs. problem
> -Original Message- > From: Ray Zimmerman [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 13, 2001 4:10 PM > To: modperl List > Subject: baffled by vs. problem > > [snip] > > When I put the following in my httpd.conf ... > > > SetHandler perl-script > PerlHandler Apache::Hello > > > and access the same URL, mod_perl handles it. But if I > change the > entry in httpd.conf to ... > > > SetHandler perl-script > PerlHandler Apache::Hello > > > it goes back to executing the CGI. Do you have an Alias set up for /home/ray/www/hello? make sure you do and that it's not a ScriptAlias. you may also want to check your AddHandler directive and remove the .cgi entry if there is one - looks like mod_cgi is stepping in where you don't want it to... HTH --Geoff
dmake on win32 with mod_perl-1.25
Hi, When i run dmake, I have makefile: line 1051: error -- Expecting macro or rule defn, found neither So I don't understand what it doesn't find.
Re: are there any missing modules?
On Wed, 14 Feb 2001, Stas Bekman wrote: > Well, I've finally have cracked this tedious task down. I've pretty much > done with the modules chapter for the book (of course I didn't document > all of them, it'll require a separate book if I did. but quite many are > documented). > > So please take a look at this list and tell me whether I've missed > something and you want it to be on the list. Note that I've re-grouped > the modules differently from the original Apache::* list. Thanks. You're missing Apache::MimeXML, a PerlTypeHandler (actually the only PerlTypeHandler on CPAN IIRC) -- /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Probably off topic but 113 errors and Netcache
I've got a bunch of sites using cookies to authenticate and to pass some (crypted) hashes around. I've got one guy behind a "netcache" proxy server (his cable modem provider apparently routes everyone through it) gets a 113 error when trying to access one of my mod_perl scripts. I dont think this is a mod_perl problem at all, just something about the proxy (everyone else is doing ok, even people behind other proxies- however they are not in an http-accel mode proxying). I'm trying to find an answer on the web, but I keep getting all these server logs and error pages and such making narrowing the search alot harder. I have this horrible feeling this question is covered somewhere that I should now about :) but I cant seem to find it. Suggestions on a better place to ask this question are welcome. Here is the error message from an ie5.5 win2k browser, but the source shows a NetCACHeError as a commnet, which makes me almost certian its coming from the proxy ERROR: The requested URL could not be retrieved While trying to retrieve the URL: UNKNOWN URL PERSISTENT The following error was encountered: ERROR 113 -- The syntax for the URL you entered is not valid. This means that: You made a typing error or the URL you entered might not follow the rules for the syntax of URLs. Please reenter the URL in the correct form. -- Wade Burgett Burgett Systems http://www.burgettsys.com/ [EMAIL PROTECTED]