Gossamer Forum
Home : Products : DBMan : Customization :

unknown action

(Page 1 of 3)
> >
Quote Reply
unknown action
Hi there Jpdeni,
Finally work up my guts to join the forum and I hope that there will be someone who can help me to solve this issue, it would be wonderful if the guru of the forum, JP will take a look at what I have done and correct the error.
This is how it was done.
1. replaced the original html.pl with user friendly html.pl.
2. install the mass mailer to the files as instructed.
3. install the basic secure password lookup, with the secure friendly uf html mod.
4. and last the secure password lookup change password_uf mod.
5. used jpdeni configurator to generate defination fields, with permission.

The files affected with the changes would be the default.cfg, db cgi and html.pl
The other issue is addded three questions to the signup. the files that I made the changes
was in the html.pl and db.cgi, both at the signup section.

Now the problem, faced was when I tried to get it to change the password through the link or when it is log on to the page, the issue is it prints a statement to say unknown action.
This also happens when the admin user did the same, to change the password, the same comment was printed to say unknown action.
Note that everything seems to work fine, it goes to the create account screen,
The questions and the username and email was requested of the person, and once it has been entered and submitted, the systems did process the password. As an admin/webmaster, logon to
use the mass mailer to welcome the user, this was also successful. The password was used to logon to members home screen where data was added without a problem.
The routine until this part did not produce any hiccups, it is only when the password was called to be change which is not working. What come the problem be? Both the registered user and the admin user was not successful in getting the routine through, message was produced (unknown action.The database program received a command that it did not understand.)
What this be, how did this happen, did not change any other routines.
What Ihave used are as replaced html.pl with uf_html.pl, mass mailer routine, and basic secure password lookup mod, friendly_uf_secure mod to replace the html.pl routines as instructed and finally the change password_uf mod.

I really hope you or anyone,could take the trouble to inform what really went wrong. your help is most welcome and appreciated.
Thanking you people to take the trouble to look into this matter. I would appreciate if it could be brought to my attention how could I post the files affected for reference to enable to see where in the files the error was made. But note that what I did was just replace the routines as instructed and nothing else.I have yet hosted the database yet over any site for anyone, only using it to test the database, dbman at this current time.
yours,
a total greenhorn
sleepness nights
now coming to a couple of weeks.
help



Quote Reply
Re: unknown action In reply to
famefed,
This is gonna sound really stupid, but was the same problem I had with my Change Email Address form. When I tried to change the email, I hit my return button, out of habit -- got the unknown action. When I clicked the Change Email Address (Password in yr case) button, it worked like a champ. Go ahead and try it, can't hurt.
JR

Webmaster
http://www.izmirhigh.com/index.shtml
Quote Reply
Re: unknown action In reply to
Check to make sure you have the following lines in db.cgi, sub main:


elsif ($in{'change_password_form'}) { unless ($db_userid eq "default") { &html_change_password_form; } else { &html_unauth; } }
elsif ($in{'change_password'}) { unless ($db_userid eq "default") { &change_password; } else { &html_unauth; } }


That's the only reason I can think of that you would get the error message.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: unknown action In reply to
Dear jpdeni,
I got it to work by redoing the whole installation again which is to say that I used your uf_html.pl and got the mods and wredid the changes and tested it now it seems to work and I am testing it with a few freinds and have yet got the feedback yet will let you know of the out come.
The other issue is the fileupload mod got evertyting done as instrcuted but the messages which is being printed is,
There were problems with the following fields: The directory doesn't
exist. Make sure that this directory is a complete path name,
not a URL or something similar. It should look similar to
/home/username/public_html/uploads
Please fix any errors and submit the record again.
I have followed the directory to be but it is still not getting the image uploaded. where can I be still making an error.
yours
david fong


Quote Reply
Re: unknown action In reply to
What is your $SAVE_DIRECTORY variable? Please copy it directly from your .cfg file.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: unknown action In reply to
Dear jpdeni,
In receipt of your reply and will try it and will keep you posted. Thanks amillion.
yours
david fong

