Gossamer Forum
Home : Products : DBMan : Discussions :

Odd Error

Quote Reply
Odd Error
Howdy Everybody,

Either I am losing it or I can't read, I was able to get the program to run on one systems, now I am trying on another and keep getting a odd error.

When I try to add a record I get this error:
Undefined subroutine &main::html_record called at ./html.pl line 266.

When I try to search the records I get the same error with the exception of the line number which is changed to line 409

Any help you could provided I would be thankful for.

Dave Parker


Quote Reply
Re: Odd Error In reply to
I did some searching for your error and it seems those who have this problem were sometimes able to solve it by uploading the html.pl file again.

Make sure you upload in ASCII and that the whole file get transfered. I hope this helps, if not, you might want to search for "Undefined subroutine &main:" and see how others may have fixed this. Usually these answers will be found in the Installation forum, but could also be in customization.

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: [LoisC] Odd Error In reply to
In Reply To:
I did some searching for your error and it seems those who have this problem were sometimes able to solve it by uploading the html.pl file again.

Make sure you upload in ASCII and that the whole file get transfered. I hope this helps, if not, you might want to search for "Undefined subroutine &main:" and see how others may have fixed this. Usually these answers will be found in the Installation forum, but could also be in customization.

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/


I am having a similar problem when searching on records. My error is: fatal error: Undefined subroutine &main::html_record called at ./html.pl line 450.


I have checked my permissions, have uploaded in ASCII mode, and made sure that the subroutine exists in db.cgi. HELP!!

Brent
Quote Reply
Re: [bmoeshlin] Odd Error In reply to
Without providing a copy of your html.pl file or stating exactly what is around the lines you are referring to my guess is this is within your sub html_view_success or failure sub.

Are you using the original script setup or are you using user friendly short/long mod?

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Odd Error In reply to
Thanks for your reply! I realized I had deleted the html_form subroutine, accidently. When I was busy cutting and pasting to build my table data, I mistakenly thought that I had pasted the table data from the html_record_form twice and cut out the html_form subroutine!

I have a totally unrelated question, though. I have looked through the posts on sorting and have been unable to find any definitive answer to the problem that I'm trying to solve.

Pre-DBMAN, when I added a record into my flat file, I just inserted the record into the correct location the data file. My php code is set up to read all of the records assuming that they are already in alphabetical order. This is a comic book web site so the key (in my mind at least) is Title, Issue # and Grade. Since DBMAN only allows one field to be the unique key, I added a numeric id at the very end of every record and used that as the new unique key.

When a user adds a record to the database using DBMAN, I would like it to insert the record into the correct location in the flat file or re-sort the data based on the Title, Issue # and Grade. Is there any way to accomplish this using DBMAN?

Otherwise, I think I will have to rewrite the php code throughout my site and sort the data before using it. This may be the best solution. What do you think?

Brent
Quote Reply
Re: [bmoeshlin] Odd Error In reply to
Did you by any chance check out the DBMan FAQ? There are several post regarding sorting.

Are you wanting to sort by multiple fields? If so, there is a mod for that listed in the FAQ.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Odd Error In reply to
In particular, you might want to look at the multiple sort mod, which allows you to sort on three different fields.
kellner