Gossamer Forum
Home : Products : DBMan : Discussions :

Help: Error: Invalid config file name?

Quote Reply
Help: Error: Invalid config file name?
Haven't done anything to my Database for weeks, last time it worked fine. This time when I try to "search the database for deletion" and when I click "Search" it says:

CGI ERROR
==========================================
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: Invalid config file name: default~~default at db.cgi line 52.

Everything else is working fine, I can still search for viewing purpose, and I can "list all" record in "search the database for deletion" form. But as long as I press the search button in search deletion form, it shows the error messege.

I have the db.cgi, default.cfg, html.pl uploaded

Thank you for helping
Quote Reply
Re: [smeempress] Help: Error: Invalid config file name? In reply to
I can't see why in your files, but for some reason the db value is being sent twice. That's why you get the "default~~default" value. Can I look at the database in action? Sometimes that stirs something in the grey matter. :-)


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] Help: Error: Invalid config file name? In reply to
Unfortunately, I can't provide you with the username and password.
My boss would kill me if I do that, sorry.

I remember that have changed the drop down list content in html_advanced_search in html.pl and the drop down list content in defualt.cfg. This drop down list appears in the form when people fillout a request and when we search these records, they are just some option we provide. I added some items and deleted some items. and it now looks like:

'Referrer' => 'All Canada Adventures,Wisconsin Outdoor Journal,Goin Fishing TV,NorthAmerican Fisherman Card Deck,SearchEngine,Another-Site,In-Fisherman,Midwest Outdoors TV,Outdoor News Ad,From the Canadian Fishing Map',

You can find this line in default.cfg

But everything worked fine, people can fillout their form with the new option selected and we are also able to search for records with that new option selected. I don't know how would this affect the deletion function

Last edited by:

smeempress: Nov 24, 2005, 12:12 PM
Quote Reply
Re: [JPDeni] Help: Error: Invalid config file name? In reply to
I just found out that in the delete search form (search record to delete) it also has this drop down list and it has been updated to have those new options I added in default.cfg. Do I have to make some changes to the database itself (default.db) to make them compile?

Last edited by:

smeempress: Nov 24, 2005, 12:21 PM
Quote Reply
Re: [smeempress] Help: Error: Invalid config file name? In reply to
No. You don't have to do anything to the .db file. It's just a plain text file, so there's no compiling going on.

I don't think the drop-down is the problem. I still don't know what is the problem, though. :-)

I understand about the boss. Here's something you can do. Go to the delete search form and see if you can read the source code for the page. Try doing a search for the word default and see what comes up. Either you will get two returns from your search, or you will get something that says default~~default. I hope. :-) Either way, that should help narrow down the problem.

How are you getting to the delete search form? Through the link in the footer?


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] Help: Error: Invalid config file name? In reply to
Quote:
How are you getting to the delete search form? Through the link in the footer?

yes, and I have looked at the source file, there is no default~~default and nothing abnormal. I have attached the source txt file.

Somehow default.cfg file contain the dropdown menu content for the "html_delete_search part in html.pl (which generate the delete search form)" Is it normal?
Quote Reply
Re: [smeempress] Help: Error: Invalid config file name? In reply to
Quote:
Somehow default.cfg file contain the dropdown menu content for the "html_delete_search part in html.pl (which generate the delete search form)" Is it normal?

I don't understand. The only things that would be in the .cfg file would be what was intentionally put there. No code is written to the .cfg file by the script.

I looked at the source code for your delete search form. The only thing I noticed was that the </form> tag was below the footer and other text. It would be better if it was right after the "Submit" and "Reset" buttons for the form. I don't know that it would cause the problem you're having.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] Help: Error: Invalid config file name? In reply to
Thx, man.
I will just wait until it goes back to normal itself, lol
thank you for the help.Smile
Quote Reply
Re: [smeempress] Help: Error: Invalid config file name? In reply to
I think you are correct .. in sub html_delete_form

there is no ending </FORM> tag. And since his footer contains another form, they are conflicting somehow.

Just my 2 cents :)

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [smeempress] Help: Error: Invalid config file name? In reply to
Could this be the problem? Look for the section that says "#print the footer" and under it you have:

-----------------------------------------------
<INPUT TYPE=hidden name="view_records" value=1>
<input type=hidden name="uid" value="default">
Search for: <INPUT TYPE="TEXT" NAME="keyword" SIZE=20 MAXLENGTH=255> in <input type=radio name="db" value="default" checked>Lodging, Outfitters &amp; Air Services <input type="radio" name="db" value="allied">Other Services
<INPUT TYPE="HIDDEN" NAME="mh" VALUE="10" SIZE=3 MAXLENGTH=3>
<INPUT TYPE=HIDDEN NAME="sb" VALUE="ID"><INPUT TYPE="SUBMIT" NAME="view_records" VALUE="Go">

--------------------------------------------

Try troubleshooting this section of code and see what you get.
Quote Reply
Re: [Watts] Help: Error: Invalid config file name? In reply to
I tried all that and added a </form> tag, didn't work.

But here is something new!

In the db.cgi line 52 when I replace

unless ($db_setup =~ /^[A-Za-z0-9]+$/) with:
unless (default.cfg =~ /^[A-Za-z0-9]+$/)

Instead of showing the cgi error, it brings me to the page where it says:


Log On Error
Oops, there was a problem logging into the system: invalid/expired user session.

Please try logging in again, or contact the system administrator.
User ID:
Password:

Last edited by:

smeempress: Nov 30, 2005, 10:04 AM
Quote Reply
Re: [smeempress] Help: Error: Invalid config file name? In reply to
Where did you add the </form> tag? It should be immediately after the "submit"/"reset" buttons.

The script will not work with the change you made. There's something that can work around your problem, but it would be better to actually fix the problem. There may be other things that arise that we'd have to find workarounds for.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [smeempress] Help: Error: Invalid config file name? In reply to
Quote:
And since his footer contains another form, they are conflicting somehow.

I'm with Lois on this one... you have the following structure

<FORM> <HIDDEN TAG db=default>Search for Deletion

<FORM> Advertise with us <RADIO BUTTON db=default>
</FORM>

Footer

</FORM>

I don't think you can "nest" forms like this and I think it is picking up on the db=default 2 times.

In the meantime: Try changing the "search" radio button temporarily to a LINK as see if you get the error. You may have to close one form before beginning another.


You may also want to give your forms names (especially if you plan on using any javascript in the future.)

<FORM NAME="adv" ACTION=.....>
Quote Reply
Re: [Watts] Help: Error: Invalid config file name? In reply to
You guys are Right!
Thanks for the help.
It is the form tag that's missing. :-)