Quote Reply
Re: unknown action In reply to
hi there,
Thanks for your advise, but what I did was redid the installing again from scratch, using uf_html.pl.
The mod which i added in sequesnce were mass mailer and then the secure password lookup,uf_html secure password lookup, then the change password mod and the uf_change password. this time tested it and it seems to work but will keep you posted when i have my friends get to test it. I am not hosting dbman at the moment but only using the hosted site to test the dbman with all the mods which i would like to have for a members database for my coming members site.
jpdeni was kind enough to reply and what i would like to do is just like what gossamer has hosted, that is likewhat we are doing at this forum. what about yourself. anyway i am welcome to your suggestions as to how to host this database correctly. the following which i would like to have is the shortlong display mod, which i am not sure what it does and finally the fileupload(multi fileupload) for members photos to be uploaded to the site. this i have tried but was unsuccesful. i have send jpdeni the problem regarding the shortlong display which i faced and also the fileupload.
In the fileupload i have redid the sequesnce and is using the fileupload2 mod, and all seems to be working except when
the add form is executed when it is poof! the debug mentions that the directory is not available, which i am not very well verse how this could happen. what i did was to have the director like this:
# Full path to directory for uploaded files -- NOT A URL!!!! No trailing slash please.
$SAVE_DIRECTORY = "/usr/home/public_html/uploads";
# Full URL to directory for uploaded files. No trailing slash please.
$SAVE_DIRECTORY_URL = "http://??_virtualave.net/uploads";
am i right at this, hope you could help.
thanks for your reply, i am most appreciative in someone trying to help especially when one is a greenhorn at this.
yours
david



Quote Reply
Re: unknown action In reply to
Dear jpdeni,
What I did when you mentioned saved it according to my cfg file line , I went to cgi file and change the line at validat sub routine for the upload file mod. multi upload.
it is not working maybe i have the structure of the directory wrong again as i did initially. i have posted one to joe and in it mentioned how i did the line to my directory in my cfg file. when i read about a directory where one can save the files for your checking could you advise as to how do i save it and in which directory of the host iste it should be for you to extract it for you to check it. Here I am lost too, cos I would think this way you could see if my directory structure which i have done in my cfg file is correct. all other area would not be a problem as it is instructions of a routine. Where i think need not be amended, it is just replaced a routine. your help is still appreciated. Thank you.
yours
david fong

Quote Reply
Re: unknown action In reply to
Do you have a directory at /usr/home/public_html/uploads on your system?

When you upload your files through your FTP program, take a look at the paths. You need to know what the paths are.


JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: unknown action In reply to
Dear jpdeni,
Yes i do have it but have been trying it for hours and still get the same massage about the directory. anyway i have save the three files at this directory called
db.cgi.txt, default.cfg.txt and html.pl.txt at this site and i hope you can be able to see where i have gone wrong, my opinion for it not getting through is either the defination one of the fields is not correctly done for the images to be saved in and the other is error in configuring the directory structure which I had lots of trouble initially when trying to get dbman to work. the files are in the following directory:
http://famefed.virtualave.net/dbman/
your help has help alot in me getting to understand all about perl and cgi scripts and I will be hoping that this will finally make me understand the crux of how the directory structure can be lookat and be able to add it the way it sould be in the script by myself.
yours
david fong

Quote Reply
Re: unknown action In reply to
I notice that you have
Code:
# Full path to directory for uploaded files -- NOT A URL!!!! No trailing slash please.
$SAVE_DIRECTORY = "/usr/famefed/public_html/photo";

# Full URL to directory for uploaded files. No trailing slash please.
$SAVE_DIRECTORY_URL = "http://famefed.virtualave.net/uploads";
The directories should be named the same. Well, actually they should both point to the same directory.

I just had a strange thing happen. I tried to list the contents of both of those directories, but I got a "File Not Found" error. Same thing when I tried to go to your home page. Then, a few minutes later, I was able to access your index.html page and get a listing (empty) of the two directories. Very odd.

Are you sure you have set the permissions correctly for the directory? The permissions must be set to 777.

I don't know if this is a good idea or not, but if nothing else works, try commenting out the lines below. (Add a # to the beginning of each line.)

In sub validate_upload,
Code:

if (!(-e $SAVE_DIRECTORY)) {
return "The directory doesn't exist. Make sure that this directory is a complete path name,<BR>
not a URL or something similar. It should look similar to<BR>
/home/username/public_html/uploads";
}
JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: unknown action In reply to
Dear jpdeni,
Thankyou for your fast reply, and will try as informed. I did try again with both the mods, one the file upload 2, and the multi fileupload. the initial was the latter which I have been refering to and the former, just tested it with anohter defination setup, but this this the message come as this,
Error Message : unable to open directory in delete records: /usr/famefed/public_html/uploads. Reason: No such file or directory. very funny that both should give two different messages but i am going to send the three files to the same directory for your seeing to find out what is the proble. I have ensure as instructed by the chmod of 777 to the uploads directory. hope that this will differentiate the two problems of my mods as installed.
This time I have named it with the front as file2 then the files and end with .txt.
your help is most welcome as always.
yours
david fong


Quote Reply
Re: unknown action In reply to
Dear jpdeni,
I did as as per reply, which ws commented the lines, this was the last of the few that i did try. The few that I did was change the Photo to uploads, and the opposite way, which read the same message, directory is wrong and the last was to comment the lines at the cgi file and this too did not get me any goooood result, please find the message from the debug which was printed out, as follows,
CGI ERROR
==========================================
Error Message : unable to open directory in delete records: usr/famefed/public_html/uploads. Reason: No such file or directory
Script Location : db.cgi
Perl Version : 5.00502
Setup File : default.cfg
hope this will give you a better picture of what I am doing wrong with this naming of the directory structure at the cfg file.
yours
david fong



