Gossamer Forum
Home : Products : DBMan : Customization :

Combine more mods

(Page 1 of 2)
> >
Quote Reply
Combine more mods
It is possible to combine the following mods into only a database?

Preview Record
F O R W A R D R E C O R D
F I L E U P L O A D (only one file per record).

Can DBman Run?

Regards.

http://www.guitaronline.it
Quote Reply
Re: [ciccione] Combine more mods In reply to
Yes, you can use almost any of the available mods together within your database.

As far as the preview mod and the upload mod there may be a few extra steps to take to get them to work together. Check the FAQ noted below under the topic "Images" and you will find any thread relating the necessary fixes.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Combine more mods In reply to
I made also the mods of image35.txt but I recive the same server error.
The database run fine only whith Preview Record and Forward Record mods.
Please help me.
I uploaded the modified file.
You can find my errors.
Regards
Quote Reply
Re: [ciccione] Combine more mods In reply to
It would help to know what error message you are receiving. At what point did things stop working?

I was unable to retrieve you html.pl file as it tells me there is an error .. and can't download the whole file ?? Perhaps it was not uploaded in ASCII mod .. states some binary code errors.

I noticed in your .cfg file you have:

'Inventario Nr.' => [17, 'alpha', 20, 255, 0, '', ''],
'Filename' => [18,'alpha',0,255,1,'','']
'Schedatore' => [19, 'alpha', 20, 255, 0, '', '']

You are missing an ending comma after the Filename field .. it should be:

'Filename' => [18,'alpha',0,255,1,'',''],

It helps to put the line:

$db_debug = 1;

up above the section # File and URL's so that the debugger can catch errors within the .cfg file also :)

Perhaps that missing comma is causing your problems, if not could you be more exact as far as when you started having problems and what exactly is happening.

If all worked fine before adding the upload mod, please be sure that you modified your html.pl file to include the extra fields, and also added the extra field or pipe delimiter to your existing database.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Combine more mods In reply to
I modified the errors you indicated me but the script and the debug not runs.

The server tell me only:

DBMan encountered an internal error. Please enable debugging to view.

You can see working my database with the mods Preview Record and Forward Record at the following link:

http://www.guitaronline.it/cgi-bin/consrc/ibmi.cgi?db=man

So I think it is necessary you make a complete examination of the script.

I enclosed a .zip file in attachment to eliminate the binary code errors.

Regards and many thanks in advance.

Filippo Eduardo Araniti

http://www.guitaronline.it
Post deleted by ciccione In reply to
Quote Reply
Re: [ciccione] Combine more mods In reply to
I downloaded your files and will test it out on my local server and see if I can find out what is wrong.

I have something else I need to finish working on before getting to this but will get back to you as soon as possible.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Combine more mods In reply to
I still can't get a complete copy of your html.pl file. What editor are you using to edit this file? For some reason it is putting in some binery codes which is preventing the file from fulling opening and apparently being saved correctly.

The last lines that are visible is:

