Re: Apache2::Cookie blank value bug?
No solution but a work-around is to set the value to something and set -expires=0, which should delete the cookie from the browser. Blank values are contrary to the RFC anyway so you probably shouldn't be trying to use them. cheers John Ted wrote: Blank value in cookie causes server to die with a Segmentation Fault. my $value = ''; my $cookie = Apache2::Cookie-new($r, -name = 'test_cookie', -value = $value, -path = '/', ); $cookie-bake($r)
Re: maintaining shared memory size (was: Re:swampedwithconnection?)
If the performance you get is not enough for you, look for the bottleneck. This could be running out of CPU, running out of memory, or contention for a shared resource like a database. Then you fix it, by changing code or buying hardware. I think I've got the point now: To reduce memory consumption - look for ways to do more things on compile time To reduce CPU usage - write the most called subroutine in C To reduce database contention - cache as much as possible Thanks for all your help... The journey just begins... --- Badai Aqrandista Cheepy (?) _ Dating? Try Lavalife get 7 days FREE! Sign up NOW. http://www.lavalife.com/clickthru/clickthru.act?id=ninemsncontext=an99a=20233locale=en_AU_t=33473
Re: Apache2::Cookie blank value bug?
Sorry if I posted to the wrong list, but to answer your question. Apache/2.0.54 mod_perl 2.01 libapreq2-2.06-dev Solaris 9 Jonathan Vanasco wrote: Which versions of : Apache mod_perl libapreq2 ? also, what os this might be better suited to the libapreq list - but that info is kinda needed On Aug 24, 2005, at 5:40 PM, Ted wrote: Blank value in cookie causes server to die with a Segmentation Fault. my $value = ''; my $cookie = Apache2::Cookie-new($r, -name = 'test_cookie', -value = $value, -path = '/', ); $cookie-bake($r)
Re: maintaining shared memory size (was: Re:swampedwithconnection?)
On Thu, 2005-08-25 at 17:46 +1000, Badai Aqrandista wrote: To reduce memory consumption - look for ways to do more things on compile time Also avoid loading large things into memory all at once (e.g. slurping files), pass references instead of copies, use the disk more, etc. To reduce CPU usage - write the most called subroutine in C More likely would be to look at the approach you used in the slow code (which you find with profiling) and see if you can change the algorithm to something that does less work. That usually gives the largest gains. Sometimes you may be using a CPAN module (LWP, Cache::Cache) which has a faster alternative. Sometimes caching objects (DBI statement handles for example) helps. To reduce database contention - cache as much as possible That can help with slow read-only queries. For actual contention (which implies writes and locks) you usually need to either change your access patterns or use a different database (InnoDB tables in MySQL, Postgres, etc.) - Perrin
mod_perl2 custom form handler and Motorola i530 phone
This is likely not a strictly mod_perl2 problem, but I'm not finding resolution elsewhere. I have written a custom form data submission parser for our site. Admittedly, not one of my wiser decisions, but it works .. until now. We have a customer trying to use a Motorola i530 phone with a portion of our site. Besides not accepting cookies, this phone is doing truly strange things with the form submission data. When we pull the form data, the field names have doubly-escaped 's and /s surronding the name in the form of %2527 and %255C. It's also putting in /' sequences before the requested URL like so .. /'/'/'quote.html Would a more 'standard' form parser alleviate some of this or is this just a broken client. I really don't want to introduce a more heavyweight module just for this. Thank you for any guidance that could be given. Rodger
Apache::Test not finding global config file
Hey folks, I'm having a bit of a struggle with Apache::Test on a Mandriva Linux 10.1 server. I'm using A::T v1.26 with Apache2.0.50 + mod_perl2.0.1. For some reason, the configuration process is not finding the global config file which causes my tests which are working under a Debian workstation to fail. I've tried tracking down the problem and found that I could pass in -httpd_conf to the t/TEST command to get the config file recognized. This trick doesn't work if I try './Build test' or 'make test'. I've looked through the Apache::TestConfig.pm file to try to find where the problem may be but cannot figure out where that module obtains the configuration file or how to dump out the configuration file it is automatically finding. Looking at the output of httpd -V, I'd think there'd be no problem: Server version: Apache-AdvancedExtranetServer/2.0.50 Server built: Jul 25 2005 14:04:55 Server's Module Magic Number: 20020903:8 Architecture: 32-bit 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_FCNTL_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=/etc/httpd/2.0 -D SUEXEC_BIN=/usr/sbin/apache2-suexec -D DEFAULT_PIDLOG=/var/run/httpd.pid -D DEFAULT_SCOREBOARD=logs/apache_runtime_status -D DEFAULT_LOCKFILE=/var/run/accept.lock -D DEFAULT_ERRORLOG=logs/error_log -D AP_TYPES_CONFIG_FILE=conf/mime.types -D SERVER_CONFIG_FILE=conf/httpd2.conf Also, I noticed the use of a debug function in several places in the TestConfig.pm but couldn't figure out where this function is defined so that I can get it to output to STDERR. Does anyone know what module defines that function and what flags I need to pass in to get it to output its data? Using '-v' didn't seem to work. Thanks, William -- Knowmad Services Inc. http://www.knowmad.com
Re: Apache2::Cookie blank value bug?
Ted wrote: Blank value in cookie causes server to die with a Segmentation Fault. my $value = ''; my $cookie = Apache2::Cookie-new($r, -name = 'test_cookie', -value = $value, -path = '/', ); $cookie-bake($r) Apache/2.0.54 mod_perl 2.01 libapreq2-2.06-dev Solaris 9 Try the APR::Request::Cookie API. I distinctly remember this being fixed as part of 2.06-dev when we fixed the blank param value causing a seg fault. I may or may not have time to check this out tonight, before VACATION. :) -- END What doesn't kill us can only make us stronger. Nothing is impossible. Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198 Consultant / http://p6m7g8.net/Resume/ Senior Developer / Liquidity Services, Inc. http://www.liquidityservicesinc.com http://www.liquidation.com http://www.uksurplus.com http://www.govliquidation.com http://www.gowholesale.com
Re: Apache::Test not finding global config file
\William McKee wrote: I've looked through the Apache::TestConfig.pm file to try to find where the problem may be but cannot figure out where that module obtains the configuration file or how to dump out the configuration file it is automatically finding. ~/.apache-test/TestConfigData.pm, then @INC/lib/Apache/TestConfigData.pm Also, I noticed the use of a debug function in several places in the TestConfig.pm but couldn't figure out where this function is defined so that I can get it to output to STDERR. Does anyone know what module defines that function and what flags I need to pass in to get it to output its data? Using '-v' didn't seem to work. ./TEST -trace=debug (anyone of the apache error log levels are valid) -- END What doesn't kill us can only make us stronger. Nothing is impossible. Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198 Consultant / http://p6m7g8.net/Resume/ Senior Developer / Liquidity Services, Inc. http://www.liquidityservicesinc.com http://www.liquidation.com http://www.uksurplus.com http://www.govliquidation.com http://www.gowholesale.com
Re: Apache2::Cookie blank value bug?
Philip M. Gollucci wrote: Ted wrote: Blank value in cookie causes server to die with a Segmentation Fault. my $value = ''; my $cookie = Apache2::Cookie-new($r, -name = 'test_cookie', -value = $value, -path = '/', ); $cookie-bake($r) Apache/2.0.54 mod_perl 2.01 libapreq2-2.06-dev Solaris 9 Try the APR::Request::Cookie API. I distinctly remember this being fixed as part of 2.06-dev when we fixed the blank param value causing a seg fault. I may or may not have time to check this out tonight, before VACATION. :) I just saw joes commit a fix for this in the current SVN head on apreq-cvs. Try an SVN build. -- END What doesn't kill us can only make us stronger. Nothing is impossible. Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198 Consultant / http://p6m7g8.net/Resume/ Senior Developer / Liquidity Services, Inc. http://www.liquidityservicesinc.com http://www.liquidation.com http://www.uksurplus.com http://www.govliquidation.com http://www.gowholesale.com
Re: Apache::Test not finding global config file
On Thu, Aug 25, 2005 at 04:04:13PM -0400, Philip M. Gollucci wrote: I've looked through the Apache::TestConfig.pm file to try to find where the problem may be but cannot figure out where that module obtains the configuration file or how to dump out the configuration file it is automatically finding. ~/.apache-test/TestConfigData.pm, then @INC/lib/Apache/TestConfigData.pm Hi Phillip, Thanks for the response. I've looked through the TestConfigData.pm file but no httpd_conf is defined. I do not have a ~/.apache-test directory. I was actually trying to get some feedback about what sub in the TestConfig.pm module is responsible for tracking down the config file. ./TEST -trace=debug (anyone of the apache error log levels are valid) Thanks for the pointer! Actually the output shows where that config file is being found. In fact, I found that everything works fine when I run t/TEST. However, when running ./Build test, the LoadModule directives are not being found. Do you know if there a way to pass the trace setting thru ./Build so I can figure out why it's having troubles finding my config file? Thanks, William -- Knowmad Services Inc. http://www.knowmad.com
Best approach for allowing googlebot past the AuthCookie barrier (MP2)?
I have a site where I want to let Google index the articles that are behind a login wall. I'm using AuthCookie (with MP2). I'm sure many people have solved this already. What is the best approach? I didn't find any info in the archives. -- Barry Hoggard Tristan Media LLC w: www.tristanmedia.com yahoo/aim: hoggardb
Apache, PERL, Mod_Perl Install Issues
Thanks everyone for all your help. I am still having issues. When installing to /opt everything works fine untill I go to install mod_perl. I am erroring out on the line... /opt/perl/bin/perl Makefile.PL MP_APXS=/opt/httpd/bin/apxs -fails with- Reading Makefile.PL args from @ARGV MP_APXS = /opt/httpd/bin/apxs no conflicting prior mod_perl version found - good. [ error] '/opt/httpd/bin/apxs -q INCLUDEDIR' failed: [ error] Can't locate strict.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.7/i686-linux /usr/local/lib/perl5/5.8.7 /usr/local/lib/perl5/site_perl/5.8.7/i686-linux /usr/local/lib/perl5/site_perl/5.8.7 /usr/local/lib/perl5/site_perl .) at /opt/httpd/bin/apxs line 19. BEGIN failed--compilation aborted at /opt/httpd/bin/apxs line 19. [ error] Unable to determine server version, aborting. [ error] Invalid MP_APXS specified? Any ideas? Jon Tom Schindl wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I went back to my 2.0.40 install of Apache. The 2.0.54 was not playing nice with plesk. How do I update the @INC path and/or mod_perl for the new perl 5.8.7? I try using CPAN with install Bundle::Apache and no go. Any ideas? -Jon I not sure if there have been API changes since 2.0.40 and 2.0.54 but compiling mod-perl-2.x with apache 2.0.54 and use it with 2.0.40 this will certainly lead to very strange situations you. As in the message before there's nothing wrong when running 2.0.40 if your plesk system needs it and install your own apache-2.0.54 and run it on a different port (e.g. 81). As already said before als compiling Apache-2.0.x is straight forward and nothing you could not manage without reading the bundled INSTALL-File(s). Default-Install-Procedure: - --8-- tar xzvf stable.tar.gz cd perl-5.8.7/ sh ./Configure -de -Dprefix=/opt/myperl make make test su make install exit cd .. tar xjvf httpd-2.0.54.tar.bz2 cd httpd-2.0.54 ./configure --prefix=/opt/myapache make make install vi /opt/myapache/conf/httpd.conf # search for Listen and set it to 81 cd .. cd mod_perl-2.0.1/ /opt/myperl/bin/perl Makefile.PL MP_APXS=/opt/myapache/bin/apxs make make test make install vi /opt/myapache/conf/httpd.conf # Add LoadModule perl_module modules/mod_perl.so /opt/myapache/bin/apachectl start - --8-- I've timed it and it took my now exactly 20 Minutes to get a setup with: - - perl 5.8.7 - - httpd-2.0.54 - - mod-perl 2.0.1 When it comes to php I have no idea but I think its also that straight forward. As I've always said I'm not a friend of those rpm's and it really does take that long to get a running system. At least less time than it took you: - - find what's going wrong with your installation - - work with ancient software like apache-2.0.40 causing you headache because you are runing it long standing fixed bugs Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFDBX0jkVPeOFLgZFIRAg63AJ485/bL6i5wgJxcPtbXG4Raw9VffgCgniot hkzZ4lKj1xLzk36cKQ6xB6M= =dINX -END PGP SIGNATURE-
Re: Apache::Test not finding global config file
I was able to get a trace from a failing case after using './Build t/TEST'. Calling just 't/TEST' finds the config file correctly. So it appears that calling ./Build is where the trouble occurs for me (though I've never seen this behavior before). From the trace below, you can see that A::T thinks the config file is '/usr/conf/httpd2.conf': [warning] setting ulimit to allow core files ulimit -c unlimited; /usr/bin/perl5.8.5 /home/www/www.calendarkidz.com/CalendarKidz/t/TEST 't/apache/calendarkidz/process_upload.t' -v -trace=debug [ debug] loading custom config data from: '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Apache/TestConfigData.pm' [ debug] configuring httpd [ debug] Using httpd: /usr/sbin/httpd2 [ debug] isolated httpd_info VERSION = Apache-AdvancedExtranetServer/2.0.50 [ debug] isolated httpd_info BUILT = Jul 25 2005 14:04:55 [ debug] isolated httpd_info MODULE_MAGIC_NUMBER = 20020903:8 [ debug] isolated httpd_defines APACHE_MPM_DIR = server/mpm/prefork [ debug] isolated httpd_defines APR_HAS_SENDFILE = 1 [ debug] isolated httpd_defines APR_HAS_MMAP = 1 [ debug] isolated httpd_defines APR_HAVE_IPV6 (IPv4-mapped addresses enabled) = 1 [ debug] isolated httpd_defines APR_USE_FCNTL_SERIALIZE = 1 [ debug] isolated httpd_defines APR_USE_PTHREAD_SERIALIZE = 1 [ debug] isolated httpd_defines SINGLE_LISTEN_UNSERIALIZED_ACCEPT = 1 [ debug] isolated httpd_defines APR_HAS_OTHER_CHILD = 1 [ debug] isolated httpd_defines AP_HAVE_RELIABLE_PIPED_LOGS = 1 [ debug] isolated httpd_defines HTTPD_ROOT = /etc/httpd/2.0 [ debug] isolated httpd_defines SUEXEC_BIN = /usr/sbin/apache2-suexec [ debug] isolated httpd_defines DEFAULT_PIDLOG = /var/run/httpd.pid [ debug] isolated httpd_defines DEFAULT_SCOREBOARD = logs/apache_runtime_status [ debug] isolated httpd_defines DEFAULT_LOCKFILE = /var/run/accept.lock [ debug] isolated httpd_defines DEFAULT_ERRORLOG = logs/error_log [ debug] isolated httpd_defines AP_TYPES_CONFIG_FILE = conf/mime.types [ debug] isolated httpd_defines SERVER_CONFIG_FILE = conf/httpd2.conf [ debug] inheriting config file: /usr/conf/httpd2.conf [ debug] Matched Apache revision Apache-AdvancedExtranetServer/2.0.50 2 Thanks for any ideas, William -- Knowmad Services Inc. http://www.knowmad.com
Re: Apache, PERL, Mod_Perl Install Issues
Jonathan Steffan wrote: no conflicting prior mod_perl version found - good. [ error] '/opt/httpd/bin/apxs -q INCLUDEDIR' failed: [ error] Can't locate strict.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.7/i686-linux /usr/local/lib/perl5/5.8.7 /usr/local/lib/perl5/site_perl/5.8.7/i686-linux /usr/local/lib/perl5/site_perl/5.8.7 /usr/local/lib/perl5/site_perl .) at /opt/httpd/bin/apxs line 19. BEGIN failed--compilation aborted at /opt/httpd/bin/apxs line 19. [ error] Unable to determine server version, aborting. [ error] Invalid MP_APXS specified? Any ideas? Apparently apxs is using the wrong perl. You might change the #! line at the top of it, update your path to have /opt/perl/bin before /usr/local/bin, or rename your system perl temporarily. HTH -- END What doesn't kill us can only make us stronger. Nothing is impossible. Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198 Consultant / http://p6m7g8.net/Resume/ Senior Developer / Liquidity Services, Inc. http://www.liquidityservicesinc.com http://www.liquidation.com http://www.uksurplus.com http://www.govliquidation.com http://www.gowholesale.com
Re: Apache::Test not finding global config file
William McKee wrote: I was able to get a trace from a failing case after using './Build t/TEST'. Calling just 't/TEST' finds the config file correctly. So it appears that calling ./Build is where the trouble occurs for me (though I've never seen this behavior before). From the trace below, you can see that A::T thinks the config file is '/usr/conf/httpd2.conf': [ debug] isolated httpd_defines HTTPD_ROOT = /etc/httpd/2.0 [ debug] isolated httpd_defines SERVER_CONFIG_FILE = conf/httpd2.conf I guess that should be /etc/httpd/2.0/conf/httpd2.conf then right ? What is the actual path you want it to find ? -- END What doesn't kill us can only make us stronger. Nothing is impossible. Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198 Consultant / http://p6m7g8.net/Resume/ Senior Developer / Liquidity Services, Inc. http://www.liquidityservicesinc.com http://www.liquidation.com http://www.uksurplus.com http://www.govliquidation.com http://www.gowholesale.com
Re: Apache, PERL, Mod_Perl Install Issues
Philip M. Gollucci wrote: Jonathan Steffan wrote: no conflicting prior mod_perl version found - good. [ error] '/opt/httpd/bin/apxs -q INCLUDEDIR' failed: [ error] Can't locate strict.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.7/i686-linux /usr/local/lib/perl5/5.8.7 /usr/local/lib/perl5/site_perl/5.8.7/i686-linux /usr/local/lib/perl5/site_perl/5.8.7 /usr/local/lib/perl5/site_perl .) at /opt/httpd/bin/apxs line 19. BEGIN failed--compilation aborted at /opt/httpd/bin/apxs line 19. [ error] Unable to determine server version, aborting. [ error] Invalid MP_APXS specified? Any ideas? Apparently apxs is using the wrong perl. You might change the #! line at the top of it, update your path to have /opt/perl/bin before /usr/local/bin, or rename your system perl temporarily. HTH Phil, I had installed perl to /usr/local/lib/perl5/5.8.7 in a previous exercise. The main system perl is supposed to be 5.8.0. This issues seems to be lingering around from that install? I only removed the /usr/local/lib/perl5/5.8.7 and all related files I could find for perl 5.8.7 with locate. I will try your advice with changing the apxs file. Any other notes? Thanks for your message. -Jon
Re: Apache::Test not finding global config file
William McKee wrote: I was able to get a trace from a failing case after using './Build t/TEST'. Calling just 't/TEST' finds the config file correctly. So it appears that calling ./Build is where the trouble occurs for me (though I've never seen this behavior before). From the trace below, you can see that A::T thinks the config file is '/usr/conf/httpd2.conf': To answer your original quesiton, you want: in A-T source, lib/Apache/TestConfigParse.pm::inherit_config() line ~330 HTH -- END What doesn't kill us can only make us stronger. Nothing is impossible. Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198 Consultant / http://p6m7g8.net/Resume/ Senior Developer / Liquidity Services, Inc. http://www.liquidityservicesinc.com http://www.liquidation.com http://www.uksurplus.com http://www.govliquidation.com http://www.gowholesale.com