Gossamer Forum
Home : Products : DBMan : Installation :

POST method values not being passed WAS: Cobalt...

Quote Reply
POST method values not being passed WAS: Cobalt...
Hi,

yesterday I posted a question, because I was unable to log into my DBMAN database after moving the script to a new server. (http://www.gossamer-threads.com/perl/forum/showflat.pl?Cat=&Board=DBInst&Number=156006)

The Server is a Cobalt RaQ4. The scripts are passed through CGIWrapper.


I tracked down the problem to the fact that using the Method POST the values are not being passed correctly.

It appears as if there is a peculiarity of the Cobalt RaQs which prevents the correct transmission of value pairs when the script is called using the POST method.

html.pl (of dbman) uses GET for searching a database entry but it uses POST for adding an entry or doing administrative functions.

Therefore you are unable to change any data, modify a user or log in while authentification is on. Searching works all right if you turn authetification off.

However, having found the problem, I am unable to solve it.

Has anyone any suggestions (apart from replacing every "POST" by a "GET")? After two days on this I am becoming desperate. :-(

Felixi


Quote Reply
Re: POST method values not being passed WAS: Cobalt... In reply to
Im on a RAQ4 and have used DBMAN with no problem at all. I know that doesn't help you much but just wanted to let you know that this sounds strange - cgiwrap shouldn't affect post/get

Mods:http://wiredon.net/gt/download.shtml
Installations:http://wiredon.net/gt/
Quote Reply
Re: POST method values not being passed WAS: Cobalt... In reply to
I have found the solution by really looking closely into the way the dbman-cgis are called and the Perl Environment Variables.

1. I found that when I called "dbman" the request method
is being stated as "GET" whereas the calling html-file explicitly stated "POST". (The request method can be seen using this command: $rm = $query->request_method();)


2.) Some of the scripts on my site use the method POST and work. DBMAN does so as well, but it malfunctions.

When set up according to the README file, the HTML generated by DBMAN looks somewhat like that:

<FORM ACTION="http://yourhost/cgi-bin/dbman/db.cgi" METHOD="POST">

The FORM ACTION parameter is $db_script_url which is being defined in default.cfg as $db_script_url = $db_dir_url ."/db.cgi";

This is being filtered out somehow and the method is being changed to "GET".

You have to call the script this way:

<FORM ACTION="/cgi-bin/dbman/db.cgi" METHOD="POST">

Then the values are being transferred correctly.
In order to do that the definition of $db_script_url has to be changed from

$db_script_url = $db_dir_url ."/db.cgi";

to

$db_script_url = "/cgi-bin/dbman/db.cgi";

[Replace "/cgi-bin/dbman" with the local path to your script relative to the web server root.]


It might be that this was supposed to be a measure to prevent flooding of the webserver by external script calls.

Apart from that I had to apply the following patch, because authentification doesn't work correctly on the RaQs.

http://www.gossamer-threads.com/scripts/resources/Detailed/868.html