Quote Reply
Re: unknown action In reply to
The reason they give two different messages is that one message is defined within the script and the other one is generated by Perl.

When you took out the lines I said to take out, did the file upload?

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: unknown action In reply to
Dear jpdeni,
The script works fine, but when the command is ask of it to upload the file, image the message is not able to fid the directory as i have pasted in my last message. also I have saved the three files for you to look at at the same directory. could my defination of the naming of fields be wrong as against the directory uploads. the image is not being uploaded to the database which includes the data.
yours
david fong

Quote Reply
Re: unknown action In reply to
I really don't know what to tell you. I don't know why the script is not finding your directory. Maybe it's something with your server. I don't know if anyone else on that server has used the file upload mod.

I know that the script works. You can test it for yourself at http://www.jpdeni.com/cgi-bin/upload2/db.cgi. If you don't want to sign up for an account, you can use username/password author/author. If you add records, I would appreciate it if you would delete them before you go.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: unknown action In reply to
Dear jpdeni,
Thanks for your help and as your link I will test with it, but to inform you that I ftp to another site a sister of this site that i have noted, it is still giving the same message, as chmod directory off 777. but I have done it will my ftp unless the ftp software is not able to do it and have to use my browser and go to their site and use their own file transfer program to chmod the directories. but I have done it with your other mods, the scripts are working beautifully, but only this but it will be solve with my data input to you, I really do. this is the two mods which i would like to incorporate with the securepassword , which is fileupload mod and the shortlong mod, and this two are the hiccups at the moment. maybe what I will try is to use your uf and the one mod to see if it works. Will keep you inform. thanking you as always for your help.
yours
david fong

Quote Reply
Re: unknown action In reply to
Dear jpdeni,
I had all redone with only your uf_html.pl with the multi fileupload mod. this time I am totally dumbfounded, it is that freted 500 page could not be displayed message.
I could appreciate it if you could look over the file which I have named them multi_html,cfg and cgi at the same directory which i have saved the previous files for your attention. This is the most frustrating situation one can be faced with. with other mods it runs but would not get the graphics to the directory with message of chmod to 777. Now it is this. Help,Help!!!! your time is most appreciated. Funny feeling that the problem might be the field and and the $SAVE DRECTORY which have been wrongly done, as I have and was confused on this issue initially.
yours
david fong

Quote Reply
Re: unknown action In reply to
Dear jpdeni,
I have done a new set with just your uf_html.pl and the multi fileupload which showed a 500 message which i did send the three files to the directory for your attention.
But this time I redid it with the file upload2 mod and the message which is appearing is as follows:
Error Message : unable to open directory in delete records: /usr/famefed/public_html/Graphic. Reason: No such file or directory
Script Location : db.cgi
hope you could let me know what to do, help!!!! I am almost bald, and in a couple of more trys, will be totally shinning!
yours
david



Quote Reply
Re: unknown action In reply to
Obviously the scripts are having trouble finding your directories. I don't know what the paths to your directories are, but you obviously have entered them incorrectly.

I don't know what else to tell you.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: unknown action In reply to
Dear jpdeni,
I think it has to be this and I am looking into it, and have yet really make it to where the image is able to be uplaede. Thanks alot for your advise. will get to it.
There is another question which I hope you could direct me.
what if now that i have a list of members in by default.db, what I would like to know is how to direct the member to their profile after they have create their account and when they are log back to add their profile. At this stage is there a way for the script to validate that they have entered by the administrator a couple of their data in the databasse and they are only required to modify if any error to the initial data entered and add in what is not done by the administrator. In short, validate their name and if it is in the database to redirect them to only logon to modify their profile.
Thanking you in anticipation.
yours
david


Quote Reply
Re: unknown action In reply to
Are you wanting to validate new records before they can be seen by other users?

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: unknown action In reply to
Dear jpdeni,
First thing first, Yipee!! I got the file upload2 mod working but the problem is it is not printing the image out, as I have set the default image for it in the directory it is now printing the default image rahter then the image which was loaded to the fdirectory, i have it loaded as a jpg but maybe after reading all the forum faqs on this it might be that i am not have it set a certain size of 200x200, this i hope ou could let me know how to set it in the dbman so that it can be displayed.
As for the question, yes in a way, if i have records then how do i make them only modify their records and if those members do not have a record yet to have them add a record to the database, now taking into consideration of have the following to be the precent set up of dbman.
it will have your uf_html.pl, mass mailer, secure password lookup with change password and file upload2 or multi fileupload3 mod as the setup of dbman. I have look into lois page layout explantion but still not able to get the gist of how to set this as a default layout of dbman with the two column page. so that the image can be shown then.
it would be appreciated if your help, advise in this.
thank you.
yours
david

