Subject: [LON-CAPA-dev] apache 2 should now really work

From: Guy Albertelli II <[email-masked]>
Date: Sat, 8 Apr 2006 03:16:05 -0400 (EDT)

Okay,

If you check out the head version of lon-capa this time it really will
work on Apache 2.

-- 
[email-masked]   0-7-1-8-27,137

---

From: Jeremy Bowers <[email-masked]>
Date: Sat, 08 Apr 2006 13:14:45 -0400

> If you check out the head version of lon-capa this time it really will

What was the problem(s) before?

---

From: Guy Albertelli II <[email-masked]>
Date: Sat, 8 Apr 2006 19:26:52 -0400 (EDT)

[ Charset ISO-8859-1 unsupported, converting... ]
> What was the problem(s) before?

Printout.pl and out CGi scripts can't use Apache2::compat or other
parts of the Apache::* family of ruotines in a generally successful
manner outside of the mod_perl environment. You get seemingly odd
errors and the perl code fails to find some expected C-code constants
etc.

Try out making a .pl file that is 

use strict
use Apache2::compat;

1;

And you'll see the errors occur.

I had modified the .pm files on my machine so that perl just shut up
about things. But long term it's probably best to seperate the bits of
Lon-CAPA that need the mod_perl environment (the web page generators)
and the functions that talk to the network and push the bits around
(lonnet.pm lonmsg.pm etc.)

The way things are now

lonnet.pm
loncommon.pm
lonlocal.pm
lonmsg.pm
lonhtmlcommon.pm 

at least are now usable in a cgi/script environment and shouldn't even
need apache/mod_perl to be installed.

---

From: Gerd Kortemeyer <[email-masked]>
Date: Sat, 8 Apr 2006 20:19:30 -0400

But it doesn't work under Apache 1.3 anymore ...

The first thing that crashes is loncommon.pm, the constant M_GET is  
not recognized.

... now I need to figure out how to install Apache 2.0.

- Gerd.

On Apr 8, 2006, at 3:16 AM, Guy Albertelli II wrote:

> _______________________________________________
> LON-CAPA-dev mailing list
> [email-masked]
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-dev

---

From: Jeremy Bowers <[email-masked]>
Date: Sat, 08 Apr 2006 21:42:12 -0400

Gerd Kortemeyer wrote:
> The first thing that crashes is loncommon.pm, the constant M_GET is  not 
> recognized.

Hmmm, I have the same problem. Apache 2.0.54, mod_perl 2.0.1.

Once upon a time for testing purposes I dumped out the constants, which 
can be seen in modules/jerf/tests/Apache/Constants.pm, at which point in 
time M_GET was 0. Now I don't know where the constant is.

---

From: Guy Albertelli II <[email-masked]>
Date: Sun, 9 Apr 2006 01:06:44 -0400 (EDT)

Hi Gerd,

> The first thing that crashes is loncommon.pm, the constant M_GET is  

Crap. I forgot to commit ath fix.

Just comment that line out for now. 

Sorry about that.

> ... now I need to figure out how to install Apache 2.0.

It should've worked under 1.3, grrr.

---

From: Guy Albertelli II <[email-masked]>
Date: Sun, 9 Apr 2006 01:17:37 -0400 (EDT)

Hi Gerd,

> The first thing that crashes is loncommon.pm, the constant M_GET is  not 

BTW do you remember why you added those two lines (the M_GET and 'GET'
ones)?

(Looks like those lines are from lonacc.pm rev 1.8 from 15 Sep 2000)

With The docs I have on those routines it isn't clear to me why you
be setting those values at that point in time.

If I need to keep them I'll have to bust them out into a seperate
lonacccommon.pm or such like. So loncommon.pm can continue to be
used...

---

From: Gerd Kortemeyer <[email-masked]>
Date: Sun, 9 Apr 2006 12:47:56 -0400

Hi Guy,

> BTW do you remember why you added those two lines (the M_GET and 'GET'

Wow, that's a long time ago. Here's what I found:

http://archives.free.net.ph/message/20010116.184720.efd93de2.en.html

- Gerd.

---

From: Gerd Kortemeyer <[email-masked]>
Date: Sun, 9 Apr 2006 13:14:20 -0400

> http://archives.free.net.ph/message/20010116.184720.efd93de2.en.html

http://archives.free.net.ph/message/20010115.182610.a20276b2.en.html

Yep, had to do with redirection somehow and/or making the POST and  
GET values available again, but I do not remember all the details. See

http://modperlbook.org/pdf/appa.pdf

pages 753 and 754, which has those lines in it.

- Gerd.

---

From: Guy Albertelli II <[email-masked]>
Date: Mon, 10 Apr 2006 02:51:34 -0400 (EDT)

Hi Gerd,

> > Wow, that's a long time ago. Here's what I found:

Yea, I realize that.

> pages 753 and 754, which has those lines in it.

Hrrm, those specific lines don't seem to address our case... since we
aren't trying to read the posted info more than once... it gets read
in get_posted_cgi and stuck into $env where we that access it.

And we never use $r->content (or $r->read) any where else (well
lonauth uses it, but that'll get REDIECTed.. away, perhaps it should
be usign get_posted_cgi...)

And the docs on $r->method() and $r->method_number() seem to imply
that it only matters on $r->internal_redirect() cases, not browser
REDIRECT cases. (Which really only makies sense since redirects would
cause a new apache request cycle)

Honestly, it looks like a copy a paste from the book that I can't see a
need for..?

---

From: Gerd Kortemeyer <[email-masked]>
Date: Mon, 10 Apr 2006 08:49:10 -0400

Hi Guy,

> Honestly, it looks like a copy a paste from the book that I can't  

Nope, definitely not. The one thing I do remember is that these lines  
are connected with pain.

Now, the functionality that I originally implemented this for might  
not exist anymore, or I might have been working around an Apache bug  
that is gone by now - this was, after all, more than five years ago.

I don't necessarily claim that all three lines are indeed needed. But  
something did not work right, and after banging my head for quite a  
while, I glued in those lines, and it worked.

I am going to try out a few more scenarios.

- Gerd.