RE: Cryptic errors -simple Apache::Registry script ??? (newbie)

2000-01-10 Thread Eric Cholet

> 
> Syntax error on line 941 of /usr/local/apache/conf/httpd.conf:
>  cannot occur within  section
> ../src/support/apachectl start: httpd could not be started
> 
> Here is the (only) difference between the failing config and the one
> currently on the live server.  This is in a  section:
> 
> 940,943c940,945
> <   
> < SetHandler  perl-script
> < PerlHandler Apache::Footer
> <   
> ---
> >   
> > 
> >   SetHandler  perl-script
> >   PerlHandler Apache::Footer
> > 
> >   
> 
> What seems to have confused me was that to repair the config I removed
> the  directive.  Sorry if this confused anyone else.

You can't have a FilesMatch section inside a Location section, it's
a contradiction. See http://www.apache.org/docs/mod/directive-dict.html#Context

--
Eric



RE: Cryptic errors -simple Apache::Registry script ??? (newbie)

2000-01-10 Thread G.W. Haywood

Hi there

On Mon, 10 Jan 2000, Eric Cholet wrote:

> > Apache 1.3.9 (with mod_perl 1.21/perl5.005_03) doesn't let me use a
> >  section in a  section.
> 
> Really? That's quite odd. What is the error message?

Looks like I was wrong about this.  Either my memory was playing
tricks on me, or it's different on my development server.  The former
is at least three orders of magnitude more likely than the latter.

I didn't want to try to restart my live server with a deliberately
broken config, so I duplicated it on my development server and got
this message output to stderr:

Syntax error on line 941 of /usr/local/apache/conf/httpd.conf:
 cannot occur within  section
../src/support/apachectl start: httpd could not be started

Here is the (only) difference between the failing config and the one
currently on the live server.  This is in a  section:

940,943c940,945
<   
< SetHandler  perl-script
< PerlHandler Apache::Footer
<   
---
>   
> 
>   SetHandler  perl-script
>   PerlHandler Apache::Footer
> 
>   

What seems to have confused me was that to repair the config I removed
the  directive.  Sorry if this confused anyone else.

73
Ged.



RE: Cryptic errors -simple Apache::Registry script ??? (newbie)

2000-01-10 Thread Eric Cholet

> 
> Hi there,
> 
> On Sun, 9 Jan 2000, John Walker wrote:
> 
> > This is in a virtual host section, could that be a problem?
> 
> Apache 1.3.9 (with mod_perl 1.21/perl5.005_03) doesn't let me use a
>  section in a  section.

Really? That's quite odd. What is the error message?

--
Eric



Re: Cryptic errors -simple Apache::Registry script ??? (newbie)

2000-01-10 Thread G.W. Haywood

Hi there,

On Sun, 9 Jan 2000, John Walker wrote:

> This is in a virtual host section, could that be a problem?

Apache 1.3.9 (with mod_perl 1.21/perl5.005_03) doesn't let me use a
 section in a  section.

73
Ged.



Cryptic errors -simple Apache::Registry script ??? (newbie)

2000-01-09 Thread John Walker

I've got a script (hello.pl from the Eagle book).
It runs succesfully once and generates 500 errors. 

So I dig around and find this in the errors:

[Sun Jan  9 15:26:38 2000] [error] Can't upgrade that kind of scalar at
/usr/lib/perl5/site_perl/5.005/i386-linux/Apache/Registry.pm line 32.

HMM. Well, I am not skilled enough to want to hack Registry.pm nor am I
familiar with the concept of upgrading a scalar. I have read Stas' guide
and he talks about "use diagnostics;" Now when things go bad, I get a
longer explanation:

[Sun Jan  9 15:40:07 2000] [error] Uncaught exception from user code:
Can't upgrade that kind of scalar at
/usr/lib/perl5/site_perl/5.005/i386-linux/Apache/Registry.pm line 32.
Apache::Registry::handler('Apache=SCALAR(0x81a782c)') called at
/dev/null line 0
eval {...} called at /dev/null line 0

HMM. dev null? line zero? Am I loosing my mind?

I would appreciate it if someone could help me in the right direction.
I'm running RedHat/Apache HTTPSD with mod_perl, does anyone know if
thats a problem?

[root@melanie /root]# telnet melanie.jsw4.net 80
Trying 216.207.143.5...
Connected to melanie.jsw4.net.
Escape character is '^]'.
GET /index.html HTTP/1.1
Host: roc.jsw4.net

HTTP/1.1 200 OK
Date: Sun, 09 Jan 2000 20:57:18 GMT
Server: Red Hat Secure/3.0 (Unix) mod_perl/1.19
Last-Modified: Sun, 05 Dec 1999 16:28:37 GMT
ETag: "1803-797-384a92b5"
Accept-Ranges: bytes
Content-Length: 1943
Content-Type: text/html

 ...

The snips from httpsd.conf (This is in a virtual host section, could
that be a problem?)


  Alias /perl/ /home/roc/perl/
  PerlTaintCheck On
  
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI
  


And finally the script: hello.pl (As I mentioned, this is copied fairly
faithfully from the eagle book.)

#!/usr/bin/perl -w
use CGI qw(:standard);
use diagnostics;
use strict;
# use vars qw($name);
my $realname = param('realname') || 'Anonymous';
print   header(),
start_html(-title=>'Hello',-bgcolor=>'blue'),
h1("Hello $realname"),
p(
"To change your name, enter it into the text field below and
press",
em("change name.")
),
start_form(),
"Name:
",textfield(-name=>'realname',-value=>'Anonymous'),
submit(-value=>'Change name'),
end_form(),
hr(),
end_html();

Any help would be appreciated. Thanks,
John