Re: help, $apr->param hangs

2003-12-03 Thread Stas Bekman
Charles C. Fu (ååæ) wrote: In <[EMAIL PROTECTED]> on 03 Dec 2003, Stas Bekman <[EMAIL PROTECTED]> wrote: I'm not sure what SIGWINCH is, was it a concole switching event? It's normally a window resize event. Maybe Aleksandr was resizing the terminal emulator window in which he started Apache i

Re: help, $apr->param hangs

2003-12-03 Thread Charles C. Fu
In <[EMAIL PROTECTED]> on 03 Dec 2003, Stas Bekman <[EMAIL PROTECTED]> wrote: > I'm not sure what SIGWINCH is, was it a concole switching event? It's normally a window resize event. Maybe Aleksandr was resizing the terminal emulator window in which he started Apache in order to try to see more

Re: help, $apr->param hangs

2003-12-03 Thread Stas Bekman
Aleksandr Guidrevitch wrote: Stas Bekman wrote: I suppose that since $apr->param is an XSUB perl decides that it's unsafe to interrupt it. Or may be it's an OS issue, so perl doesn't even get a chance to intervene. Have you tried strace(1)ing httpd and seeing where does it hang? Of course star

Re: help, $apr->param hangs

2003-12-03 Thread Aleksandr Guidrevitch
Stas Bekman wrote: I suppose that since $apr->param is an XSUB perl decides that it's unsafe to interrupt it. Or may be it's an OS issue, so perl doesn't even get a chance to intervene. Have you tried strace(1)ing httpd and seeing where does it hang? Of course start the server with -X so you h

Re: howto get a http request body only?

2003-12-03 Thread Stas Bekman
[EMAIL PROTECTED] wrote: READLINE works perfectly! I'd suggest using $r->content in a scalar context http://perl.apache.org/docs/1.0/api/Apache.html#_r_E_gt_content my $body = $r->content; READLINE is from the tied filehandle interface, and while it happens to work, others reading your code may g

Re: help, $apr->param hangs

2003-12-03 Thread Stas Bekman
Aleksandr Guidrevitch wrote: Hi, Stas # working around buggy opera multipart/form-data eval { local $SIG{ALRM} = sub { die "Sorry timed out. Please try again\n" }; alarm 1; $apr->param; alarm 0; }; warn "works ok\n"; It doesn't work :( Any other s

Re: howto get a http request body only?

2003-12-03 Thread modperl
On 3 Dec 2003 at 14:26, Stas Bekman wrote: Hi Stas and Ged Many thanks for your great support! READLINE works perfectly! regards, Josi Ender > Ged Haywood wrote: > > Hi Stas, > > > > On Wed, 3 Dec 2003, Stas Bekman wrote: > > > > > >>{ local $/; my $post_data = ; } # [snip] > > BTW, that l

Re: $r losing its class membership

2003-12-03 Thread asher
On Wed, Nov 19, 2003 at 10:26:43AM +0100, Frank Maas wrote: > > I've encountered a weird, intermittent problem. I have a Perl handler > > that handles a certain URL. Sometimes it will fail because the $r > > passed to it loses its class. > > > > The handler starts with: > > > > sub handler { > >

Re: make test errors (modperl 1.99_11 and perl 5.8.2)

2003-12-03 Thread Stas Bekman
THELLA,RITA (HP-Cupertino,ex3) wrote: It still fails at the same place. OK, let's try remote debugging then. What do you get when running: % cd modperl-1.99_11 % egrep -Ir "define Mp(Dir|Srv)_f_UNSET" src/modules/perl/modperl_flags.h I get: #define MpDir_f_UNSET 0x0010 #define MpSrv_f_UNSET 0

Re: help, $apr->param hangs

2003-12-03 Thread Aleksandr Guidrevitch
Hi, Stas # working around buggy opera multipart/form-data eval { local $SIG{ALRM} = sub { die "Sorry timed out. Please try again\n" }; alarm 1; $apr->param; alarm 0; }; warn "works ok\n"; It doesn't work :( Any other suggestions ? Alex Stas Bekman

Re: help, $apr->param hangs

2003-12-03 Thread Stas Bekman
Aleksandr Guidrevitch wrote: [...] It doesn't matter how to fix Opera, but how can I work this situation around ? Set timeout via signals ? Or there is another well-known solution ? using SIGALRM is documented here: http://perl.apache.org/docs/1.0/guide/debug.html#Handling_Server_Timeout_Cases_and

