Re: cgi-lib.pl
On Tue, 24 Jul 2001, John Buwa wrote: Hello, I have a huge system i wrote using the cgi-lib.pl as its core. I attempted to integrate mod-perl with my system and all my cgi-lib.pl which are used via a require in all scripts returns errors. My dont work, if they do the act very strange and unacceptable. My question is how do i use cgi-lib.pl and mod-perl together? Is anyone doing this? How can it be done. Here is a common error in my log: [Mon Jul 23 05:38:06 2001] [error] Undefined subroutine Apache::ROOTwww_2emy_2ddomain_2ecom::cgi_2dbin::pads::welcome_2epl::ReadPar se called at /driveb/usr/web/webroot/cgi-bin/pads/welcome.pl line 7. http://perl.apache.org/guide/porting.html#Name_collisions_with_Modules_and a quick hack: s/require cgi-lib.pl/do cgi-lib.pl/ doesn't effective, but a working solution. Another solution would be to write a wrapper around cgi-lib.pl to use a package as explained in the URL above. But the best is to use CGI.pm's cgi-lib compat mode: $ perldoc CGI _ 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://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
startup.pl for configuration
Hi, I would like to have a config file like /etc/mywebapp.conf where I would put all my modules configuration. Then I would have a WebApp::LoadConfig module that would run from startup.pl, and initialize my Perl modules default variables at Apache start. My config file would be some like : ### /etc/mywebapp.conf ### ### MyPackageOne::Default_Value_One = 1 MyPackageOne::Default_Value_One = 2 and my startup.pl would have : ### startup.pl WebApp::LoadConfig-run("/etc/mywebapp.conf") Of course,this means that i would have to use those modules whithin mod_perl only, or have to call that WebApp::LoadConfig-run("/etc/mywebapp.conf") at the begining of each console script that use those modules ... Would this be a good idea ? What do you think about? does somebody already use it ? Thanks, Fred
Re: cgi-lib.pl
Rather than go into the details, it's probably best that you use Apache::PerlRun in place of Apache::Registry. cgi-lib.pl is an old Perl 4 library, if you are using new Perl 5 features like OO, modularity, and want to take the MOST advantage of mod_perl, use CGI.pm instead. CGI.pm also has a backwards compatible mode for cgi-lib.pl scripts. Also please read the mod_perl guide. http://perl.apache.org/guide/ At 01:03 AM 7/24/2001 -0500, John Buwa wrote: Hello, I have a huge system i wrote using the cgi-lib.pl as its core. I attempted to integrate mod-perl with my system and all my cgi-lib.pl which are used via a require in all scripts returns errors. My dont work, if they do the act very strange and unacceptable. My question is how do i use cgi-lib.pl and mod-perl together? Is anyone doing this? How can it be done. Here is a common error in my log: [Mon Jul 23 05:38:06 2001] [error] Undefined subroutine Apache::ROOTwww_2emy_2ddomain_2ecom::cgi_2dbin::pads::welcome_2epl::ReadPar se called at /driveb/usr/web/webroot/cgi-bin/pads/welcome.pl line 7. Any info would be appreciated! John __ Gunther Birznieks ([EMAIL PROTECTED]) eXtropia - The Open Web Technology Company http://www.eXtropia.com/
Re: cgi-lib.pl
hi, Not really sure if this is useful info for you but your sub:object called ReadParse is being called in welcome.pl @ line 7 without being defined previously.. [Mon Jul 23 05:38:06 2001] [error] Undefined subroutine Apache::ROOTwww_2emy_2ddomain_2ecom::cgi_2dbin::pads::welcome_2epl::ReadPar se called at /driveb/usr/web/webroot/cgi-bin/pads/welcome.pl line 7. Any info would be appreciated! John
libapreq build error
hiya. trying to build the latest cpan version of libapreq with perl 5.6.1 + use5005threads, apache 1.3.20, mod-perl 1.25. got this error: Request.xs: In function `upload_hook': Request.xs:230: `thr' undeclared (first use in this function) attached full script of build attempt and perl -V. any ideas? thanks! :) Script started on Tue Jul 24 09:30:22 2001 hojmo:/usr/local/dev/src/cpan/build/libapreq-0.33 # /usr/local/dev/bin/perl Make file.PL Checking if your kit is complete... Looks good Writing Makefile for libapreq mkdir ../blib mkdir ../blib/arch mkdir ../blib/arch/auto mkdir ../blib/arch/auto/libapreq Warning: -L../blib/arch/auto/libapreq changed to -L/usr/local/dev/src/cpan/build/libapreq-0.33/Request/../blib/arch/auto/libapreq Writing Makefile for Apache::Request Warning: -L../blib/arch/auto/libapreq changed to -L/usr/local/dev/src/cpan/build/libapreq-0.33/Cookie/../blib/arch/auto/libapreq Writing Makefile for Apache::Cookie Writing Makefile for libapreq hojmo:/usr/local/dev/src/cpan/build/libapreq-0.33 # make cp libapreq.pod blib/lib/libapreq.pod cp lib/Apache/libapreq.pm blib/lib/Apache/libapreq.pm make[1]: Entering directory `/usr/local/dev/src/cpan/build/libapreq-0.33/c' cc -c -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include/modules/perl -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include/include -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include/regex -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include/os/unix -I/usr/include/apache -D_REENTRANT -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\0.10\ -DXS_VERSION=\0.10\ -fpic -I/usr/local/dev/lib/perl5/5.6.1/i686-linux-thread/CORE apache_request.c cc -c -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include/modules/perl -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include/include -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include/regex -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include/os/unix -I/usr/include/apache -D_REENTRANT -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\0.10\ -DXS_VERSION=\0.10\ -fpic -I/usr/local/dev/lib/perl5/5.6.1/i686-linux-thread/CORE apache_cookie.c cc -c -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include/modules/perl -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include/include -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include/regex -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include/os/unix -I/usr/include/apache -D_REENTRANT -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\0.10\ -DXS_VERSION=\0.10\ -fpic -I/usr/local/dev/lib/perl5/5.6.1/i686-linux-thread/CORE apache_multipart_buffer.c rm -rf ../blib/arch/auto/libapreq/libapreq.a /usr/bin/ar cr ../blib/arch/auto/libapreq/libapreq.a apache_request.o apache_cookie.o apache_multipart_buffer.o : ../blib/arch/auto/libapreq/libapreq.a chmod 755 ../blib/arch/auto/libapreq/libapreq.a cp apache_cookie.h ../blib/arch/auto/libapreq/include/apache_cookie.h cp apache_multipart_buffer.h ../blib/arch/auto/libapreq/include/apache_multipart_buffer.h cp apache_request.h ../blib/arch/auto/libapreq/include/apache_request.h make[1]: Leaving directory `/usr/local/dev/src/cpan/build/libapreq-0.33/c' make[1]: Entering directory `/usr/local/dev/src/cpan/build/libapreq-0.33/Request' cp Request.pm ../blib/lib/Apache/Request.pm /usr/local/dev/bin/perl -I/usr/local/dev/lib/perl5/5.6.1/i686-linux-thread -I/usr/local/dev/lib/perl5/5.6.1 /usr/local/dev/lib/perl5/5.6.1/ExtUtils/xsubpp -typemap /usr/local/dev/lib/perl5/5.6.1/ExtUtils/typemap -typemap /usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/typemap Request.xs Request.xsc mv Request.xsc Request.c cc -c -I../c -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include/modules/perl -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include/include -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include/regex -I/usr/local/dev/lib/perl5/site_perl/5.6.1/i686-linux-thread/auto/Apache/include/os/unix -I/usr/include/apache -D_REENTRANT -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\0.33\
[Probably OT] Make test fails in Net::Telnet
Hi, I'm building a new box intended to be a mod_perl/database machine, and in the interests of making it as up-to-date as possible, I installed RedHat 7.1, then upgraded to perl 5.6.1. Next step, of course, is to hit CPAN and install the basics, starting with Bundle::CPAN. But Net::Telnet barfs on make test. I looked on usenet, and there was a post w/ a guy who had this same problem, but no reply. His post describes the problem clearly: snip From: [EMAIL PROTECTED] ([EMAIL PROTECTED]) Subject: select weirdness/Net::Telnet install barf Newsgroups: comp.lang.perl.modules, comp.lang.perl.misc Date: 2001-06-15 15:21:18 PST On my RedHat 7.1 i586 (laptop) system perl 5.6.1 Net::Telnet won't install using CPAN since 'make test' barfs. The select call to read on a dummy handle returns 1! briefly: socket SOCK, AF_INET, SOCK_STREAM, 0; $bitmask = ''; vec($bitmask, fileno(SOCK), 1) = 1; $nfound = select ($bitmask, undef, undef, 0); $nfound is 1 with SOCK allegedly ready to read! Of course actually reading from it produces a SIGPIPE since it's not connected to anything. The 'socket' 'select' calls themselves don't barf. I'm afraid to force install if there's something deep down wrong w/my select. Any ideas greatly appreciated -thanks! Mark snip [rob@dyn5 /home/rob]$ perl -V Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=linux, osvers=2.4.2-2, archname=i386-redhat-linux uname='linux dyn5.empire2.com 2.4.2-2 #1 sun apr 8 20:41:30 edt 2001 i686 unknown ' config_args='-des -Dcc=gcc -Darchname=i386-redhat-linux -Dcccdlflags=-fPIC - Dccdlflags=-rdynamic -Dprefix=/usr -Dscriptdir=/usr/bin -Dsitelib=/usr/lib/p erl5/site_perl -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 - Dman3ext=3pm -Doptimize=-O2 -march=i386 -mcpu=i686 -Uusethreads -Uuselargefi les -Duseshrplib -Dd_dosuid -Ud_setresuid -Ud_setresgid' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='gcc', ccflags ='-fno-strict-aliasing', optimize='-O2 -march=i386 -mcpu=i686', cppflags='-fno-strict-aliasing' ccversion='', gccversion='2.96 2731 (Red Hat Linux 7.1 2.96-85)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -ldl -lm -lc -lcrypt -lutil perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil libc=/lib/libc-2.2.2.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.6.1/i386-redhat-linux/CORE' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: Built under linux Compiled at Jul 23 2001 17:28:02 %ENV: PERL5LIB=/home/rob/lib/perl5:/home/rob/lib/perl5/site_perl/5.005 @INC: /home/rob/lib/perl5 /home/rob/lib/perl5 /home/rob/lib/perl5/site_perl/5.005 /usr/lib/perl5/5.6.1/i386-redhat-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/i386-redhat-linux/5.6.1 /usr/lib/perl5/site_perl /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl tips? ideas? suggestions? TIA! L8r, Rob #!/usr/bin/perl -w use Disclaimer qw/:standard/;
Re: [Probably OT] Make test fails in Net::Telnet
I actually had this problem too. I never found a solution, so in the end I just gave up and force installed. It's also on RH7.1 with perl 5.6.1 I'd be interested in the answer if someone finds it Issac - Original Message - From: Rob Bloodgood [EMAIL PROTECTED] To: mod_perl [EMAIL PROTECTED] Sent: Tuesday, July 24, 2001 19:49 Subject: [Probably OT] Make test fails in Net::Telnet Hi, I'm building a new box intended to be a mod_perl/database machine, and in the interests of making it as up-to-date as possible, I installed RedHat 7.1, then upgraded to perl 5.6.1. Next step, of course, is to hit CPAN and install the basics, starting with Bundle::CPAN. But Net::Telnet barfs on make test. I looked on usenet, and there was a post w/ a guy who had this same problem, but no reply. His post describes the problem clearly: snip From: [EMAIL PROTECTED] ([EMAIL PROTECTED]) Subject: select weirdness/Net::Telnet install barf Newsgroups: comp.lang.perl.modules, comp.lang.perl.misc Date: 2001-06-15 15:21:18 PST On my RedHat 7.1 i586 (laptop) system perl 5.6.1 Net::Telnet won't install using CPAN since 'make test' barfs. The select call to read on a dummy handle returns 1! briefly: socket SOCK, AF_INET, SOCK_STREAM, 0; $bitmask = ''; vec($bitmask, fileno(SOCK), 1) = 1; $nfound = select ($bitmask, undef, undef, 0); $nfound is 1 with SOCK allegedly ready to read! Of course actually reading from it produces a SIGPIPE since it's not connected to anything. The 'socket' 'select' calls themselves don't barf. I'm afraid to force install if there's something deep down wrong w/my select. Any ideas greatly appreciated -thanks! Mark snip [rob@dyn5 /home/rob]$ perl -V Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=linux, osvers=2.4.2-2, archname=i386-redhat-linux uname='linux dyn5.empire2.com 2.4.2-2 #1 sun apr 8 20:41:30 edt 2001 i686 unknown ' config_args='-des -Dcc=gcc -Darchname=i386-redhat-linux -Dcccdlflags=-fPIC - Dccdlflags=-rdynamic -Dprefix=/usr -Dscriptdir=/usr/bin -Dsitelib=/usr/lib/p erl5/site_perl -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 - Dman3ext=3pm -Doptimize=-O2 -march=i386 -mcpu=i686 -Uusethreads -Uuselargefi les -Duseshrplib -Dd_dosuid -Ud_setresuid -Ud_setresgid' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='gcc', ccflags ='-fno-strict-aliasing', optimize='-O2 -march=i386 -mcpu=i686', cppflags='-fno-strict-aliasing' ccversion='', gccversion='2.96 2731 (Red Hat Linux 7.1 2.96-85)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -ldl -lm -lc -lcrypt -lutil perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil libc=/lib/libc-2.2.2.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.6.1/i386-redhat-linux/CORE' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: Built under linux Compiled at Jul 23 2001 17:28:02 %ENV: PERL5LIB=/home/rob/lib/perl5:/home/rob/lib/perl5/site_perl/5.005 @INC: /home/rob/lib/perl5 /home/rob/lib/perl5 /home/rob/lib/perl5/site_perl/5.005 /usr/lib/perl5/5.6.1/i386-redhat-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/i386-redhat-linux/5.6.1 /usr/lib/perl5/site_perl /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl tips? ideas? suggestions? TIA! L8r, Rob #!/usr/bin/perl -w use Disclaimer qw/:standard/;
Re: cgi-lib.pl
John, A number of good suggestions came by regarding this. Here's mine, use the following in place of your cgi-bin.pl include... use CGI qw(:cgi-lib :standard -debug); This will allow you to use CGI.pm and have it default to the cgi-lib commands you're used to. The -debug statement will allow you to run your scripts via command line and enter in the variable=value pairs that you would normally send via html form. Good luck and I hope this helps, Ron John Buwa wrote: Hello, I have a huge system i wrote using the cgi-lib.pl as its core. I attempted to integrate mod-perl with my system and all my cgi-lib.pl which are used via a require in all scripts returns errors. My dont work, if they do the act very strange and unacceptable. My question is how do i use cgi-lib.pl and mod-perl together? Is anyone doing this? How can it be done. Here is a common error in my log: [Mon Jul 23 05:38:06 2001] [error] Undefined subroutine Apache::ROOTwww_2emy_2ddomain_2ecom::cgi_2dbin::pads::welcome_2epl::ReadPar se called at /driveb/usr/web/webroot/cgi-bin/pads/welcome.pl line 7. Any info would be appreciated! John
Re: [ANNOUNCE] RoboWeb 1.0b, web application test suite generator
If you guys end up finally collaborating, one very minor request I would have is that it goes into CPAN as something more standard like WWW:: namespace rather than a marketing name like RoboWeb. RoboWeb is actually a good product name (and in fact do a search on google for other tools with a RoboWeb label attached to them), but it really opens up room for misinterpretation in the future. And personally, I think these seem like indispensable tools that should be a standard CPAN addition. Calling it RoboWeb on CPAN will make it as confusing as figuring out which template solution to use -- but I suspect that web testing features can be fairly standardized (unlike templates). At 11:53 AM 7/23/2001 +0400, Ilya Martynov wrote: We should investigate how these 2 projects can work together when I'm done so that RoboWeb 'recorded' sessions can create WWW::Automate methods that utilise the structure of the page. The benefits of doing this are: 1- Resultant scripts are easier to interpret 2- Scripting apps that vary their form field names works. CG [..skip..] CG I look forward to seeing WWW::Automate and to working together on this. I've recently become maintainer of another testing module HTTP::WebTest. Stable version (released on CPAN) already has many interesting features (like response time tests, text matching tests, content size checks, support for both remote web server and local test modes). I'm working on its rewrite in modular style where tests modules are pluggable so it will be easily extendable. After finishing with it I thought about writhing proxy that records users actions and produces skeleton of test. Maybe joining our efforts have some sense. -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | Ilya Martynov (http://martynov.org/)| | GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80 E4AE BE1A 53EB 323B DEE6 | | AGAVA Software Company (http://www.agava.com/) | -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- __ Gunther Birznieks ([EMAIL PROTECTED]) eXtropia - The Open Web Technology Company http://www.eXtropia.com/
Conflicting usage of winsock[2]* between mod_perl-1.36 andPerl-5.6.1
Has anyone successfully installed and ran Apache::Icon-0.02 or FileMan-0.6d with mod_perl on any Win32 platforms? My setup: Win2K, Apache-1.3.20, mod_perl-1.26, ActivePerl-5.6.1 build 626 Problem: I was trying to install Apache::Icon-0.02 (required both by FileMan and Apache::AutoIndex) but encountered compilation errors of this sort: D:\MSVS\VC98\INCLUDE\winsock2.h(99) : error C2011: 'fd_set' : 'struct' type redefinition D:\MSVS\VC98\INCLUDE\winsock2.h(134) : warning C4005: 'FD_SET' : macro redefinition D:\MSVS\VC98\INCLUDE\winsock.h(83) : see previous definition of 'FD_SET' D:\MSVS\VC98\INCLUDE\winsock2.h(143) : error C2011: 'timeval' : 'struct' type redefinition D:\MSVS\VC98\INCLUDE\winsock2.h(199) : error C2011: 'hostent' : 'struct' type redefinition D:\MSVS\VC98\INCLUDE\winsock2.h(212) : error C2011: 'netent' : 'struct' type redefinition ...etc... After some code inspection, I found out that both Apache-1.3.20 (os.h) and mod_perl-1.26 (mod_perl.h) include winsock2.h BUT Perl-5.6.1 (/usr/perl/lib/CORE/sys/socket.h) includes winsock.h As the result, compilation failed because of these 2 conflicting header file inclusion. The include hierachy looks something like this: Icon.h - mod_perl.h - winsock2.h and perl.h perl.h - sys/socket.h (in /perl/lib/CORE) - winsock.h!! In general, any mod_perl Apache modules (eg: Apache::Icon and FileMan) with C code would fail to compile due to the exact reason. Any suggestions on how to get around this? Thanks! -- Danny Siu
Increasing Shared Memory
Hi, I'm using Stas Bekman's excellent Apache::VMonitor module to help me decrease my mod_perl child process memory usage. I was working on preloading all of my perl modules and scripts in a startup.pl script when I noticed that the amount of shared memory seemed very low. Immediately after I make an Oracle database connection, the child jumps from a size of 3.6M (2.4M shared) to 17.4M (3.4M shared). The child process slowly grows to 22.2M (3.4M shared). The loaded libs Sizes total 13.6M. Shouldn't the libs load into shared memory? If so, how? Here's a snippet from Apache::VMonitor. Loaded libs Sizes: (in bytes) 5800677 ( 5.5M) : /ora1/oracle/product/8.1.5/lib/libclntsh.so.8.0 4118299 ( 3.9M) : /lib/libc-2.1.2.so 1134094 ( 1.1M) : /usr/local/apache_perl/bin/httpd_perl 540120 ( 527k) : /lib/libm-2.1.2.so 372604 ( 364k) : /lib/libnsl-2.1.2.so 344890 ( 337k) : /lib/ld-2.1.2.so 254027 ( 248k) : /lib/libnss_nis-2.1.2.so 253826 ( 248k) : /lib/libnss_nisplus-2.1.2.so 247381 ( 242k) : /lib/libpthread-0.8.so 247348 ( 242k) : /lib/libnss_files-2.1.2.so 162740 ( 159k) : /usr/lib/libglib-1.2.so.0.0.5 81996 ( 80k) : /usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBD/Oracle/Oracle.so 74663 ( 73k) : /lib/libdl-2.1.2.so 64595 ( 63k) : /lib/libcrypt-2.1.2.so 63848 ( 62k) : /usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBI/DBI.so 60026 ( 59k) : /usr/lib/libgtop_sysdeps.so.1.0.2 58088 ( 57k) : /usr/lib/perl5/site_perl/5.005/i386-linux/auto/Date/Calc/Calc.so 51146 ( 50k) : /usr/lib/perl5/site_perl/5.005/i386-linux/auto/Storable/Storable.so 48500 ( 47k) : /usr/lib/perl5/site_perl/5.005/i386-linux/auto/GTop/GTop.so 46795 ( 46k) : /usr/local/apache_perl/libexec/mod_include.so 32545 ( 32k) : /usr/lib/gconv/ISO8859-1.so 31927 ( 31k) : /usr/lib/libgtop.so.1.0.2 29970 ( 29k) : /usr/share/locale/en_US/LC_COLLATE 28657 ( 28k) : /usr/lib/libgdbm.so.2.0.0 27405 ( 27k) : /usr/local/apache_perl/libexec/mod_status.so 24409 ( 24k) : /usr/lib/perl5/site_perl/5.005/i386-linux/auto/Apache/Scoreboard/Scoreboard.so 22970 ( 22k) : /usr/lib/perl5/5.00503/i386-linux/auto/Data/Dumper/Dumper.so 17732 ( 17k) : /usr/lib/libgtop_common.so.1.0.2 14748 ( 14k) : /usr/lib/perl5/5.00503/i386-linux/auto/IO/IO.so 11137 ( 11k) : /usr/lib/perl5/site_perl/5.005/i386-linux/auto/Time/HiRes/HiRes.so 10764 ( 11k) : /usr/local/apache_perl/libexec/mod_usertrack.so 10428 ( 10k) : /usr/share/locale/en_US/LC_CTYPE 9827 ( 10k) : /usr/lib/perl5/5.00503/i386-linux/auto/Fcntl/Fcntl.so 4847 ( 5k) : /ora1/oracle/product/8.1.5/lib/libskgxp8.so 508 ( 1k) : /usr/share/locale/en_US/LC_TIME 93 ( 1k) : /usr/share/locale/en_US/LC_MONETARY 44 ( 1k) : /usr/share/locale/en_US/LC_MESSAGES/SYS_LC_MESSAGES 27 ( 1k) : /usr/share/locale/en_US/LC_NUMERIC Thanks for your help! Bob Foster
Problems building mod_perl 1.26/apache 1.3.20 on SGI IRIX 6.3
Hello, I'm in the process of trying to build mod_perl and apache on an IRIX 6.3 machine. I built perl 5.6, and installed it into its own subdirectory (until I can verify that I can get apache/mod_perl working, as this is a production machine), and built and installed the apropriate modules from CPAN. When I try to build mod_perl and apache, I get errors during the Apache sanity check on compiler and options phase, where the test fails with an ld32 error FATAL 9: I/O error (1110): No such file or directory. When playing around with this some, it appears that the problem is coming about due to the inclusion of the same set of CFLAGS twice. I'm including the command used in the mod_perl directory, as well as the resultant output. I searched around on the web, but information was rather sparse, and we don't have any bright ideas here at the moment, so with any luck someone out there will have some thoughts on this. From the looks of it, it looks like mod_perl might be determining the CFLAGS, and then re-using them from the perl install? I've broken the lines up as best I can (using Notes, so it's tough to figure the best spot for line breaks), and used a backslash to show the continuations. - msteeves::spiderman [17:16] /home/spiderman/apache_upgrade/bin/perl Makefile.PL \ APACHE_PREFIX=/home/spiderman/apache_upgrade/apache_1.3.20 \ APACHE_SRC=../../APACHE/apache_1.3.20/src \ DO_HTTPD=1 \ USE_APACI=1 \ EVERYTHING=1 \ PERL_TRACE=1 Will configure via APACI cp apaci/Makefile.libdir ../../APACHE/apache_1.3.20/src/modules/perl/Makefile.libdir cp apaci/Makefile.tmpl ../../APACHE/apache_1.3.20/src/modules/perl/Makefile.tmpl cp apaci/README ../../APACHE/apache_1.3.20/src/modules/perl/README cp apaci/configure ../../APACHE/apache_1.3.20/src/modules/perl/configure cp apaci/libperl.module ../../APACHE/apache_1.3.20/src/modules/perl/libperl.module cp apaci/mod_perl.config.sh ../../APACHE/apache_1.3.20/src/modules/perl/mod_perl.config.sh cp apaci/load_modules.pl ../../APACHE/apache_1.3.20/src/modules/perl/load_modules.pl cp apaci/find_source ../../APACHE/apache_1.3.20/src/modules/perl/find_source cp apaci/apxs_cflags ../../APACHE/apache_1.3.20/src/modules/perl/apxs_cflags cp apaci/perl_config ../../APACHE/apache_1.3.20/src/modules/perl/perl_config cp apaci/mod_perl.exp ../../APACHE/apache_1.3.20/src/modules/perl/mod_perl.exp PerlDispatchHandler.enabled PerlChildInitHandlerenabled PerlChildExitHandlerenabled PerlPostReadRequestHandler..enabled PerlTransHandlerenabled PerlHeaderParserHandler.enabled PerlAccessHandler...enabled PerlAuthenHandler...enabled PerlAuthzHandlerenabled PerlTypeHandler.enabled PerlFixupHandlerenabled PerlHandler.enabled PerlLogHandler..enabled PerlInitHandler.enabled PerlCleanupHandler..enabled PerlRestartHandler..enabled PerlStackedHandlers.enabled PerlMethodHandlers..enabled PerlDirectiveHandlers...enabled PerlTableApienabled PerlLogApi..enabled PerlUriApi..enabled PerlUtilApi.enabled PerlFileApi.enabled PerlConnectionApi...enabled PerlServerApi...enabled PerlSectionsenabled PerlSSI.enabled Will run tests as User: 'msteeves' Group: 'is' (cd ../../APACHE/apache_1.3.20 CC=cc -n32 CFLAGS= -D_BSD_TYPES -D_BSD_TIME \ -woff 1009 1110 1174 1184 1552 -OPT:Olimit=0 -I/opt/include -DLANGUAGE_C ./configure \ --activate-module=src/modules/perl/libperl.a --disable-rule=EXPAT \ --prefix=/home/spiderman/apache_upgrade/apache_1.3.20) Configuring for Apache, Version 1.3.20 + using installation path layout: Apache (config.layout) + activated perl module (modules/perl/libperl.a) Creating Makefile Creating Configuration.apaci in src Creating Makefile in src + configured for SGI IRIX-32 platform + setting C pre-processor to cc -n32 -E + checking for system header files + adding selected modules o perl_module uses ConfigStart/End + mod_perl build type: OBJ + id: mod_perl/1.26 + id: Perl/v5.6.0 (irix) [/home/spiderman/apache_upgrade/bin/perl] + setting up mod_perl build environment + adjusting Apache build environment + enabling Perl support for SSI (mod_include) + checking sizeof various data types + doing sanity check on compiler and options ** A test compilation with your Makefile configuration ** failed. The below error output from the compilation ** test will give you an idea what is failing. Note that ** Apache requires an ANSI C Compiler, such as gcc. cd ..; cc -n32 -DIRIX -DMOD_PERL -DUSE_PERL_SSI -D_BSD_TYPES -D_BSD_TIME \ -woff 1009,1110,1174,1184,1552 -OPT:Olimit=0 -I/opt/include -DLANGUAGE_C \ -DUSE_HSREGEX -DNO_DL_NEEDED -D_BSD_TYPES -D_BSD_TIME \ -woff 1009 1110 1174 1184 1552 -OPT:Olimit=0 -I/opt/include
Re: [ANNOUNCE] RoboWeb 1.0b, web application test suitegenerator
I agree with you. RoboWeb is not informative enough for CPAN. I chose it for Sourceforge because it's catchy. :-) As it stands it is mostly a set of scripts, not modules. That's why I opted for putting it on Sourceforge rather than on CPAN. Do people here think it worthwile of being at CPAN under a name of its own? I would call it WWW::TestRecorder WWW::TestSuiteGenerator or HTTP::ProxyTestRecorder Jeremy Howard has suggested WWW:WebMacro (or HTTP::WebMacro) given the resemblance of recorded sequences to command macros in spreadsheet programs. (He has also been using the name WWW::Automate for his user agent API). I've been talking with Jeremy on making RoboWeb output WWW::Automate statements instead of the raw frozen HTTP::Request objects it currently does. I'm thinking that it would be best to make RoboWeb accept backend plug-ins so that it can better adapt to its users preferred client library. Please send any suggestions or feature requests you have. Claudio Gunther Birznieks wrote: If you guys end up finally collaborating, one very minor request I would have is that it goes into CPAN as something more standard like WWW:: namespace rather than a marketing name like RoboWeb. RoboWeb is actually a good product name (and in fact do a search on google for other tools with a RoboWeb label attached to them), but it really opens up room for misinterpretation in the future. And personally, I think these seem like indispensable tools that should be a standard CPAN addition. Calling it RoboWeb on CPAN will make it as confusing as figuring out which template solution to use -- but I suspect that web testing features can be fairly standardized (unlike templates). At 11:53 AM 7/23/2001 +0400, Ilya Martynov wrote: We should investigate how these 2 projects can work together when I'm done so that RoboWeb 'recorded' sessions can create WWW::Automate methods that utilise the structure of the page. The benefits of doing this are: 1- Resultant scripts are easier to interpret 2- Scripting apps that vary their form field names works. CG [..skip..] CG I look forward to seeing WWW::Automate and to working together on this. I've recently become maintainer of another testing module HTTP::WebTest. Stable version (released on CPAN) already has many interesting features (like response time tests, text matching tests, content size checks, support for both remote web server and local test modes). I'm working on its rewrite in modular style where tests modules are pluggable so it will be easily extendable. After finishing with it I thought about writhing proxy that records users actions and produces skeleton of test. Maybe joining our efforts have some sense. -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | Ilya Martynov (http://martynov.org/)| | GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80 E4AE BE1A 53EB 323B DEE6 | | AGAVA Software Company (http://www.agava.com/) | -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- __ Gunther Birznieks ([EMAIL PROTECTED]) eXtropia - The Open Web Technology Company http://www.eXtropia.com/
[OT] WebMacro (was: RoboWeb 1.0b, web application test suite generator)
Gunther Birznieks wrote: If you guys end up finally collaborating, one very minor request I would have is that it goes into CPAN as something more standard like WWW:: namespace rather than a marketing name like RoboWeb. The current plan is for the 'scripting language' which provides a simple interface for scripting interactions will be called 'WWW::Automate'. The project that combines RoboWeb and WWW::Automate into a flexible recorder for web interactions might be 'WebMacro' which would appear in CPAN as 'WWW::WebMacro'. These are all preliminary suggestions and open to discussion. HTTP::WebTest already is in an appropriate place in the hierarchy, and is descriptively named. HTTP::WebTest will probably be able to use WWW::Automate scripts (either as a plugin in just through its generic Perl API) but this doesn't require any new project or name. If anyone is interested in contributing, note that RoboWeb is already on SourceForge, and WWW::Automate will be up in the next week or two. Contact me privately if you'd like more information on getting involved.
Re: startup.pl for configuration
On Tue, 24 Jul 2001, [iso-8859-1] Frédéric Schwien wrote: Hi, I would like to have a config file like /etc/mywebapp.conf where I would put all my modules configuration. Then I would have a WebApp::LoadConfig module that would run from startup.pl, and initialize my Perl modules default variables at Apache start. My config file would be some like : ### /etc/mywebapp.conf ### ### MyPackageOne::Default_Value_One = 1 MyPackageOne::Default_Value_One = 2 and my startup.pl would have : ### startup.pl WebApp::LoadConfig-run(/etc/mywebapp.conf) Of course,this means that i would have to use those modules whithin mod_perl only, or have to call that WebApp::LoadConfig-run(/etc/mywebapp.conf) at the begining of each console script that use those modules ... Would this be a good idea ? What do you think about? does somebody already use it ? If I understand you correctly you want to be able to have a few conf files and load one of them depending on environment. Here is how I do that (well sort of) : /tmp/dev.pl -- package My::Config; $env = 'dev'; 1; /tmp/prod.pl -- package My::Config; $env = 'prod'; 1; startup.pl: --- require /tmp/env.pl; now if I'm in the prod env I do: % ln -sf /tmp/prod.pl /tmp/env.pl now if I'm in the pdev env I do: % ln -sf /tmp/dev.pl /tmp/env.pl C'est tout! Of course replace /tmp with something else. I've used it as an example. _ 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://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Setup help needed
Hi, I am having trouble figuring out what is up with mod_perl. I currently have apache 1.3.20 running on RH6.2, compiled with mod_ssl, mm 1.1.3 and DSO support enabled. What is the method to install mod_perl? Is it not already included with apache 1.3.20? I may have misunderstood this... I have tried to install Apache::* via cpan, which asks me for my apache source. This would seem to indicate a reinstall of apache which Im not sure I want to do. Here's exactly what I tried, can someone tell me if this is correct? perl -MCPAN -e shell install Apache (point it to the apache source below) make openssl 2.9.6b make mm 1.1.3 configure mod_ssl with --prefix=/apachessl, --enable-rule=SHARED_CORE, paths to openssl and mm... make certificate make install... Im not sure if this is what is needed or what. Can someone please clue me in? Thanks, Bryan
Re: Increasing Shared Memory
Bob Foster wrote: Hi, I'm using Stas Bekman's excellent Apache::VMonitor module to help me decrease my mod_perl child process memory usage. I was working on preloading all of my perl modules and scripts in a startup.pl script when I noticed that the amount of shared memory seemed very low. Immediately after I make an Oracle database connection, the child jumps from a size of 3.6M (2.4M shared) to 17.4M (3.4M shared). The child process slowly grows to 22.2M (3.4M shared). The loaded libs Sizes total 13.6M. Shouldn't the libs load into shared memory? If so, how? Make sure to use DBD::Oracle in your startup.pl or do PerlModule DBD::Oracle ... that should load up some Oracle libs in the parent. Also, you *might* try doing a connect or even an invalid connect to Oracle, which might grab some extra libs that it only loads at runtime. If you do a connect in the parent httpd to Oracle, make sure that Apache::DBI doesn't cache it later for the children, which is why I was suggesting doing an invalid connect with user/pass like BADBAD/BADBAD --Josh _ Joshua Chamas Chamas Enterprises Inc. NodeWorks Founder Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Re(2): Increasing Shared Memory
[EMAIL PROTECTED] writes: Make sure to use DBD::Oracle in your startup.pl or do PerlModule DBD::Oracle ... that should load up some Oracle libs in the parent. Also, you *might* try doing a connect or even an invalid connect to Oracle, which might grab some extra libs that it only loads at runtime. If you do a connect in the parent httpd to Oracle, make sure that Apache::DBI doesn't cache it later for the children, which is why I was suggesting doing an invalid connect with user/pass like BADBAD/BADBAD Thank you very much, Joshua. I have made some progress and am now seeing 15.8M shared out of 16.7M on the parent. I believe that the problem was that I was doing a graceful restart which wasn't restarting the parent process. Now I have a different problem. When I initially start apache, everything is OK, but when the child processes die (due to MaxRequestsPerChild or me killing them) , the new child doesn't have a database connection and I'm getting Internal Server Error. I suspect I can sort that mess out after a bit more troubleshooting. Thanks again! Bob Foster
Re: Increasing Shared Memory
Bob Foster wrote: Thank you very much, Joshua. I have made some progress and am now seeing 15.8M shared out of 16.7M on the parent. I believe that the problem was that I was doing a graceful restart which wasn't restarting the parent process. Now I have a different problem. When I initially start apache, everything is OK, but when the child processes die (due to MaxRequestsPerChild or me killing them) , the new child doesn't have a database connection and I'm getting Internal Server Error. I suspect I can sort that mess out after a bit more troubleshooting. Cool, but each child will need its own database connection, and last time I worked with Oracle like this, it was a minimum 3M unshared just for the Oracle connection. So just make sure that each child httpd is doing its own DBI-connect() and not reusing a handle created in the parent httpd or you will have problems. Also, more a side note, I have found that you have to fully restart apache, not just a graceful, if either the Oracle server is restarted or the TNS listener is restarted. --Josh _ Joshua Chamas Chamas Enterprises Inc. NodeWorks Founder Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Re: [OT] WebMacro (was: RoboWeb 1.0b, web application test suite generator)
Hi, Please be aware that WebMacro is a moderately popular Java templating tool hosted at http://www.webmacro.org Naming it WWW::WebMacro might be a bit confusing. It's your choice. I just wanted to make you aware of the other WebMacro. Stephen At 08:48 AM 7/25/2001 +1000, Jeremy Howard wrote: Gunther Birznieks wrote: If you guys end up finally collaborating, one very minor request I would have is that it goes into CPAN as something more standard like WWW:: namespace rather than a marketing name like RoboWeb. The current plan is for the 'scripting language' which provides a simple interface for scripting interactions will be called 'WWW::Automate'. The project that combines RoboWeb and WWW::Automate into a flexible recorder for web interactions might be 'WebMacro' which would appear in CPAN as 'WWW::WebMacro'. These are all preliminary suggestions and open to discussion. HTTP::WebTest already is in an appropriate place in the hierarchy, and is descriptively named. HTTP::WebTest will probably be able to use WWW::Automate scripts (either as a plugin in just through its generic Perl API) but this doesn't require any new project or name. If anyone is interested in contributing, note that RoboWeb is already on SourceForge, and WWW::Automate will be up in the next week or two. Contact me privately if you'd like more information on getting involved.