Proxied mod_perl server problem

2002-05-13 Thread Ian Macdonald

Hi All.

I'm setting up a new server and wish to run two Apache configurations,
one vanilla and one mod_perl. I've configured pretty much according to
Stas' excellent guide, using the rewrite module to push the perl
requests to the second (ie mod_perl) server.

Versions; HP-UX 10.20, Apache 1.3.24, mod_perl 1.26.

It's _nearly_ working, but I'm getting one weird piece of behaviour
which looks to me like the sort of problem someone with more experience
will recognise very swiftly; when I request a perl script via the
mod_perl-enabled locations, the content is preceded by a hex number,
which corresponds very closely to the size of the content, and then a
blank line, as shown below:

4e9

PID = 3282
DOCUMENT_ROOT=/opt/web_root/html
GATEWAY_INTERFACE=CGI-Perl/1.1
etc.

The browser displays the wait cursor for about 15 seconds and then
follows the content (which is correct) with another blank line and then
a zero:

...
SERVER_SOFTWARE=Apache/1.3.24 (Unix) mod_perl/1.26
TZ=EST-10EDT

0

The script works correctly from the command line, or if the mod_perl
server port is accessed directly from the browser, or if the mod_perl
server is started without proxying enabled.

This looks to me as if two parts of the system are contributing the same
header information, or if two protocol layers are being added in the
wrong order, or something like that.

Thanks for any tips.
Ian Macdonald
[EMAIL PROTECTED]

Here's the rewrite config chunk from the main apache:

 RewriteEngine  On
 RewriteLogLevel0
 RewriteRule ^proxy:.*  -  [F]
 RewriteRule ^/perl/(.*)  http://%{HTTP_HOST}:8200/perl/$1 [P,L]
 RewriteRule ^/cgi-perl/(.*)  http://%{HTTP_HOST}:8200/cgi-perl/$1 [P,L]

 ProxyPassReverse / http://%{HTTP_HOST}/

Here's the /perl/ location config from the mod_perl apache