help, $apr->param hangs

2003-12-03 Thread Aleksandr Guidrevitch
Prerequesities: 1. Opera browser Version 7.21 Final Build 480 Platform Linux System i686, 2.4.20-alt5-up Qt library 3.1.1 JavaNo Java Runtime Environment installed 2. custom PerlHandler sub handler ($$) { ... $apr = Apache::Request->new($r);

Re: howto get a http request body only?

2003-12-03 Thread Stas Bekman
Ged Haywood wrote: Hi Stas, On Wed, 3 Dec 2003, Stas Bekman wrote: { local $/; my $post_data = ; } # [snip] BTW, that local $/ is not needed because mp1 implements READLINE as: #shouldn't use anyhow, but we'll be nice sub READLINE { my $r = shift; my $line; $r->read($line, $r->hea

Re: Objects

2003-12-03 Thread Ged Haywood
Hi there, On Wed, 3 Dec 2003, [iso-8859-1] Patricio Muñoz wrote: > I don't found the examples or documentation where can make the > convertion to Apache::ASP Apache::ASP is purely for Perl scripting, you can't use the same code that you would use in the M1cr0$0ft world. There is a separate Web

Re: howto get a http request body only?

2003-12-03 Thread Ged Haywood
Hi Stas, On Wed, 3 Dec 2003, Stas Bekman wrote: > { local $/; my $post_data = ; } # [snip] > > The above technique is a wide open invitation for DoS attacks... I'm not sure that the technique bears full responsibility for any DoS risk, but even so I don't think I impled that my one line of cod

Objects

2003-12-03 Thread Patricio Muñoz
Hi all, I problem with work Objects. The next code work fine with ASP <% Set filesystem = CreateObject("Scripting.FileSystemObject") Set folder = filesystem.GetFolder(server.mappath(mypath)) Set subfolders = folder.SubFolders Set filecollection = folder.Files %> now the same code

Re: upgrading to modperl2 & apache2

2003-12-03 Thread Stas Bekman
Afgin Shlomit wrote: I install Apache 2.0.48 and modperl 1.99_10 I moved scripts that run okay before with older versions. When I run my script I get the error: an't use string ("") as a HASH ref while "strict refs" in use at /usr/local/lib/perl5/site_perl/5.8.1/sun4-solaris/DBI.pm line 509 What is

Re: converting to 2.0, push_handlers question

2003-12-03 Thread Stas Bekman
Andrew Maltsev wrote: I'm having some problems converting a 1.x mod_perl application to 2.x mod_perl. I use redhat 9, mod_perl-1.99_07-5 rpm, httpd-2.0.40-21.5 rpm, perl 5.8.0, pre-fork mpm. The way the application works is that it installs a TransHandler to decide if it needs to bother handling co

Re: howto get a http request body only?

2003-12-03 Thread Stas Bekman
Ged Haywood wrote: I suppose you forgot to mention the diamond operator: my $post_data = ; :):):):):):):):):):):):):):):):):):):):):):):):):):) Yes, of course I did! In which case you probably need to turn the slurp mode on: { local $/; # the slurp mode is now on my $post_data = ;

Re: howto get a http request body only?

2003-12-03 Thread Ged Haywood
Hi Stas, On Wed, 3 Dec 2003, Stas Bekman wrote: > I suppose you forgot to mention the diamond operator: > >my $post_data = ; :):):):):):):):):):):):):):):):):):):):):):):):):):) Yes, of course I did! 73, Ged. -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.a

Re: mod_perl2, Apache::PageKit and $s->uid