sub html_home {
# --------------------------------------------------------
# The database manager home page.

&html_print_headers;
print qq|
<html>
<head>
<title>$html_title: Menu Principale.</title>
<style>
BODY{background-color:#648c96} A{color:Black; text-decoration:none} A:hover{color:blue} A:visited:{color:#808080}
</style>

This is where the file ends. I think perhaps if you find out what is causing the file to not load correctly then perhaps that will also fix whatever problems you may be having.

Perhaps it's the style sheet coding that is causing problems?

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Combine more mods In reply to
It is strange !

My editor is BBEdit (I am mac user).
I enclosed a new html file that I made by an other editor.
To install it remember to change the extension.
Regards.
Quote Reply
Re: [ciccione] Combine more mods In reply to
Sorry for the delay in getting back to you.

Problems I found:

In your sub html_record you have the codes to display your graphics before the table defined for the page.

The first error it stated was due to having a closing print statement before an open one. Move this code to within your table and insert you table cells codes for example:

# to close off a previous print qq| statement
print qq| <TR><TD colspan=2>|;
opendir (GRAPHIC, "$SAVE_DIRECTORY") or &cgierr("unable to open directory in delete records: $SAVE_DIRECTORY. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
$file_test = $rec{$db_key} . ".";
foreach $file (@files) {
if ($file =~ /^$file_test/) {
print qq|<img src= "$SAVE_DIRECTORY_URL/$file">|;
$graphic_found=1;
}
}

print qq| </TD></TR>|;

before:

print qq| </TABLE></center>


Also the script had a stray extra curly bracket which was causing problems. Remove the bracket in the last line of your html.pl file after:

1;
} -- remove this one

I've attached a copy of the html.pl file with the corrections I made. I also condensed some of the coding in the html_record_form.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Combine more mods In reply to
I test the script with the new corrections but not runs.

I think I inserted many errors.

In my html.pl file there is not the bracket } simbol at the end of the lines.

The insertion of the following code:

# to close off a previous print qq| statement
print qq| <TR><TD colspan=2>|;
opendir (GRAPHIC, "$SAVE_DIRECTORY") or &cgierr("unable to open directory in delete records: $SAVE_DIRECTORY. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
$file_test = $rec{$db_key} . ".";
foreach $file (@files) {
if ($file =~ /^$file_test/) {
print qq|<img src= "$SAVE_DIRECTORY_URL/$file">|;
$graphic_found=1;
}
}

print qq| </TD></TR>|;

I think it must be placed after the "Schedarore" field as it is User ID field.

I made other corrections but it not runs.

What I must do ?
Quote Reply
Re: [ciccione] Combine more mods In reply to
I would advise going through the instructions for each modification you added to the script and rechecking to be sure everything is correct in those subs.

If all esle fails, what I sometimes have had to do is to start over again with the original files, and as you add the modifications test each one completely before adding another. It's hard to tell where to even look when I'm not sure exactly what mods you have made.

In your .cfg file move the $db_debug = 1; line up above the line the section:

# File and URL's


Remember not to add any extras like smiley faces within the notes you make to yourself within the script. I was trying to track unmatched brackets in your html.pl file and found a :) which caused an error I had to track down :))

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Combine more mods In reply to
Okay, I think I figured out why it wouldn't run .. and after making this change I was able to open up the database on my server.

sub html_print_headers {
# --------------------------------------------------------
# Print out the headers if they haven't already been printed.

if (!$html_headers_printed) {
print "Content-type: text/html\\n\\n";
$html_headers_printed = 1;
}
}

SHOULD BE:

sub html_print_headers {
# --------------------------------------------------------
# Print out the headers if they haven't already been printed.

if (!$html_headers_printed) {
print "Content-type: text/html\n\n";
$html_headers_printed = 1;
}
}


Let me know if that fixed the problem of running the script.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Combine more mods In reply to
My database can not run in your server.
I think it is impossible.
Regards.
Quote Reply
Re: [LoisC] Combine more mods In reply to
SEE THE DEBUG INFO:


DBMan encountered an internal error.
CGI ERROR
==========================================
Error Message : Debug Information
Script Location : biblioteca.cgi
Perl Version : 5.006001
Setup File : default.cfg
User ID : ospite
Session ID : ospite.109153194973438

Form Variables
-------------------------------------------
Record Nr. : *
db : default
uid : ospite.109153194973438
view_records : 1

