Gossamer Forum
Home : Products : DBMan : Customization :

UNAUTHORIZED ACTION!!!

Quote Reply
UNAUTHORIZED ACTION!!!
i got this error message when used the following code for a search box outside dbman

<CENTER>Search by keyword<P>
<FORM ACTION="/cgi-bin/dbman/db.cgi" method="GET">
<INPUT TYPE="hidden" name="db" value="default">
<INPUT TYPE="hidden" name="uid" value="default">
<INPUT TYPE="text" name="keywords" size="30">
<INPUT TYPE="submit" name="view_records" value="Search">
</form></CENTER>

any clue to what the problem could be
i checked my perm on cfg file
$auth_allow_default = 1;

cheers
macagy


Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
As mentioned before in a variety of Threads in the DBMAN forums, you need to add:

Code:

<input type="hidden" name="view_records" value="1">


to your search codes.

Regards,

Eliot Lee

Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
thanks but still not working; any relation with the mod i'm using
i'm on short/long mod!
cheers
macagy

Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
Nope...that mod should not affect an external search form. If you search for external search form, you may find other Threads that will help you...

Regards,

Eliot Lee

Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
thanks for your quick reply; i did look up the rest of threads re:external search form i even tried the one you gave on march, here it is;

<form action="db.cgi" method="GET"><input type=hidden name="db" value="default"><input type=hidden name="uid" value="default">Description:<input TYPE="TEXT" NAME="Description" SIZE=38 MAXLENGTH=255><input TYPE="SUBMIT" NAME="view_records" VALUE="View Records"></FORM>

this time i get "the page can't be displayed!!to me it looks like a perm issue but i don't see why-- i'll check again the perm and play with it a little bit.

cheers
macagy



Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
The problem is most likely with the action attribute of the form codes...

Try using the following:

Code:

<form action="http://www.yourdomain.com/cgi-bin/dbman/db.cgi" method="GET">


Also...I have seen in some servers that they do not allow GET method...try using POST and see if that works as well.

Also, the only way that the SHORT/LONG Mod could impact your search results is if you are using Netscape and you neglected to include closing table tags in your sub html_view_success routine in the html.pl file.

Regards,

Eliot Lee

Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
now i get again "unauthorized action"
i have a strong feeling this error! has to do with the perms;i set them for
1-any user can view.
2-registered users can view/add
3-admin all

here what i got on my cfg;

$auth_no_authentication = 0;
$auth_logging = 1;
$auth_allow_default = 1;
@auth_default_permissions = 0;
$auth_signup = 1;
@auth_signup_permissions = (1,1,0,0,0);
$auth_modify_own = 0;
$auth_view_own = 0;
$auth_user_field = 8;userid position

does all of these make sense?

cheers
macagy






Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
@auth_default_permissions should at least be (0,1,0,0,0)to allow viewing.

Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
thanks for being there!
i knew it was a perm issue;but yours gave also an "unauthorized action" however with this time the "ADD" option with HOME and LOGOFF;but it was a good sign; i changed the perm to (1,0,0,0,0) and the search page came out with this;Search Failed


There were problems with the search. Reason: no search terms specified
Please fix any errors and submit the record again.

of course once there i can still make a new search! i have a vague idea the code i'm using isn't the proper one;
<CENTER>Search by keyword
<FORM ACTION="http://www.yourdomain.com/cgi-bin/dbman/db.cgi"
METHOD="POST">
<P> <INPUT TYPE="hidden" NAME="db" VALUE="default">
<INPUT TYPE="hidden" NAME="uid" VALUE="default">
<INPUT TYPE="text" NAME="keywords" SIZE="30">
<INPUT TYPE="submit" NAME="view_records" VALUE="Search">
<INPUT TYPE="hidden" NAME="view_records" VALUE="1"> </P></FORM></CENTER>

cheers
macagy




Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
Hi macagy, I'm not real sure but it appears you are passing along the name="keywords" but not any values.
<INPUT TYPE="text" name="keywords" size="30" value="">


Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
hi karen,
nope! whatever i put between the"" gets typed on the page
i got the same message.

on an another note i don't know if i can add the Autogenerate enhancements eloiC did, when i already have a short/long mod.it's got a better presentation re;dividing the add record page;any opinion on that?

