[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] cgi-wrapper error




Hi again

The counter and FormMail scripts are still not working properly but it might
have something to do with the way they are called, cause when I call them
directly from the shell I get no errors.

When I insert "use CGI::Carp qw(fatalsToBrowser)", it tells me nothing for
the counter and
nothing for FormMail.


Okay, I'm a bit confused because the email I received that you sent a half hour before this one says you found the counter answer (permissions). But I assume that you're still struggling with it? Looks that way.

So WHERE exactly on your server is the page that calls the counter?

It's a shtml file, right?


Another output from the shell:
perl -w FormMail.pl
[Fri Jan  5 19:33:37 2001] FormMail.pl: Use of uninitialized value at
FormMail.pl line 119.
[Fri Jan  5 19:33:37 2001] FormMail.pl: Use of uninitialized value at
FormMail.pl line 123.

Wellll...not very heavy error. Comes up a lot with functional scripts. It just means that a value is called BEFORE it's actually defined in the script (but that doesn't matter because PERL loops and gets the expression again and so it's just a split second delay).

Anyway, let's see what else we have here.

The same for the counter:
perl -w FormMail.pl
[Fri Jan  5 19:34:26 2001] counter.pl: Argument "" isn't numeric in ne at
counter.pl line 62.

Well, not exactly the same thing because this line could be useful. What counter program are you using marc -- I want to take a look at it. Let me know the name and url of it because I'm probably familiar with it already but want to look it over before

[Fri Jan  5 19:34:26 2001] counter.pl: Use of uninitialized value at
counter.pl line 62.
[Fri Jan  5 19:34:26 2001] counter.pl: Use of uninitialized value at
counter.pl line 72.

No problem.


Permissions:

FormMail.pl : -rwx --- ---


This is Matt Wright's script, right? I use to use this one a while back.

First off, permissions SHOULD be -rwx r-x r-x (anonymous users MUST be able to read and execute the script -- it's written that way)

AND, unless this is in the cgi-bin sub-directory, you should probably change the script name to formmail.cgi. PL suffixes don't work that well outside of a cgi-bin.

Make sure you call this script with FULL url (in your form's "action" section use the entire url to the script) and that opens your script to tremendous abuse BUT that's why the "referers" section is there: to block abusive people. Make your entry there your domain ONLY (no www or anything).


counter.pl     : -rwx r-x r-x

That's good.

data dir        : drwx rwx rwx
data file       : -rw- --- r--


Hmmm...you may have a permissions problem with that data file, Marc. I always open up my data files completely unless there's a real security problem. First, try it at 777 (rwx-rwx-rwx) and see what happens and then you can start cutting permissions back. At this point, if there is a nobody routine from the script or if your serving is treating the script as httpd or something you'll get an access error. Still, I don't know why this would produce the error you're getting but...try it.

Let me know what happens when you try these things.

Alfredo
--
People-Link/Institute for Mass Communications
www.people-link.org
Communications for a Better World...and for the People Who are Building One!
Members, Local 1180, Communications Workers of America, AFL-CIO