Environment Variables
-------------------------------------------
DOCUMENT_ROOT : /web/htdocs/www.guitaronline.it/home/
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : */*
HTTP_ACCEPT_LANGUAGE: en
HTTP_CONNECTION : Keep-Alive
HTTP_COOKIE : BLOGCMS=choco; dynfontsize=130%25%3ATimes%20New%20Roman; lang=english; POLL20040608=1; admin=RWR1YXJkbzoyN2hYjIwNDYzNjk3MjBmZjc1ZTo%3D
HTTP_EXTENSION : Security/Remote-Passphrase
HTTP_HOST : www.guitaronline.it
HTTP_REFERER : http://www.guitaronline.it/cgi-bin/conrc/biblioteca.cgi
HTTP_UA_CPU : PPC
HTTP_UA_OS : MacOS
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)
PATH : /usr/local/bin:/usr/bin:/bin
QUERY_STRING : db=default&uid=ospite.109153194973438&view_records=1&Record%20Nr.=*
REMOTE_ADDR : 151.26.7.124
REMOTE_PORT : 49593
REQUEST_METHOD : GET
REQUEST_URI : /cgi-bin/conrc/biblioteca.cgi?db=default&uid=ospite.109153194973438&view_records=1&Record%20Nr.=*
SCRIPT_FILENAME : /web/htdocs/www.guitaronline.it/home/cgi-bin/conrc/biblioteca.cgi
SCRIPT_NAME : /cgi-bin/conrc/biblioteca.cgi
SERVER_ADDR : 62.149.140.11
SERVER_ADMIN : postmaster
SERVER_NAME : www.guitaronline.it
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SOFTWARE : Apache/1.3.29 (Unix) mod_throttle/3.1.2
Quote Reply
Re: [LoisC] Combine more mods In reply to
The image must go in the Filename field.

In the .cgi I tell the field Filename, in the .cfg also Filename.

I think that the name of the field must be Filename also in html.pl.

Regards.
Quote Reply
Re: [ciccione] Combine more mods In reply to
I just went to your site and the database is opening.

To remove the debugging messages, just turn off that function in your .cfg file:

$db_debug = 0;

Is there still something not working?

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Combine more mods In reply to
It not upload the image.
Quote Reply
Re: [ciccione] Combine more mods In reply to
I'll test that function on my copy of your files and see if I can figure out why it's not working.

will get back to you later.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Combine more mods In reply to
I would highly suggest your not trying to use the preview mod with the single image uploadmod. The additions you added to be able to use the image upload and preview mod was for use with the muliple image upload mod .. not the single. So the codes will not work in locating the image between the two version.

Also what I'm seeing is that it's not accepting the addition of a record at all, but rather jumping back to the login screen. Are you having this problem also, or are you able to add a record and just not have the image upload?

I'm afraid I'm loosing my patience trying to figure out what is wrong with the modifications you have made. I'm wondering if you may have deleted a line in the .cgi file by mistake.

Perhaps someone else will help take a look at your files and help you figure out what is wrong.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Combine more mods In reply to
I think that in the code there are many errors.

The name of the field "Browse Picture" must change in "Filename".

Today is not possible insert records with or without image.

"* Filename (Can not be left blank)" is the error report
Quote Reply
Re: [ciccione] Combine more mods In reply to
That error would occur if you are trying to add a record without uploading a graphic. You Filename field is setup to require a file to be uploaded:

'Filename' => [18,'alpha',0,255,1,'',''],

If you don't want to require a photo then use:

'Filename' => [18,'alpha',0,255,0,'',''],

I won't give up on helping you ... I'll spend this evening starting over using your fields in a clean version of the files and see if I can get it working. I am however not going to add the preview mod. People get to see their record once it is entered so you can just add a link for them to go to modify record if they need to make a change.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Combine more mods In reply to
 
Please, can you help me on the "Filename" word I insert in .cgi and .cfg file and the "Browse Picture" field I insert in html.pl.

They must have correlation? And how ?
Quote Reply
Re: [ciccione] Combine more mods In reply to
I got everything working for you. Adding a record and including the upload.

Check your private message where I will upload the latest file changes and the notes to what I changed to get it all working.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Combine more mods In reply to
Congratulaltions.

Great intervent.

But the script not run and the files are full of errors in hundreds.

Why ?

Regards.
> >