2003-12-03 Thread Stas Bekman
Geoffrey Young wrote: my $uid = $s->uid; my $gid = $s->gid; Include yes, but how should it be coded. is apr_uid_current equivalent to the old s->server_uid/gid? if so, we could open up part of APR::User. No, it's not. It gives you the same as perl's $< and $(. s->server_uid/gid give you the U

Re: howto get a http request body only?

2003-12-03 Thread Stas Bekman
Ged Haywood wrote: Hi Stas, On Wed, 3 Dec 2003, Stas Bekman wrote: my $post_data = STDIN; I don't think so, Ged. The above code will assign the STDIN filehandle to $post_data. ;) 'Sfunny, I've been using that for years... I wonder if something's happening that I don't know about? I suppose y

Apache::Template for mod_perl 2.0

2003-12-03 Thread Geoffrey Young
hi all... over the past few months several people have asked about a port of Apache::Template for mod_perl 2.0 - mostly on the mod_perl list, but a few cornered me at ApacheCon as well. I told each of them that even though Apache::compat was going to be no help for this particular module (since i

a modperl wiki?

2003-12-03 Thread justin
can anyone on the list recommend me a good modperl+mysql based Wiki engine? http://c2.com/cgi/wiki?WikiEngines The list here is endless, and not clear on this subject. thanks -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html

Re: howto get a http request body only?

2003-12-03 Thread Ged Haywood
Hi Stas, On Wed, 3 Dec 2003, Stas Bekman wrote: > > my $post_data = STDIN; > > I don't think so, Ged. The above code will assign the STDIN filehandle to > $post_data. ;) 'Sfunny, I've been using that for years... I wonder if something's happening that I don't know about? 73, Ged. -- Repor

Re: Error

2003-12-03 Thread Stas Bekman
Josh, in case you've missed this thread, can you please fix it in ASP.pm? Thanks. Randy Kobes wrote: The script work fine, but output browser is: --- Hola Mundo OK The server encountered an internal error or misconfiguration and was unable to complete your

Re: howto get a http request body only?

2003-12-03 Thread Stas Bekman
Ged Haywood wrote: On Tue, 2 Dec 2003 [EMAIL PROTECTED] wrote: Is there another way to get only the post data parameters from a http request? my $post_data = STDIN; I don't think so, Ged. The above code will assign the STDIN filehandle to $post_data. ;) To slurp the whole request's data you wil

Re: Error

2003-12-03 Thread Patricio Muñoz
> On Wed, 3 Dec 2003, [iso-8859-1] Patricio Muñoz wrote: > > > Alias /asp/ "D:/Apache/Apache2/asp/" > > > > *CORE::GLOBAL::flock = sub { 1 }; > > > > PerlModule Apache::ASP > > > > Options Indexes MultiViews > > AllowOverride None > > Order allow,deny > >

Re: [MP2] Apache::GeoIP little bug?

2003-12-03 Thread Randy Kobes
On Wed, 3 Dec 2003, Enrico Sorcinelli wrote: > Hi all, > > I've found a little bug in Apache::GeoIP module (1.215) > when using it under mod_perl 2 (Apache 2.0.47, Perl 5.8.1, > mod_perl 1.99_10): > > [Wed Dec 03 13:38:41 2003] [error] [client 1.2.3.4] Can't > locate object method "remote_ip" via

Re: Error

2003-12-03 Thread Randy Kobes
On Wed, 3 Dec 2003, [iso-8859-1] Patricio Muñoz wrote: > Alias /asp/ "D:/Apache/Apache2/asp/" > > *CORE::GLOBAL::flock = sub { 1 }; > > PerlModule Apache::ASP > > Options Indexes MultiViews > AllowOverride None > Order allow,deny > Allow from all >

Re: howto get a http request body only?

2003-12-03 Thread Ged Haywood
Hi there, On Tue, 2 Dec 2003 [EMAIL PROTECTED] wrote: > Is there another way to get only the post data parameters from a http request? my $post_data = STDIN; 73, Ged. -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html

howto get a http request body only?

2003-12-03 Thread modperl
I search for a module for getting a http request body (without header stuff etc.). Apache::Request seems to have this functionality but only in the new dev-version: libapreq2-2.01_03-dev see: http://search.cpan.org/src/JOESUF/libapreq2-2.01_03-dev/docs/html/group__XS__Request.html#body I'm not s

Re: Can't locate object method "new" via package "Apache"

2003-12-03 Thread modperl
On 1 Dec 2003 at 10:30, Randy Kobes wrote: Hello Randy magic! I catched all the information for you, played around again with my script and now it works! Looks like the problem was in my script. Many thanks for your help! regards, Josi Ender > On Mon, 1 Dec 2003 [EMAIL PROTECTED] wrote: > >

Re: Error

2003-12-03 Thread Patricio Muñoz
> Patricio Muñoz wrote: > > Hi, > > When execute the script the result is fine, but the display the next > > messages in the browser: > > > > > > Hola Mundo > > > > OK > > The server encountered an internal error or misconfiguration and was u

[MP2] Apache::GeoIP little bug?

2003-12-03 Thread Enrico Sorcinelli
Hi all, I've found a little bug in Apache::GeoIP module (1.215) when using it under mod_perl 2 (Apache 2.0.47, Perl 5.8.1, mod_perl 1.99_10): [Wed Dec 03 13:38:41 2003] [error] [client 1.2.3.4] Can't locate object method "remote_ip" via package "Apache::Connection" at /home/perl-5.8.1/lib/site_

Re: [BUG] Inconsistent $r->print() behavior with references

2003-12-03 Thread Rafael Garcia-Suarez
Stas Bekman wrote: > Actually I think the current code has another bug. If you do: > >my $x = 1; >print(\$x); > > I'd expect it to print 1 and it won't, because $x is IV and not PV. So I'd > completely drop any checks for PV, and coerce any reference into PV, like so: > > SV *s

CGI::Session

2003-12-03 Thread Greg Oliver
I have a script that uses CGI::Session to store a hash.. I cannot figure out how to get the has data back from the session. The script follows, as well as the stored session data. SCRIPT: #!c:\\perl\\bin\\perl.exe use DBD::ODBC; use DBI; use CGI; use CGI::Session; $dsn = 'driver=Microsoft Acce

Re: [JOB] Internet Billing Programmer / Analyst

2003-12-03 Thread Charles C . Fu
On Monday, Dec 1, 2003, at 17:12 America/Los_Angeles, Cahill, Earl wrote: · Expects some on-site and remote weekend/evening work as needed. In general, job postings requiring some on-site work should list a location. :) -ccwf -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: htt

Inconsistent $r->print() behavior with references

2003-12-03 Thread Jonathan Field
Hi all, This is my first mod_perl bug report, so I'd like to start by thanking you all for your great work over the years. The problem I am experiencing involves passing a scalar reference (instead of a scalar) to $r->print(). It usually works as documented. However I have come across a situati

converting to 2.0, push_handlers question

2003-12-03 Thread Andrew Maltsev
I'm having some problems converting a 1.x mod_perl application to 2.x mod_perl. I use redhat 9, mod_perl-1.99_07-5 rpm, httpd-2.0.40-21.5 rpm, perl 5.8.0, pre-fork mpm. The way the application works is that it installs a TransHandler to decide if it needs to bother handling content (based on uri

upgrading to modperl2 & apache2

2003-12-03 Thread Afgin Shlomit
I install Apache 2.0.48 and modperl 1.99_10 I moved scripts that run okay before with older versions. When I run my script I get the error: an't use string ("") as a HASH ref while "strict refs" in use at /usr/local/lib/perl5/site_perl/5.8.1/sun4-solaris/DBI.pm line 509 What is the problem?

Re: [BUG] Inconsistent $r->print() behavior with references

2003-12-03 Thread Stas Bekman
Rafael Garcia-Suarez wrote: Stas Bekman wrote: But you forget that nobody is going pass SVt_PVBM scalar to print(). Why would they? Do you have a concrete example of someone trying to send a scalar of type > PV to print? Rafael, can you think of such an example? Reference to magic scalars ? (\

Re: [BUG] Inconsistent $r->print() behavior with references

2003-12-03 Thread Rafael Garcia-Suarez
Stas Bekman wrote: > > But you forget that nobody is going pass SVt_PVBM scalar to print(). Why would > they? Do you have a concrete example of someone trying to send a scalar of > type > PV to print? Rafael, can you think of such an example? Reference to magic scalars ? (\$1) to arrays ? to ha

Re: [BUG] Inconsistent $r->print() behavior with references

2003-12-03 Thread Stas Bekman
Frank Maas wrote: Let's do this: try to fix it in the next version. If someone discovers that we broke their code we will revert it. How does it sound? Gee... not on a technical, but more on a philosophical side: is this a wise thing to do? It means that you have to be damm sure that someone (a)

RE: [BUG] Inconsistent $r->print() behavior with references

2003-12-03 Thread Frank Maas
> Let's do this: try to fix it in the next version. If someone > discovers that we broke their code we will revert it. How does it > sound? Gee... not on a technical, but more on a philosophical side: is this a wise thing to do? It means that you have to be damm sure that someone (a) can find out