Re: perl modules not running after 'minor' change
William McKee wrote: Sorry to hear about the hair loss and damage to your walls. I'm starting to think that you may be running into a problem that I've hit before--having an extra libperl.so laying around. Check out this thread between Stas and myself for more info[1]. I've given you the link to the last message. You should be able to follow it back til you find some useful testing tips. [1] http://mathforum.org/epigone/modperl/percroogrum/[EMAIL PROTECTED] Nope. There are two copies of libperl.so: one in the apache source tree, and one in libexec. BUT that link said to use ldd to see what libperl.so is referenced in the httpd executable. I did that and found NO reference to libperl.so! [EMAIL PROTECTED] mod_perl-1.29]# ldd /usr/local/apache/bin/httpd libm.so.6 => /lib/i686/libm.so.6 (0x4001f000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x40042000) libdb.so.2 => /usr/lib/libdb.so.2 (0x4006f000) libnsl.so.1 => /lib/libnsl.so.1 (0x4007d000) libdl.so.2 => /lib/libdl.so.2 (0x40093000) libc.so.6 => /lib/i686/libc.so.6 (0x40097000) libutil.so.1 => /lib/libutil.so.1 (0x401d2000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x4000) How could that be? -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Help with PERL5LIB
Hi, I have written a perl script that only runs correctly if I unset PERL5LIB before running the script. eg:- $ unset PERL5LIB $ ./run_perl_script.pl Is there any way that I can unset PERL5LIB inside of the perl script without having to create a shell wrapper script? BTW Changing my environment is out of the question? Thanks -- Brett Hales <[EMAIL PROTECTED]> -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
[mp2] Compatibility issue: Apache::ParseFormData vs. 1.99_15
Hi all, In 1.99_15 changelog, - removed: remaining - this method is not needed if the deprecated $r->client_block methods aren't used, (use $r->read $r->instead) This violates the compatibility with Apache::ParseFormData, which becomes unusable. Currently this module is the only alternative to libapreq2, which is still in development phase. Would be good if you undo the removal until libapreq2 release comes out. Thanks, Stanislav -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: [mp2] any forum/noticeboard apps out there?
On Thu, 2004-09-02 at 02:23, Markus Wichitill wrote: > Since version 2.0 all styling is CSS-based, and you can install multiple > user-selectable stylesheets. You can also include header/footer HTML via > plugins. Thanks, that will probably be enough for the uses I was thinking of. - Perrin -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Apache::DBI patches
A couple days ago, I posted a patch that fixed what I think is a real bug in Apache::DBI when a script uses more than one database handle: http://mathforum.org/epigone/modperl/stroblangnerm Basically, I removed $Idx as a file-scoped variable, because if a script used more than one database handle, the initial value of $Idx would get overwritten, and the first database handle would never get to the cleanup/rollback routine. Back in July 2003, Patrick Mulvany posted a more substantial patch that ensures that database handles get restored to their expected state if, for example, a script changes AutoCommit, and doesn't change it back: http://mathforum.org/epigone/modperl/gripemneh With Patrick's patch, the next user of the database handle won't see the effects of the first script's fiddling with the AutoCommit property. Both patches are working well for me, and I was surprised to see no discussion of either on the mod_perl list. Patrick's patch needed a small change to work with mine, so I've taken the liberty of combining them in the attached file. I'm also cc'ing Ask, as I think this should be included in Apache::DBI. Of course, feedback from others is welcome. Thanks, Joe combinedpatch Description: Binary data -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: [mp2] Compatibility issue: Apache::ParseFormData vs. 1.99_15
> - removed: > > remaining - this method is not needed if the deprecated > $r->client_block methods aren't used, (use $r->read > $r->instead) > > This violates the compatibility with Apache::ParseFormData, which becomes > unusable. Currently this module is the only alternative to libapreq2, > which is still in development phase. > > Would be good if you undo the removal until libapreq2 release comes out. Try this patch on ParseFormData instead. Works for me using the suggested implementation in the docs. No sense in backtracking... --- ParseFormData.pm.orig 2004-09-02 14:15:17.827899688 -0400 +++ ParseFormData.pm2004-09-02 14:13:37.898091328 -0400 @@ -131,8 +131,6 @@ my $args = shift; my $buf = ""; - $r->setup_client_block; - $r->should_client_block or return ''; my $ct = $r->headers_in->get('content-type'); if($args->{'disable_uploads'} && index($ct, "multipart/form-data") > -1) { @@ -152,7 +150,7 @@ if($ct =~ /^multipart\/form-data; boundary=(.+)$/) { my $boundary = $1; my $lenbdr = length("--$boundary"); - $r->get_client_block($buf, $lenbdr+2); + $r->read($buf, $lenbdr+2); $buf = substr($buf, $lenbdr); $buf =~ s/[\n\r]+//; my $iter = -1; @@ -193,7 +191,7 @@ $r->pnotes('upload' => \%uploads); } else { my $len = $r->headers_in->get('content-length'); - $r->get_client_block($buf, $len); + $r->read($buf, $len); &_parse_query($r, $buf) if($buf); } return(Apache::OK); @@ -253,7 +251,7 @@ my $buff = shift; my ($part, $content) = ($buff, ""); - while($r->get_client_block($buff, $len)) { + while($r->read($buff, $len)) { $part .= $buff; if($h) { if($part =~ /\r?\n\r?\n/) { -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
[mp2] Compatibility issue: Apache::ParseFormData vs. 1.99_15
Hi all, In 1.99_15 changelog, - removed: remaining - this method is not needed if the deprecated $r->client_block methods aren't used, (use $r->read $r->instead) This violates the compatibility with Apache::ParseFormData, which becomes unusable. Currently this module is the only alternative to libapreq2, which is still in development phase. Would be good if you undo the removal until libapreq2 release comes out. Thanks, Stanislav -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: [mp2] Test error w/Apache 2.1
On Thursday 02 September 2004 05:13 am, Beau E. Cox wrote: > -8<-- Start Bug Report 8<-- > 1. Problem Description: > > With Apache 2.1 (not 2.0) three sub-tests fail in > t/apache/content_length_header. Both Apache 2.1 and > mod_perl 2.0 were drawn from cvs within an hour of this > message, specifically: > -rw-r--r-- 1 root root 4484184 Sep 2 04:17 httpd-2.1.tar.bz2 > -rw-r--r-- 1 root root 1171580 Sep 2 04:31 modperl-2.0.tar.bz2 > Times are HST (GMT+10). [blah,blah,blah...] Dispite the error, normal operation seems ok. If you wanna see the entire console log of the make, install, and test - in all it's glory - please see: ftp://ftp.beaucox.com/pub/mod_perl/test-mod_perl-2.1.bz2 Aloha => Beau; -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
ANNOUNCE: Krang 1.023
Krang v1.023 is now available. Notable changes in this release: - Improvements to the publishing API to simplify the output of secondary content attached to a story. - Improved support for previewing stories published across multiple sites. - Additional minor bugfixes Detailed change-log here: http://krang.sf.net/docs/changelog.html Krang is an Open Source web-publisher / content-management system designed for large-scale magazine-style websites. It is a 100% Perl application using Apache/mod_perl and MySQL, as well as numerous CPAN modules. Krang provides a powerful and easy to use story and media editing environment for magazine editors, as well as a complete template development environment for web designers. On the back-end, Perl programmers can customize Krang to control the data entered in the story editor and add code to drive the templates to build output. Krang can be enhanced with add-ons containing new skins and other new features. Krang easily handles large data sets and can manage multiple websites in a single installation. For more information about Krang, visit the Krang website: http://krang.sourceforge.net/ There you can download Krang, view screenshots, read documentation, join our mailing-lists and access the CVS tree. - the Krang team -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
[mp2] Test error w/Apache 2.1
-8<-- Start Bug Report 8<-- 1. Problem Description: With Apache 2.1 (not 2.0) three sub-tests fail in t/apache/content_length_header. Both Apache 2.1 and mod_perl 2.0 were drawn from cvs within an hour of this message, specifically: -rw-r--r-- 1 root root 4484184 Sep 2 04:17 httpd-2.1.tar.bz2 -rw-r--r-- 1 root root 1171580 Sep 2 04:31 modperl-2.0.tar.bz2 Times are HST (GMT+10). NOTE: On Thursday, August 26, this same test suite was successful, therefore something changed between then and now to cause it (be it me or thee). NOTE-NOTE: Rather _current_ software (see configuration); note gcc-3.4.1. -- make test console log snips --- /home/test/perl/5.8.5-apache2.1/bin/perl -Iblib/arch -Iblib/lib \ t/TEST -clean [warning] setting ulimit to allow core files ulimit -c unlimited; /home/test/perl/5.8.5-apache2.1/bin/perl /usr/src/sorcery/modperl-2.0/t/TEST -clean APACHE_TEST_GROUP= APACHE_TEST_HTTPD= APACHE_TEST_PORT= APACHE_TEST_USER=test APACHE_TEST_APXS= \ /home/test/perl/5.8.5-apache2.1/bin/perl -Iblib/arch -Iblib/lib \ t/TEST -bugreport -verbose=0 [warning] setting ulimit to allow core files ulimit -c unlimited; /home/test/perl/5.8.5-apache2.1/bin/perl /usr/src/sorcery/modperl-2.0/t/TEST -bugreport -verbose=0 [warning] root mode: changing the files ownership to 'test' (111:500) [warning] testing whether 'test' is able to -rwx /usr/src/sorcery/modperl-2.0/t "/home/test/perl/5.8.5-apache2.1/bin/perl" -Mlib=/usr/src/sorcery/modperl-2.0/Apache-Test/lib -MApache::TestRun -e 'eval { Apache::TestRun::run_root_fs_test(111, 500, q[/usr/src/sorcery/modperl-2.0/t]) }'; [warning] result: OK [warning] the client side drops 'root' permissions and becomes 'test' /home/test/usr/apache2.1/sbin/httpd -d /usr/src/sorcery/modperl-2.0/t -f /usr/src/sorcery/modperl-2.0/t/conf/httpd.conf -D APACHE2 -D PERL_USEITHREADS using Apache/2.1.0-dev (prefork MPM) waiting 300 seconds for server to start: .[Thu Sep 02 04:42:35 2004] [info] 25 Apache:: modules loaded [Thu Sep 02 04:42:35 2004] [info] 7 APR:: modules loaded [Thu Sep 02 04:42:35 2004] [info] base server + 22 vhosts ready to run tests ... waiting 300 seconds for server to start: ok (waited 35 secs) server localhost:8529 started ] ... server localhost:8555 listening (TestDirective::perlloadmodule6) t/apache/add_config.ok t/apache/cgihandler.ok t/apache/conftree...ok t/apache/constants..ok t/apache/content_length_header..# Failed test 2 in t/apache/content_length_header.t at line 44 # Failed test 5 in t/apache/content_length_header.t at line 57 # Failed test 17 in t/apache/content_length_header.t at line 57 fail #2 FAILED tests 2, 5, 17 Failed 3/27 tests, 88.89% okay t/apache/discard_rbody..ok ... 2. Used Components and their Configuration: *** mod_perl version 1.9917 *** using /usr/src/sorcery/modperl-2.0/lib/Apache/BuildConfig.pm *** Makefile.PL options: MP_APR_LIB => aprext MP_APXS=> /home/test/usr/apache2.1/sbin/apxs MP_COMPAT_1X => 1 MP_GENERATE_XS => 1 MP_LIBNAME => mod_perl MP_USE_DSO => 1 MP_USE_STATIC => 1 *** /home/test/usr/apache2.1/sbin/httpd -V Server version: Apache/2.1.0-dev Server built: Sep 2 2004 04:37:55 Server's Module Magic Number: 20040425:1 Architecture: 32-bit Server MPM: Prefork threaded: no forked: yes (variable process count) Server compiled with -D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT="/home/test/usr/apache2.1" -D SUEXEC_BIN="/home/test/usr/apache2.1/bin/suexec" -D DEFAULT_PIDLOG="/home/test/var/run/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="/home/test/var/run/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="/home/test/httpd/2.1/conf/mime.types" -D SERVER_CONFIG_FILE="/home/test/httpd/2.1/conf/httpd.conf" *** (apr|apu)-config linking info -L/home/test/usr/apache2.1/lib -lapr-1 -lrt -lcrypt -lpthread -ldl -L/home/test/usr/apache2.1/lib -laprutil-1 -ldb-4.2 -lexpat *** /home/test/perl/5.8.5-apache2.1/bin/perl -V Summary of my perl5 (revision 5 version 8 subversion 5) configuration: Platform: osname=linux, osvers=2.6.8.1, archname=i686-linux-thread-multi uname='linux cathy.beaucox.com 2.6.8.1 #2 sun aug 15 23:50:50 hst 2004 i686 unknown unknown gnulinux ' config_args='-Dprefix=/home/test/perl/5.8.5-apache2.1 -d -e -Dusethreads -Duseshrplib' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselar
Re: [bug] Apache::FakeRequest::content_languages
On Thu, Sep 02, 2004 at 08:03:01AM -0400, Geoffrey Young wrote: > you could do both - test-driven development. personally, I don't know how I > ever got along without Apache-Test, for both development and debugging. how > I wrote applications before seemed insane when compared to using the tools > we now have available. +1. A::T has helped me to write my code, to catch errors that I've introduced while adding new features, and to do code refactoring (which I've done quite a bit of as I learn to use Class::DBI). It took me awhile to get the gist of it (as you can read if you look back in the docs-dev mailling list) but it was worth the effort. Start with Geoff's article and skeleton; you'll avoid many of the potholes I hit along the way. William -- Knowmad Services Inc. http://www.knowmad.com -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re[2]: multipart/form failure
On Thu, 2 Sep 2004, Alex Oboimov wrote: > Howdy, Randy. > > You wrote 1 sept 2004, 19:24:42: > > RK> Are you using libapreq2 to handle the file upload? > RK> Or something else? > > Sorry Randy I'm using my own script to parse form > data but it was thoroughly debugged in the old > system and used to work fine. Though I must admit > some strange behaviour - all files used to get > extra \r\n symbols, so I was forced to double > chop() the buffer before inserting it into > database. That worked for all types of files > equally. > > RK> Does this problem arise for clients both on Unix and > RK> Windows? Is it browser-specific? > > Alas, all my clients are windows based - never had > a chance to check Unix client's behaviour. > > RK> Do you know at what stage the corruption in the .doc > RK> file occurs (eg, on upload, storing it in the database, > RK> or on download)? > > Inspection of buffer content after the FORM > parsing shows that extra \r\n appear both in the > beginning and at the end of the file so I presume > the upload process is to blame. [ ... ] > But I'm curious to find the source of the problem. > Plans: to use libapreq though I lack tutorial > texts concerning Apache::Request and mod_perl as a > whole. It'd be interesting to try libapreq2 to see if using this solves the problem. When using the Apache::Upload tests on a Windows machine, it was quite easy to get incorrect line endings on the uploaded files if the appropriate binmode() on the filehandles was missing. The current tests check for this, for both binary and text files - a checksum is computed for a file, the file is then uploaded and saved, a checksum is computed on the saved file, and then these two checksums are compared. libapreq2 is available from http://www.cpan.org/authors/id/J/JO/JOESUF/ After installation, one can use bash$ mp2doc Apache::Upload to get basic information on using Apache::Upload. One can also see example usage in the tests - glue/perl/t/apreq/upload.t is what the "client" sends, and glue/perl/t/response/TestApReq/upload.pm is the response of the server - this tests a number of ways of getting at the uploaded file. -- best regards, randy -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: perl modules not running after 'minor' change
Hi Ben, Sorry to hear about the hair loss and damage to your walls. I'm starting to think that you may be running into a problem that I've hit before--having an extra libperl.so laying around. Check out this thread between Stas and myself for more info[1]. I've given you the link to the last message. You should be able to follow it back til you find some useful testing tips. Good luck, William [1] http://mathforum.org/epigone/modperl/percroogrum/[EMAIL PROTECTED] -- Knowmad Services Inc. http://www.knowmad.com -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: [bug] Apache::FakeRequest::content_languages
Thomas Lochmatter wrote: > Thanks for the hint. I didn't know about Apache::Test. It > seems to be a quite big testing framework. it can be big or small, depending on what you need it to be :) > I use Apache::FakeRequest for debugging (while developing) > rather than for testing. you could do both - test-driven development. personally, I don't know how I ever got along without Apache-Test, for both development and debugging. how I wrote applications before seemed insane when compared to using the tools we now have available. > The advantage is that it's very > simple/small/handy and does exactly what I need: a fake > Apache object replacement. sometimes what we think we need it's what we really need ;) I'd encourage you (and everyone) to give Apache-Test a try. to kickstart the adventure, after installing Apache-Test from CPAN you can try plugging in your module to this skeleton http://perl.apache.org/~geoff/Apache-Test-skeleton-mp1.tar.gz basically, typing 'make test' will start the server in a pristine environment and run through your test scripts. and even if you don't (yet) have test script, you can just 't/TEST -start-httpd' to start apache and keep it running while you hit against it with a browser. yeah, that's pretty much the same as hitting your ordinary dev box, except that you can isolate the config much easier with Apache-Test, making it possible to add self-contained tests later. anyway, HTH --Geoff -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: [mp2] a little OT, problem finding libapr
Carl Brewer <[EMAIL PROTECTED]> writes: [...] > Out of curiosity, is anyone working on docs for apreq2 for > people in a hurry? :) Ie: with simple examples in it? Not that I am aware of; I think that makes you the first volunteer :-). May I suggest you add these to FAQ.pod instead of the API docs? There are plenty of examples in those already, and the neat thing is that almost all of them are tested to work as documented. -- Joe Schaefer -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: [bug] Apache::FakeRequest::content_languages
Thanks for the hint. I didn't know about Apache::Test. It seems to be a quite big testing framework. I use Apache::FakeRequest for debugging (while developing) rather than for testing. The advantage is that it's very simple/small/handy and does exactly what I need: a fake Apache object replacement. -- Thomas Um Wed, 01 Sep 2004 13:45:27 -0400 schrieb Geoffrey Young <[EMAIL PROTECTED]>: > > > Thomas Lochmatter wrote: > > You're right: both methods (content_languages() and > > content_language()) work on the Apache object, although > > only content_languages() is documented (perldoc > Apache)! > > > > Since Apache::FakeRequest wants to be a complete fake > > object, it should implement both methods as well, I > think. > > Hence, the patch would be to add content_languages() > > instead of replacing content_language(). > > FakeRequest is really kinda painful. is there any reason > why you aren't > using Apache-Test to create a live testing environment > instead? > > http://search.cpan.org/dist/Apache-Test/ > > --Geoff > > -- > Report problems: http://perl.apache.org/bugs/ > Mail list info: > http://perl.apache.org/maillist/modperl.html > List etiquette: > http://perl.apache.org/maillist/email-etiquette.html > -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: [mp2] any forum/noticeboard apps out there?
Markus Wichitill wrote: Carl Brewer wrote: I've played with installing this today, I'm seeing the following in my error logs : [Thu Sep 02 13:52:41 2004] [error] Can't locate object method "cleanup_register" via package "APR::Pool" at /data/www/aboc/perl/mwf/MwfMain.pm line 250.\n Add "use APR::Pool ();" to your startup.pl, I'll add the missing line to my code in the next version. Perfect, working, thankyou Marus. Carl -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html