i know there is a thread for adding blank fields just in case i need those fields later; i lost the thread; i beleive jp did mention that

cheers
macagy


Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
since this is a needed option for lots of sites i'll post again the results i come up with when i use the combination of 2 of the virtual dbman members suggestions
<CENTER>Search by keyword
<FORM ACTION="http://www.yourdomain.com/cgi-bin/dbman/db.cgi" METHOD="GET">

<P> <INPUT TYPE="hidden" NAME="db" VALUE="default">
<INPUT TYPE="hidden" NAME="uid" VALUE="default">
<INPUT TYPE="text" NAME="keywords" SIZE="30" Value="1"> NOTE:number 1 or anything for that matter shows up on the box
<INPUT TYPE="submit" NAME="View_Records" VALUE="Search">
<INPUT TYPE="hidden" NAME="View_Records" VALUE="1"> </P></FORM></CENTER>

macagy Smile



Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
In a post Nov-99 05:54 PM (found using Search features of the forum - searched DBMan Customization, Posts in Last Year, return 300 entries, search term "search box")Eliot has provided the following code:

<form method="GET" action="http://www.YOURDOMAIN.com/cgi-bin/dbman/">
<input type="hidden" name="db" value="default">
<input type="hidden" name="uid="default">
<INPUT TYPE="TEXT" NAME="keyword" SIZE=15 MAXLENGTH=255>
<INPUT TYPE="SUBMIT" NAME="view_records" VALUE="Search">
</form>

Try changing the url to your actual url to the dbman directory. Please let us know whether this works for you.



Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
sorry but it's not working at all,and i don't come close to what i got so far; i used jp code;i still get "no matching record"
as you can see this is close.here is the code:

<FORM>
<P><INPUT TYPE="TEXT" NAME="Text1"><A
HREF="http://www.yourdomain.com.com/cgi-bin/dbman/db.cgi?db=default&uid=default&view_records=1&Description=1">Search</A>
</P></FORM>

* "description" one of my "fieldname"

i typed a word from my fieldname but i receive "no matching record"

a)the path is recognized
b)db is accessed
c)search is performed!!!!
d) "UNKNOWN" missing peace to clear the puzzle

Smile

macagy


Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
You need to supply a parameter value for Description and NOT 1...this is a flag value for yes/no relations of parameters.

You need to replace 1 with a keyword that is in one of your records in the Description field.

Regards,

Eliot Lee

Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
macagy, I'm not sure what to tell you because I cannot see what you actually tried. In the snippet of code I provided a few posts earlier, did you define the complete path to db.cgi?
<form method="GET" action="http://www.YOURDOMAIN.com/cgi-bin/dbman/db.cgi">

Or, did you paste the snippet just the way it was listed?
This is precisely the call I use on static pages and it works with no problem and I have scoured the faq's and everything else trying to identify something which could prevent this from working for you.
<form method="GET" action="http://www.MYDOMAIN.com/cgi-bin/dbman/db.cgi">

The only thing I can spot which could even be a source of problems is if your server will not allow GET commands, you may need to change the call to POST.

In the example you have posted last in this forum, you do not have a valid call to the script anywhere that I can see.


Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
hi karen,eliot

Nothing doing, none of your suggestions is fruitful!
1} eliot the value wether changed to "alpha" or form_lenght or Maxlenght return the same result "no matching record"

2} karen your solution with the real domainname is generating "page cannot be found"wether on "get" or "post"

i know it's kind of unreal but that's all i get; again the closest to a viable search box is eliot's idea but somehow i fail to put a "value" acceptable for extracting the record!!!!

Smile

macagy

Quote Reply
Re: UNAUTHORIZED ACTION!!! In reply to
Hi Eliot,

you gave the code for search box on may 24 and this one works perfectly; here it is again if anyone missed the may thread:

<form action="http://www.yourdomain.com/cgi-bin/dbman/db.cgi" method="get">
<input type="hidden" name="db" value="default">
<input type="hidden" name="uid" value="default">
<input type="hidden" name="sb" value="1">
<input type="hidden" name="so" value="descend">
<input type="hidden" name="view_records" value="1">
<input type="text" name="keyword" size="20">
<input type="submit" name="view_records"value="Search"></form>

thank you for taking time to reply and your help is very much appreciated

cheers Smile
macagy