Location /perl/*.pl
SetHandler perl-script
PerlHandler Apache::Registry
Options -Indexes ExecCGI
PerlSendHeader On
/Location





Re: Proxied mod_perl server problem

2002-05-13 Thread Igor Sysoev

On Mon, 13 May 2002, Ian Macdonald wrote:

 I'm setting up a new server and wish to run two Apache configurations,
 one vanilla and one mod_perl. I've configured pretty much according to
 Stas' excellent guide, using the rewrite module to push the perl
 requests to the second (ie mod_perl) server.
 
 Versions; HP-UX 10.20, Apache 1.3.24, mod_perl 1.26.
 
 It's _nearly_ working, but I'm getting one weird piece of behaviour
 which looks to me like the sort of problem someone with more experience
 will recognise very swiftly; when I request a perl script via the
 mod_perl-enabled locations, the content is preceded by a hex number,
 which corresponds very closely to the size of the content, and then a
 blank line, as shown below:
 
 4e9
 
 PID = 3282
 DOCUMENT_ROOT=/opt/web_root/html
 GATEWAY_INTERFACE=CGI-Perl/1.1
 etc.

Your backend send chunked response - I think you use 1.3.24 mod_proxy
and it probably send HTTP/1.1 request.
You should force mod_perl to HTTP/1.0

Another way is to use mod_accel. It always uses HTTP/1.0 with backend
and more advanced then mod_proxy.

Igor Sysoev
http://sysoev.ru




RE: mod_perl2: nmake test crashes apache

2002-05-13 Thread Alessandro Forghieri

Greetings

Doug McEachern wrote:
[...]
 avoiding use of PL_sv_no has cured all segfaults on win32.  
 the fixes have 
 been checked into cvs.
 there are still a few tests that fail, but none that trigger 
 a segfault.

With the latest nodperl CVS snapshot the tally of the tests is much
improved.
There is a residual crash at dir_config.t (WinNT SP6 - MS Visual
Studio 6 SP3).

The debugger shows apache (debug version) going through the
ap_invoke_handler sequence before dumping me in the middle of
mod_perl's assembly. When it segfaults the stack (not cleared, this
time) shows a call into modperl the a trip into perl56.dll followed by
a call into request_util then modperl again (where it dies).

I re-ran the test suite without dir_config and all crashes go away,
though a few tests still fail.

At this point, I made a debug version of mod_perl (now possible - the
compiler warns about replacements of /O1 with /Od) and - lo and
behold! - the crash disappeared (darn).  Also a few of the previously
failing tests now succeed

The tallies (with/without dir_config.t, and nmake test DEBUG) are
appendend below. Note that, in the first one, all tests coming after
dir_config fail ('coz apache is deeply unsettled, I think)

Cheers,
alf

Using the following snapshot:

modperl-2.0_20020513043636.tar.gz
httpd-2.0_20020506161223.tar.gz
apr-util_20020506162813.tar.gz
apr_20020506162759.tar.gz

-- output of nmake test --
D:\Apache2/bin/Apache.exe  -d D:/builds/modperl-2.0/t -f D:/builds/mo
/conf/httpd.conf -DAPACHE2 -DPERL_USEITHREADS
using Apache/2.0.37-dev (winnt MPM)
waiting for server to start: 00:00[Mon May 13 11:42:50 2002] [info] 1
modules loaded
[Mon May 13 11:42:50 2002] [info] 5 APR:: modules loaded
[Mon May 13 11:42:50 2002] [info] base server + 6 vhosts ready to run
[Mon May 13 11:42:50 2002] [info] 11 Apache:: modules loaded
[Mon May 13 11:42:50 2002] [info] 5 APR:: modules loaded
[Mon May 13 11:42:50 2002] [info] base server + 6 vhosts ready to run
END in modperl_extra.pl, pid=309
END in modperl_extra.pl, pid=309
END in modperl_extra.pl, pid=309
END in modperl_extra.pl, pid=309
END in modperl_extra.pl, pid=309
END in modperl_extra.pl, pid=309
END in modperl_extra.pl, pid=309
waiting for server to start: ok (waited 1 secs)
server localhost:8529 started
server localhost:8530 listening (TestDirective::perlmodule)
server localhost:8531 listening (TestDirective::perlrequire)
server localhost:8532 listening (TestProtocol::echo)
server localhost:8533 listening (TestProtocol::echo_filter)
server localhost:8534 listening (TestProtocol::eliza)
server localhost:8535 listening (TestFilter::input_msg)
apache\cgihandlerok
apache\compatok
apache\compat2...ok
apache\conftree..ok
apache\constants.ok
apache\post..ok
apache\read..ok
apache\scanhdrs..ok
apache\subprocessskipped: perl  5.7.3, cannot find module 'A

apache\write.ok
api\access...ok
api\aplogok
api\conn_rec.ok
api\lookup_uri...ok
api\lookup_uri2..ok
api\module...FAILED test 3
Failed 1/13 tests, 92.31% okay
api\r_subclass...ok
api\request_rec..ok
api\response.ok
api\rutilok
api\send_fd..ok
api\sendfile.ok
api\server_rec...ok
api\server_util..ok
api\uri..ok
apr\base64...ok
apr\constantsok
apr\date.ok
apr\netlib...ok
apr\perlio...skipped: iolayers is not available with this
 Perl
apr\pool.ok
apr\string...ok
apr\tableok
apr\util.ok
apr\uuid.ok
directive\envFAILED tests 1-3
Failed 3/4 tests, 25.00% okay
directive\perlmodule.ok
directive\perlrequireok
directive\setupenv...ok
filter\api...ok
filter\buckets...ok
filter\input_bodyok
filter\input_msg.ok
filter\lcok
filter\reverse...ok
hooks\access.ok
hooks\authen.ok
hooks\authz..ok
hooks\fixup..ok
hooks\headerparser...ok
hooks\init...ok
hooks\trans..ok
modperl\dir_config...FAILED before any test output arrived
modperl\endavFAILED before any test output arrived
modperl\env..FAILED before any test output arrived
modperl\exit.FAILED before any test output arrived
modperl\getc.FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
modperl\pnotes...FAILED before any test output arrived
modperl\printFAILED before any test output arrived
modperl\printf...FAILED before any test output arrived
modperl\readline.FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
modperl\sameinterp...must pass an interpreter id to work with at
odperl-2.0/Apache-Test/lib/Apache/TestRequest.pm line 

open3 does not proper work in mod_perl context

2002-05-13 Thread Silvio Wanka

Hi,

I will upgrade from

  Embedded Perl version 5.00502 for Apache/1.3.6 (Unix) mod_perl/1.19
to
  Embedded Perl version v5.6.1 for Apache/1.3.23 (Unix) mod_perl/1.26

But now all mod_perl scripts which uses IPC::Open3::open3() fails
because STDIN of the new process is closed. I have done some test
and found that

  print(join \n, fileno(STDIN), fileno(STDOUT), fileno(STDERR), '' );

shows

  1
  1
  2

and not the expected

  0
  1
  2

open3 calls

  xopen \*STDIN,  = . fileno $kid_rdr;

but because fileno(STDOUT) is equal to fileno(STDIN) the new fileno
of STDIN after the dup will be greater than 2 and so closed by the
exec call but also as 1 it would not work.

Is this a known problem?

regards, Silvio



Re: [modperl2] Note on the win32 docs

2002-05-13 Thread Peter Rothermel

Excellent document.
A slight enhancement request.
Could you give some details on how to separate
the modperl installation from the Perl installation?
I believe the latest binary release has the mod_perl
installed in a separate blib under the C:\Apache2 directory.

thanks
-pete

 __
 Stas BekmanJAm_pH -- Just Another mod_perl Hacker
 http://stason.org/ mod_perl Guide --- http://perl.apache.org
 mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
 http://modperlbook.org http://apache.org   http://ticketmaster.com



Re: [modperl2] Note on the win32 docs

2002-05-13 Thread Randy Kobes

On Mon, 13 May 2002, Peter Rothermel wrote:

 Excellent document.
 A slight enhancement request.
 Could you give some details on how to separate
 the modperl installation from the Perl installation?
 I believe the latest binary release has the mod_perl
 installed in a separate blib under the C:\Apache2 directory.

 thanks
 -pete

Thanks ... I assume you're talking about the Apache-2/modperl-2
binary within the Apache2.tar.gz archive referred to ...
The blib/ directory under C:/Apache2 doesn't actually
have to be moved anywhere - one includes it with the directive
PerlSwitches -Mblib=C:\Apache2
specified in the supplied httpd.conf  So, for this
distribution, one doesn't need to do anything with the
Perl stuff ... Or am I misunderstanding something?

best regards,
randy




Re: [modperl2] Note on the win32 docs

2002-05-13 Thread Peter Rothermel

Randy Kobes wrote:

 On Mon, 13 May 2002, Peter Rothermel wrote:

 The blib/ directory under C:/Apache2 doesn't actually
 have to be moved anywhere - one includes it with the directive
 PerlSwitches -Mblib=C:\Apache2
 specified in the supplied httpd.conf  So, for this
 distribution, one doesn't need to do anything with the
 Perl stuff ... Or am I misunderstanding something?

When you built the mod_perl distribution did you use
perl Makefile.PL MP_AP_PREFIX=C\Apache2   MP_INST_APACHE2=1 LIB=C:\Apache2\blib\lib

thanks
pete



 best regards,
 randy



Re: [modperl2] Note on the win32 docs

2002-05-13 Thread Randy Kobes

On Mon, 13 May 2002, Peter Rothermel wrote:

 When you built the mod_perl distribution did you use
 perl Makefile.PL MP_AP_PREFIX=C\Apache2 MP_INST_APACHE2=1
 LIB=C:\Apache2\blib\lib

Ah ... I just used
perl Makefile.PL MP_AP_PREFIX=C:\Apache2 MP_INST_APACHE2=1
and then copied the blib/ directory into Apache2/ (and the
mod_perl.so into Apache2/modules/).

best regards,
randy






RE: mod_perl2: nmake test crashes apache

2002-05-13 Thread Doug MacEachern

On Mon, 13 May 2002, Alessandro Forghieri wrote:

 There is a residual crash at dir_config.t (WinNT SP6 - MS Visual
 Studio 6 SP3).

all tests pass for me with both 5.6.1 and bleedperl, httpd-2.0 from cvs on 
xp with msdev 6.0.  i also tried 5.6.1 with no debug symbols, still all 
pass.  would help to know which test causes the crash.  you could try 
turning on autoflush in the test (patch below), start the server with 
't/TEST -start' and run it through a browser by opening: 
http://localhost:8529/TestModperl::dir_config

Index: t/response/TestModperl/dir_config.pm
===
RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/dir_config.pm,v
retrieving revision 1.3
diff -u -r1.3 dir_config.pm
--- t/response/TestModperl/dir_config.pm11 Apr 2002 11:08:44 -  1.3
+++ t/response/TestModperl/dir_config.pm13 May 2002 16:27:03 -
 -16,6 +16,8 
 sub handler {
 my $r = shift;
 
+$| = 1;
+
 plan $r, tests = 12;
 
 #Apache::RequestRec::dir_config tests






automatic redirect to https

2002-05-13 Thread Aaron J Mackey


Can anyone see something wrong with this, or suggest a better mechanism:

unless ( $ENV{HTTPS} ) {
# bounce request to secure port
my $uri = $r-parsed_uri();
$uri-scheme('https');
$r-header_out(Location = $uri-unparse());
return REDIRECT;
}

This doesn't seem to work for me; the browser acts as if it's in an
eternal redirection loop.  And the server's error log says that a child
segfaulted in the process.  The $uri-unparse yields a string like
https:/mydirectory when I access http://myserver.org/mydirectory;.  Do
I need to rebuild the entire URI manually?

Thanks,

-Aaron




Re: automatic redirect to https

2002-05-13 Thread Geoffrey Young



Aaron J Mackey wrote:

 Can anyone see something wrong with this, or suggest a better mechanism:
 
 unless ( $ENV{HTTPS} ) {
 # bounce request to secure port
 my $uri = $r-parsed_uri();
 $uri-scheme('https');
 $r-header_out(Location = $uri-unparse());
 return REDIRECT;
 }
 
 This doesn't seem to work for me; the browser acts as if it's in an
 eternal redirection loop.  And the server's error log says that a child
 segfaulted in the process.  The $uri-unparse yields a string like
 https:/mydirectory when I access http://myserver.org/mydirectory;.  Do
 I need to rebuild the entire URI manually?


no.  try this instead

my $uri = Apache::URI-parse($r);


HTH


--Geoff




Re: automatic redirect to https

2002-05-13 Thread Aaron J Mackey


On Mon, 13 May 2002, Geoffrey Young wrote:

 my $uri = Apache::URI-parse($r);

Well, now $uri-unparse yields this: null: https://_default_/mydirectory;

Which of course doesn't work in the Location field of the redirect.  I can
munge this as I need, but I was hoping for something cleaner.

-Aaron

-- 
 Aaron J Mackey
 Pearson Laboratory
 University of Virginia
 (434) 924-2821
 [EMAIL PROTECTED]





Re: cannot build mod_perl-1.99_01 with httpd-2.0.36

2002-05-13 Thread Doug MacEachern

On Sat, 11 May 2002, Tom Kralidis wrote:

 
 % perl Makefile.PL MP_AP_PREFIX=/usr/local/src/apache/httpd-2.0.36

MP_AP_PREFIX needs to be a directory where apache is installed, not the 
source tree.  when apache is installed it puts all headers into the 
installed include/ directory.




mod_perl2: nmake test crashes apache

2002-05-13 Thread Alessandro Forghieri

Greetings.

Well now...

 There is a residual crash at dir_config.t (WinNT SP6 - MS Visual
  Studio 6 SP3).
 
 all tests pass for me with both 5.6.1 and bleedperl, 
 httpd-2.0 from cvs on 
 xp with msdev 6.0.  i also tried 5.6.1 with no debug symbols, 
 still all 
 pass.  would help to know which test causes the crash.  you could try 
[...]

This is embarassing.

I rebuilt a no-debug modperl, re-ran the tests and dir_config.t passed with
flying colors.
I am really sure that it was failing this morning *EXCEPT* I did not ran
nmake install
before nmake test then.

I think apache may be (sometimes?) picking up whatever mod_perl.so is under
SERVER_ROOT/modules during the test run. Either that or I am getting
senile-a possibility in itself.

So, disregard my previous message, my failed line is now:

Failed Test  Stat Wstat Total Fail  Failed  List of Failed

---
api\module.t   131   7.69%  3
3 tests skipped.

And all is quiet.

Cheers,
alf

P.S: I do have crashes in a real world app, buti I'll talk about them when I
can characterize them - which I'm unable to do right now.





Re: automatic redirect to https

2002-05-13 Thread Geoffrey Young



Aaron J Mackey wrote:

 On Mon, 13 May 2002, Geoffrey Young wrote:
 
 
my $uri = Apache::URI-parse($r);

 
 Well, now $uri-unparse yields this: null: https://_default_/mydirectory;
 
 Which of course doesn't work in the Location field of the redirect.  I can
 munge this as I need, but I was hoping for something cleaner.


hmm, that's interesting - I guess you're catching a VirtualHost _default_ setting?  
If 
so, there's probably not much you can do about it save something like

my $uri = Apache:URI-parse($r);
$uri-hostname($r-headers_in-get('Host'));

if you can, adding a ServerName directive might make things work as well, but I 
suppose 
that defeats the purpose of _default_ :)

at this point, however, there may not be a more elegant solution since 
Apache::URI-parse() relies on Apache API calls for most of its information.

HTH

--Geoff







Re: automatic redirect to https

2002-05-13 Thread Aaron J Mackey


On Mon, 13 May 2002, Geoffrey Young wrote:

 hmm, that's interesting - I guess you're catching a VirtualHost _default_ setting? 
 If
 so, there's probably not much you can do about it save something like

 my $uri = Apache:URI-parse($r);
 $uri-hostname($r-headers_in-get('Host'));

That did the trick - the browser is now redirected correctly, thanks.

-Aaron




Re: mod_perl2: nmake test crashes apache

2002-05-13 Thread Doug MacEachern

On Mon, 13 May 2002, Alessandro Forghieri wrote:
 
 I think apache may be (sometimes?) picking up whatever mod_perl.so is under
 SERVER_ROOT/modules during the test run.

this is fixed in cvs now.

 So, disregard my previous message, my failed line is now:

as is this.




MLDBM Tie Errors

2002-05-13 Thread Mike Martinet

Greetings,

With this setup:

Linux kernel 2.4.7-10
Apache 1.3.24
mod_perl-1.26
Apache::ASP 2.33
MLDBM 0.25

I keep getting the following errors:

First this -

[Mon May 13 08:57:26 2002] [notice] Apache/1.3.24 (Unix) mod_perl/1.26 
mod_ssl/2.8.8 OpenSSL/0.9.6b configured -- resuming normal operations

[Mon May 13 08:57:26 2002] [notice] Accept mutex: sysvsem (Default: sysvsem)
can't unlink dir /mnt/hdb/www/content//: Directory not empty at 
/usr/lib/perl5/site_perl/5.6.1/MLDBM/Sync.pm line 110.

then shortly thereater (it seems) this -

MLDBM error: Second level tie failed, Invalid argument at 
/usr/lib/perl5/site_perl/5.6.1/MLDBM/Sync.pm line 209
[Mon May 13 09:25:48 2002] [error] can't tie to MLDBM with args: 
,66,416; error:  at /usr/lib/perl5/site_perl/5.6.1/MLDBM/Sync.pm line 209.


This appears to be random.  I'm trying to figure out which code I've 
written might be triggering it, but I'm having trouble tracking it down. 
  Sometimes a server restart is required to recover; sometimes not.  The 
two errors don't always appear together.

Any help would be greatly appreciated.


Thanks,



MjM




RE: automatic redirect to https

2002-05-13 Thread Christian Gilmore

Is there a reason you don't just use a Redirect?

  VirtualHost  __default__:80
  Redirect  /   https://secure.server.com/
  /VirtualHost

Regards,
Christian

-
Christian Gilmore
Technology Leader
GeT WW Global Applications Development
IBM Software Group


 -Original Message-
 From: Aaron J Mackey [mailto:[EMAIL PROTECTED]]
 Sent: Monday, May 13, 2002 1:12 PM
 To: [EMAIL PROTECTED]
 Subject: automatic redirect to https
 
 
 
 Can anyone see something wrong with this, or suggest a better 
 mechanism:
 
 unless ( $ENV{HTTPS} ) {
 # bounce request to secure port
 my $uri = $r-parsed_uri();
 $uri-scheme('https');
 $r-header_out(Location = $uri-unparse());
 return REDIRECT;
 }
 
 This doesn't seem to work for me; the browser acts as if it's in an
 eternal redirection loop.  And the server's error log says 
 that a child
 segfaulted in the process.  The $uri-unparse yields a string like
 https:/mydirectory when I access 
 http://myserver.org/mydirectory;.  Do
 I need to rebuild the entire URI manually?
 
 Thanks,
 
 -Aaron
 



Getting the output-filehandle

2002-05-13 Thread Nico Erfurth

Hi,

I'm wondering if it's possible to retrieve some kind of FH from the 
Request-object, because i want to pass the output-filehandle to 
HTML::Template, so it can write while it parses a template.

STDOUT doesn't work (would be too easy ;))

I thought about creating my own FH, tied to a simple class, that just 
outputs everything, but first i wanted to ask, if there is something i 
can use directly.

(I'm using mod_perl 1.26)

ciao Nico




Re: cannot build mod_perl-1.99_01 with httpd-2.0.36

2002-05-13 Thread Tom Kralidis


 
  % perl Makefile.PL MP_AP_PREFIX=/usr/local/src/apache/httpd-2.0.36

MP_AP_PREFIX needs to be a directory where apache is installed, not the
source tree.  when apache is installed it puts all headers into the
installed include/ directory.

Thanks for the info.  That didn't seem to work either

cd src/modules/perl  make
make[1]: Entering directory 
`/usr/local/src/apache/httpd-2.0.36/mod_perl-1.99_01/src/modules/p
erl'
gcc -I/usr/local/src/apache/httpd-2.0.36/mod_perl-1.99_01/src/modules/perl 
-I/usr/local/src/ap
ache/httpd-2.0.36/mod_perl-1.99_01/xs -I/www/include -fno-strict-aliasing 
-I/usr/local/include
  -I/usr/lib/perl5/5.6.1/i386-linux/CORE -DMOD_PERL -O2 -march=i386 
-mcpu=i686 -fPIC \
-c mod_perl.c  mv mod_perl.o mod_perl.lo
In file included from mod_perl.h:4,
 from mod_perl.c:1:
modperl_apache_includes.h:46:22: apr_lock.h: No such file or directory
make[1]: *** [mod_perl.lo] Error 1
make[1]: Leaving directory 
`/usr/local/src/apache/httpd-2.0.36/mod_perl-1.99_01/src/modules/pe
rl'
make: *** [modperl_lib] Error 2

...I have no apr_lock.h in /www/includes.  Do I need libapreq?  If so, that 
install does not work either:

...
apache_cookie.c:117: `c' undeclared (first use in this function)
apache_cookie.c:118: invalid lvalue in assignment
apache_cookie.c:120: request for member `r' in something not a structure or 
union
apache_cookie.c: At top level:
apache_cookie.c:144: parse error before `*'
apache_cookie.c: In function `ApacheCookie_parse':
apache_cookie.c:147: `retval' undeclared (first use in this function)
apache_cookie.c:148: parse error before `)'
apache_cookie.c:148: invalid lvalue in assignment
apache_cookie.c:151: warning: assignment makes pointer from integer without 
a cast
apache_cookie.c:156: `c' undeclared (first use in this function)
apache_cookie.c:182: parse error before `)'
apache_cookie.c: At top level:
apache_cookie.c:196: parse error before `*'
apache_cookie.c: In function `escape_url':
apache_cookie.c:198: `p' undeclared (first use in this function)
apache_cookie.c:198: `val' undeclared (first use in this function)
apache_cookie.c: At top level:
apache_cookie.c:230: parse error before `*'
apache_cookie.c: In function `ApacheCookie_as_string':
apache_cookie.c:232: `array_header' undeclared (first use in this function)
apache_cookie.c:232: `values' undeclared (first use in this function)
apache_cookie.c:233: `pool' undeclared (first use in this function)
apache_cookie.c:233: `p' undeclared (first use in this function)
apache_cookie.c:233: `c' undeclared (first use in this function)
apache_cookie.c:234: parse error before `char'
apache_cookie.c:248: `cookie' undeclared (first use in this function)
apache_cookie.c:249: `i' undeclared (first use in this function)
apache_cookie.c:256: `retval' undeclared (first use in this function)
apache_cookie.c: At top level:
apache_cookie.c:265: parse error before `*'
apache_cookie.c: In function `ApacheCookie_bake':
apache_cookie.c:267: `c' undeclared (first use in this function)
make[1]: *** [apache_cookie.lo] Error 1
make[1]: Leaving directory 
`/usr/local/src/apache/httpd-2.0.36/libapreq-1.0/c'
make: *** [all-recursive] Error 1

Any suggestions?

Thanks

..Tom



_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx




Re: cannot build mod_perl-1.99_01 with httpd-2.0.36

2002-05-13 Thread Peter Rothermel

I'm getting the same error on Win32 builds.  I just assumed that mod_perl-1.99_01
and httpd-2.0.36 were not compatible. I've been compiling with httpd-2.0.35 and to
avoid the error. The file apr_lock.h is missing in the httpd-2.0.36 include directory
but present in the httpd-2.0.35 source tree.

-pete

Tom Kralidis wrote:

  
   % perl Makefile.PL MP_AP_PREFIX=/usr/local/src/apache/httpd-2.0.36
 
 MP_AP_PREFIX needs to be a directory where apache is installed, not the
 source tree.  when apache is installed it puts all headers into the
 installed include/ directory.

 Thanks for the info.  That didn't seem to work either

 cd src/modules/perl  make
 make[1]: Entering directory
 `/usr/local/src/apache/httpd-2.0.36/mod_perl-1.99_01/src/modules/p
 erl'
 gcc -I/usr/local/src/apache/httpd-2.0.36/mod_perl-1.99_01/src/modules/perl
 -I/usr/local/src/ap
 ache/httpd-2.0.36/mod_perl-1.99_01/xs -I/www/include -fno-strict-aliasing
 -I/usr/local/include
   -I/usr/lib/perl5/5.6.1/i386-linux/CORE -DMOD_PERL -O2 -march=i386
 -mcpu=i686 -fPIC \
 -c mod_perl.c  mv mod_perl.o mod_perl.lo
 In file included from mod_perl.h:4,
  from mod_perl.c:1:
 modperl_apache_includes.h:46:22: apr_lock.h: No such file or directory
 make[1]: *** [mod_perl.lo] Error 1
 make[1]: Leaving directory
 `/usr/local/src/apache/httpd-2.0.36/mod_perl-1.99_01/src/modules/pe
 rl'
 make: *** [modperl_lib] Error 2

 ...I have no apr_lock.h in /www/includes.  Do I need libapreq?  If so, that
 install does not work either:

 ...
 apache_cookie.c:117: `c' undeclared (first use in this function)
 apache_cookie.c:118: invalid lvalue in assignment
 apache_cookie.c:120: request for member `r' in something not a structure or
 union
 apache_cookie.c: At top level:
 apache_cookie.c:144: parse error before `*'
 apache_cookie.c: In function `ApacheCookie_parse':
 apache_cookie.c:147: `retval' undeclared (first use in this function)
 apache_cookie.c:148: parse error before `)'
 apache_cookie.c:148: invalid lvalue in assignment
 apache_cookie.c:151: warning: assignment makes pointer from integer without
 a cast
 apache_cookie.c:156: `c' undeclared (first use in this function)
 apache_cookie.c:182: parse error before `)'
 apache_cookie.c: At top level:
 apache_cookie.c:196: parse error before `*'
 apache_cookie.c: In function `escape_url':
 apache_cookie.c:198: `p' undeclared (first use in this function)
 apache_cookie.c:198: `val' undeclared (first use in this function)
 apache_cookie.c: At top level:
 apache_cookie.c:230: parse error before `*'
 apache_cookie.c: In function `ApacheCookie_as_string':
 apache_cookie.c:232: `array_header' undeclared (first use in this function)
 apache_cookie.c:232: `values' undeclared (first use in this function)
 apache_cookie.c:233: `pool' undeclared (first use in this function)
 apache_cookie.c:233: `p' undeclared (first use in this function)
 apache_cookie.c:233: `c' undeclared (first use in this function)
 apache_cookie.c:234: parse error before `char'
 apache_cookie.c:248: `cookie' undeclared (first use in this function)
 apache_cookie.c:249: `i' undeclared (first use in this function)
 apache_cookie.c:256: `retval' undeclared (first use in this function)
 apache_cookie.c: At top level:
 apache_cookie.c:265: parse error before `*'
 apache_cookie.c: In function `ApacheCookie_bake':
 apache_cookie.c:267: `c' undeclared (first use in this function)
 make[1]: *** [apache_cookie.lo] Error 1
 make[1]: Leaving directory
 `/usr/local/src/apache/httpd-2.0.36/libapreq-1.0/c'
 make: *** [all-recursive] Error 1

 Any suggestions?

 Thanks

 ..Tom

 _
 MSN Photos is the easiest way to share and print your photos:
 http://photos.msn.com/support/worldwide.aspx



[JOB] Mod_Perl/Sys Admin/HTML Tech Support - Los Angeles, CA

2002-05-13 Thread Frank Scannello

The Partner Technical Team Support Engineer is dedicated to helping Partners
maintain and administrate the Citysearch software.  Because Partner needs,
technologies, business requirements and languages vary widely, the candidate
must be able to communicate effectively.

Location: must be able to commute to 3701 Wilshire blvd in Los Angeles, CA.
Relocation assistance not provided.

Qualifications
* Experience working in a webmaster-like role. A true web technologies
generalist (part system administration (linux/unix), part front-end
development (strong HTML), part back-end development (perl cgi, mod_perl
ideal).
* Significant Experience with perl scripting
* Required - extensive knowledge of HTML.
* Unix environment (basic administration) - 2 years

I am assisting my client in finding and selecting qualified candidates for
this position. The client is Ticketmaster City Search. Please respond with
resume to:

Frank Scannello
Contract Recruiter
[EMAIL PROTECTED]
904-543-0808





Re: cannot build mod_perl-1.99_01 with httpd-2.0.36

2002-05-13 Thread Doug MacEachern

On Mon, 13 May 2002, Tom Kralidis wrote:

 modperl_apache_includes.h:46:22: apr_lock.h: No such file or directory

oh right, 1.99_01 will not compile with 2.0.36, since apr_lock.h has been 
removed from apache.  you can use modperl from cvs or wait for 1.99_02, 
which should be released soon-ish.
 
 ...I have no apr_lock.h in /www/includes.  Do I need libapreq?  If so, that 
 install does not work either:

no, the current release of libapreq does not compile with apache 2.0





$r-args vs $r-content

2002-05-13 Thread Mike Melillo


Hi,

I'm having issues processing user input via POST requests.  I have a
simple form page, that when you click submit I just want to redisplay
the page but with the values filled in. If I do a GET request and do
%params = $r-args;

It works, but if I use the method in the eagle book for POST requests
%params = $r-content; then nothing gets returned.  I've even printed
%params to the apache errlog with DataDumper, and its empty.  

One of the fields is an image file that will be uploaded so I need to
use POST requests.  Is this a job for Apache::Request?  The eagle book
doesn't cover it much because it was experimental at the time of
publishing.

Thanks,

Mike




Re: $r-args vs $r-content

2002-05-13 Thread Todd Finney

At 10:29 PM 5/13/02, Mike Melillo wrote:
It works, but if I use the method in the eagle book for POST requests
%params = $r-content; then nothing gets returned.  I've even printed
%params to the apache errlog with DataDumper, and its empty.

One of the fields is an image file that will be uploaded so I need to
use POST requests.  Is this a job for Apache::Request?  The eagle book
doesn't cover it much because it was experimental at the time of
publishing.

Does your FORM tag specify enctype=application/x-www-urlencoded?

cheers,
Todd




RE: $r-args vs $r-content

2002-05-13 Thread Mike Melillo


No, It specifies multipart/form-data because page 131 of the eagle says
its used for file uploads.

Mike 

-Original Message-
From: Todd Finney [mailto:[EMAIL PROTECTED]] 
Sent: Monday, May 13, 2002 11:16 PM
To: [EMAIL PROTECTED]
Subject: Re: $r-args vs $r-content

At 10:29 PM 5/13/02, Mike Melillo wrote:
It works, but if I use the method in the eagle book for POST requests
%params = $r-content; then nothing gets returned.  I've even printed
%params to the apache errlog with DataDumper, and its empty.

One of the fields is an image file that will be uploaded so I need to
use POST requests.  Is this a job for Apache::Request?  The eagle book
doesn't cover it much because it was experimental at the time of
publishing.

Does your FORM tag specify enctype=application/x-www-urlencoded?

cheers,
Todd




HTTP version conflict with proxy setup.

2002-05-13 Thread Ian Macdonald

Hi,

More info on my problem with my proxied (via Rewrite rules) mod_perl
apache giving responses that were a) topped  tailed with message size
and 0 respectively, and b) delayed for about 15 seconds; thanks to
Igor S. for tipping me off that this was chunking and therefore it was a
HTTP 1.0 vs 1.1 problem, but I still haven't managed to completely solve
it.

Short version:

Can I tell my mod_perl apache to either only ever respond with 1.0 HTTP,
or to not use chunking? (Or how do I tell my main server not to
promote the version when it routes the original request to the
mod_perl server?)

Setting force-response-1.0  downgrade-1.0 to 1 doesn't seem to work
(completely).

Long version:

The problem appears to be that the browser I'm using for testing
(Netscape 4.78 on Redhat) is issuing GET xxx 1.0 requests; these are
recognised as perl resources and passed to the mod_perl apache but the
new requests are like GET xxx 1.1. The mod_perl apache obediently sends
back a chunked 1.1 answer, which the browser can't handle. As
confirmation I tried a different test machine running Netscape 6.? and
the aberrant behaviour disappeared.  When I go straight to the mod_perl
server by specifying the port in the URL, it works because the original
request is 1.0 and so that is what is returned.

I've tried adding SetEnv force-response-1.0 1 and SetEnv
downgrade-1.0 1 in both servers config, but the only effect I've
noticed is when I add force-response-1.0 to the main server, the delay
goes away; the size  0 (ie the chunking info) still top  tail the
response.

Thanks
Ian Macdonald
[EMAIL PROTECTED]



RE: $r-args vs $r-content

2002-05-13 Thread Todd Finney

Yup, slight memory error when responding, sorry :)

$r-content is going to be empty if you're not using the 
application/x-www-form-urlencoded, perldoc Apache.

Page 131 of the Eagle book also says

If the browser uses the newer multiport/form-data encoding (which is 
used for  file uploads, among other things), then mod_perl users will 
have to read and parse the content information themselves.

You need to use Apache::Request, or CGI.pm to do a file upload.  It's 
not going to work otherwise.   I've never had a problem with A::Request 
in production use; I don't think it's considered experimental any 
more.

cheers,
Todd

At 11:49 PM 5/13/02, Mike Melillo wrote:

No, It specifies multipart/form-data because page 131 of the eagle 
says
its used for file uploads.

Mike

-Original Message-
From: Todd Finney [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 13, 2002 11:16 PM
To: [EMAIL PROTECTED]
Subject: Re: $r-args vs $r-content

At 10:29 PM 5/13/02, Mike Melillo wrote:
 It works, but if I use the method in the eagle book for POST 
 requests
 %params = $r-content; then nothing gets returned.  I've even 
 printed
 %params to the apache errlog with DataDumper, and its empty.
 
 One of the fields is an image file that will be uploaded so I need 
 to
 use POST requests.  Is this a job for Apache::Request?  The eagle 
 book
 doesn't cover it much because it was experimental at the time of
 publishing.

Does your FORM tag specify enctype=application/x-www-urlencoded?

cheers,
Todd




Re: MLDBM Tie Errors

2002-05-13 Thread Joshua Chamas

Mike Martinet wrote:
 
 Greetings,
 
 With this setup:
 
 Linux kernel 2.4.7-10
 Apache 1.3.24
 mod_perl-1.26
 Apache::ASP 2.33
 MLDBM 0.25
 

Please submit a trace of the error_log for the request, with 

  PerlSetVar Debug -1

set, and a description of the problem as well as what file 
permissions for /mnt/hdb/www/content/ look like ( ls -l )
to the Apache::ASP list at [EMAIL PROTECTED]

Please submit the error_log for a full request that contains
the error.  It might also help to set $SIG{__DIE__} = \Carp::confess;
somewhere to recover a stack trace of where the error occurs.

--Josh



[JOB SEEK] Toronto - Re: [JOB] Mod_Perl/Sys Admin/HTML Tech Support - Los Angeles, CA

2002-05-13 Thread Peter Bi

Hi,

I shall fit 99% to Frank's job :-), but I have to move to Toronto soon.

Looking for a mod_Perl or Perl related job in GTA (Toronto and Southern
Ontario, Canada). Off-site contractor job is okay too. ASAP.

Please check my resume at http://modperl.home.att.net .

Thanks.


Peter Bi

p.s. I resist shifting to J2EE!

- Original Message -
From: Frank Scannello [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 13, 2002 4:56 PM
Subject: [JOB] Mod_Perl/Sys Admin/HTML Tech Support - Los Angeles, CA


 The Partner Technical Team Support Engineer is dedicated to helping
Partners
 maintain and administrate the Citysearch software.  Because Partner needs,
 technologies, business requirements and languages vary widely, the
candidate
 must be able to communicate effectively.

 Location: must be able to commute to 3701 Wilshire blvd in Los Angeles,
CA.
 Relocation assistance not provided.

 Qualifications
 * Experience working in a webmaster-like role. A true web technologies
 generalist (part system administration (linux/unix), part front-end
 development (strong HTML), part back-end development (perl cgi, mod_perl
 ideal).
 * Significant Experience with perl scripting
 * Required - extensive knowledge of HTML.
 * Unix environment (basic administration) - 2 years

 I am assisting my client in finding and selecting qualified candidates for
 this position. The client is Ticketmaster City Search. Please respond with
 resume to:

 Frank Scannello
 Contract Recruiter
 [EMAIL PROTECTED]
 904-543-0808