WODA:
The Web Oriented Database |
"Document contains no data"
A fatal error occured. WODA failed to start properly. Things to check:
"Unknown Server Error"
- In the cgi file (e.g. demo.cgi), does the file required in the require line (line 3) actually exist? In the installation procedure of woda.pm prior to and including 3.303, demo.cgi requires woda-uk.pl but it should require wodauk.pm.
- Examine the web server's error log file. On Windows/Xitami this is cgierr.log file; on Apache and Unix this is usually /var/log/errors. If not, ask your ISP or root.
Cannot create and chdir to ...
Web server cannot access whatever is specified in WBB{dataDir}. Say you defined:$WBB{dataDir} = '/users/john/woda/data';
On Windows, make sure /users/john/woda exists. On UNIX, additionally, make sure Web server has read,write,execute access to it. Type
chdir /users/john/woda
mkdir /users/john/woda/data
chmod 777 /users/john/woda/dataFirst line gets you there, second makes a directory, third alows anyone anything.
Action 'cgiHome' is not implemented.
Most likely the file '/usr/local/woda/uk/cgiHome' is missing. If the file seems to be there, the problem could be the capital H in Home. If you took WODA through Windows tools like Explorer, you never know what will happen to the upper/lower case letters.I can get to / I don't see administrator's menu
- Did you sucessfully log in as admin?
You press on the white face on the toolbar, a window opens and you enter 'admin' as username and password as you set it up in the mainConfig subroutine.- If you are admin, you see a red face with a white hat on the tollbar, right? And under the "Personal" heading on the /Home page you will notice "Database administration" item. Well hidden, right?
When I try to delete a record WODA writes "Delete failed".
If this happens to all records:If this happens to some, but not all records:
- Run AdmStatus as admin ... anything unusual about the data dir?
- What permission is httpd granted on the data dir?
- Is the $MV variable set correctly in the mainConfig routine. Try resetting it to '' and let Perl (instead of UNIX command) delete files.
- In which file is the problematic record? In this example we shall suppose it has an id=abcd and is therefore in abcd.rec
- Anything unusual about the flags of the file abcd.rec (do ls -l and compare it with the other *.rec files).
- Does the abcd.rec.bak exist. Anything unusual about that one? Delete it manually and try again.
When I login as admin, nothing changes on the main page.
Login data is transported in cookies. Microsoft Explorer 4.x does not handle cookies correctly on URLs like www.xxx.com/cgi-bin/somescript?name=val. But it works OK with URLs like www.xxx.com/cgi-bin/somescript/Show?name=val. WODA 3.1.4 has been fixed so that bare URLs are never used.Ergo, the cure is to use WODA 3.1.4+ and ...../cgi-bin/yourscrip/Home as the URL for the home page and /cgi-bin/yourscript/Show?_id=200 to show the record with ID=200.
A note on "large" databases
Although WODA does not impose any limits on the database size, some operations might be limited by the limitations of Perl, RAM of the server and HTTPD server.
- In some, mainly administrative, operations WODA places the entire database into Perl's data structures (into RAM).
- Some operations, that take a long long time, may be terminated by the Web server. Some servers kill any CGI process after a minute or so. Some operations, such as CSV import, may take longer. Increse this setting at server!
- Verify that the number of rows of the _cache/*tbl files is the same as the number of .rec files.
I get EVAL Error on ...
You defined a special $WBF{field,picture} or $WBB{formatSOMETHING} etc. and WODA returns an EVAL error, empty value etc. Here's why:Some settings in WODA are string expressions - this is an expression - a small program in Perl language, that should return a string. Let's look into some examples. Note that the setting of the $_ variable is there just to demonstrate things; you would not put something like that in your code:
$_ = 'Joe';
$WBB{name,picture}='name is $_';The above will result in an eval error, because name is $_ is not a valid piece of Perl program.
$_ = 'Joe';
$WBB{name,picture}="name is $_";The above will also result in an eval error, because name is Joe is not a valid piece of Perl code either. Also note that because the setting is in double quotes, the variable substitution happens at the moment when the assignment is made!
$_ = 'Joe';
$WBB{name,picture}='lenghth($_)';The above is correct, length($_) is a valid Perl statement.
$_ = 'Joe';
$WBB{name,picture}="length('$_')";This is correct also, length('Joe') is valid, but it is not what you want!
$WBB{name,picture}=' "name is $_" ';
The above is correct, "name is $_" is a valid Perl expression, returns a string.
$WBB{name,picture} = <<'EOM'; # Perl code until EOM
# hyperling, if URL is set ...
if ($rec{URL}) {
"<A HREF=$rec{URL}>$_</A>";
} else {
# otherwise don't hyperlink it
"$_";
}EOM
The above is typical syntax for more complex code.
WODA:
the database tool for the World Wide Web
|
March 3, 2009
|