Quote Reply
Re: unknown action In reply to
Regarding your first question -- I'm glad you were able to get the file upload to work. Your image size would have nothing to do with whether the image is displayed.

Could you post the code you are using to display the image?

In Reply To:
if i have records then how do i make them only modify their records
Set $auth_modify_own = 1; in the .cfg file.

In Reply To:
if those members do not have a record yet to have them add a record to the database
Take a look at http://www.jpdeni.com/...ds/limitrecords.html. You'll probably want

Code:
One record per user
Force new user to add record
In Reply To:
default layout of dbman with the two column page. so that the image can be shown then.
I don't understand. Can you give me an example?

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: unknown action In reply to
Dear jpdeni,
The following are the configuration done, first in the cfg file what I did is, my defination
%db_def = (
'ID' => [ 0, 'numer', -1, 5, 1, '', ''],
'Username' => [ 1, 'alpha', 25, 25, 1, '', ''],
'Date' => [ 2, 'date', 15, 15, 1, &get_date(), ''],
'Email' => [ 3, 'alpha', 25, 25, 1, '', ''],
'Yearof' => [ 4, 'numer', 5, 5, 1, '', '\d{4}'],
'FirstName' => [ 5, 'alpha', 12, 12, 1, '', ''],
'SurName' => [ 6, 'alpha', 12, 12, 1, '', ''],
'Graphic' => [ 7, 'alpha', 0, 3, 0, '', 'Yes']
);
check box
# Checkbox fields. Field name => Checkbox value.
%db_checkbox_fields = (
'Graphic' => 'Yes'
);
and the directory to save image file
# File uploads -- if you want to be able to upload files, set this to 1
$db_upload = 1;

# Full path to directory for uploaded files -- NOT A URL!!!! No trailing slash please.
$SAVE_DIRECTORY = "/home/famefed/public_html/uploads";

# Full URL to directory for uploaded files. No trailing slash please.
$SAVE_DIRECTORY_URL = "http://famefed.virtualave.net/uploads";

# Defines the number of bytes that can be uploaded. Files that exceed
# this limit will not be saved on the server. Set this to zero in order to
# disable size checking.
$MAXIMUM_UPLOAD = 0;

In my html_record,


# List of allowable file extensions. If the file does not have one of the extensions
# listed, it will not be saved to the server. The format for the setting is
# \.[extension]$ If you want to allow more than one extension, separate the options by
# a | character.
$ALLOWED_EXT = '\.gif$|\.jpg$';

In my html record,

sub html_record {
# ---------------------------------------------------------------------------------------
# 31st july,2000. Added new fields and using uf_html and file upload2 mod.
# Added new line after my (%rec) = @_;, for file upload2 mod.
# ---------------------------------------------------------------------------------------
# How a record will be displayed. This is used primarily in
# returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash.
#
my (%rec) = @_;
$rec{$db_key} =~ s/<.?B>//g;
# Load any defaults to put in the VALUE field.
($db_auto_generate and print &build_html_record(%rec) and return);

my $font_color = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399';
my $font = 'Font face="Verdana, Arial, Helvetica" Size=2';


print qq|
<TABLE WIDTH="475" CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#FFFFCC">
|;
if ($per_admin)
{
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Username:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'Username'}</Font></TD></TR>
|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Date:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'Date'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Email:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'Email'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Yearof:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'Yearof'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>FirstName:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'FirstName'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>SurName:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'SurName'}</Font></TD></TR>
|;
if ($rec{'Graphic'})
{
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Graphic:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'Graphic'}</Font></TD></TR>
|;
}
print qq|
|;
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|
|;
unless ($Graphic_found)
{
print qq|
<img src="http://famefed.virtualave.net/Graphic/default_graphic.gif">
|;
}
print qq|
</TABLE>
|;
}

I hope this will be sufficient, to visualize wher and why the image is not appearing but the default iabe is showing.
the question to how did I configure my image, this is where I did not, just followed the instructions as per mod.

the layout which i was enquiring was from this tread which was by lois c
Page Layout Tips
===================

Submitted by: LoisC
Last Updated: June 1, 2000
html_record or html_record_long:


Hope this is a useful resource for you :)
LoisC

this was the read which i ws enquiring, could not apprehend how to set the defination of mine to this, could you explain with just a short display of the two column html where a member's profile coudl be shown with the data and an image, no image a default image will be shown.

i hope this will give you an idea but if you need me to send you my cfg,cgi and html, I would do the same to the directory as before. your support in this issue is greatly appreciated, and it would be in the near future that the site will get on and i have you to thank.
yours
david fong




> >