Gossamer Forum
Home : Products : DBMan : Installation :

Error loading required libraries

Quote Reply
Error loading required libraries
Hello,

I cannot get db.cgi to work. Below is the default.cfg. It seems to complain that some libraries are missing? I have installed DBMan with the same settings except $db_dir_url. Below is the default.cfg :

CGI ERROR
==========================================
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: (Maybe you didn't strip carriage returns after a network transfer?)

Script Location : /www/folkevalgt/cgi-bin/dbman/db.cgi
Perl Version : 5.00404
Setup File : default.cfg

Form Variables
-------------------------------------------

Environment Variables
-------------------------------------------
DOCUMENT_ROOT : /www/folkevalgt
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_CONNECTION : Keep-Alive
HTTP_HOST : folkevalgt.net
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.01; Windows 95)
PATH : /usr/local/bin:/usr/bin:/bin:.
QUERY_STRING :
REMOTE_ADDR : 209.148.230.100
REMOTE_HOST : spc-isp-van-58-09-353.sprint.ca
REMOTE_PORT : 1397
REQUEST_METHOD : GET
REQUEST_URI : /cgi-folkevalgt/dbman/db.cgi
SCRIPT_FILENAME : /www/folkevalgt/cgi-bin/dbman/db.cgi
SCRIPT_NAME : /cgi-folkevalgt/dbman/db.cgi
SERVER_ADMIN : webmaster@folkevalgt.net
SERVER_NAME : www.folkevalgt.net
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SIGNATURE :
SERVER_SOFTWARE : Apache/1.3.4 (Unix) FrontPage/4.0.4.3 PHP/3.0.14

Quote Reply
Re: Error loading required libraries In reply to
You don't have to worry about the index.html file in the auth directory. It is just there so that if someone where to point their browser at that directory, they would not get a listing of the files there.

The only other thing I can think of that might be causing the problem you're having is your text editor. You need to use a very plain editor (one designed for programmer's is the best to use) and not anything like Write or Wordpad or Word. These programs (Write, Word, etc.) add hidden characters to the file that really mess things up.

For editing the .cfg file, your best bet is to use Notepad, if you have nothing else. When you start to do other work on the files, though, Notepad will not be of much use because the files are bigger than it will handle.

I have links to two very good (Windows) text editors that are designed for programmers on a page at http://www.jpdeni.com/dbman/tutorial1.html . One is free. The other is very inexpensive.

After all that, if your problem is not your text editor, I'm not sure what it could be.


------------------
JPD





Quote Reply
Re: Error loading required libraries In reply to
You must upload all files in ASCII mode. You will probably have to delete the files on your server and upload them again, this time making sure that every file is uploaded in ASCII mode. And then set your permissions again.


------------------
JPD





Quote Reply
Re: Error loading required libraries In reply to
Hello JPDeni,

Thanks for the quick reply : ) I tried it again; making sure it is uploaded in ASCII mode but the same thing. I am wondering, does the error caused by a missing Local.pm on the server?

Thanks
Sung
Quote Reply
Re: Error loading required libraries In reply to
I don't think so. I do think you need Local.pm on your server to run DBMan, though.

The message you got the first time:

Reason: (Maybe you didn't strip carriage returns after a network transfer?)

has always meant that at least one file was not uploaded in ASCII mode. Maybe there is an occasion when this message will come up for another reason, but I've never seen it.

Are you still getting the same "Reason:" message?


------------------
JPD





Quote Reply
Re: Error loading required libraries In reply to
Hello JPDeni,

Yes, I actually forced CuteFTP to upload using ASCII. This is the URL :
http://folkevalgt.net/cgi-folkevalgt/dbman/db.cgi

BTW, what should the permission for the file inside the directory Auth?

Thanks
Sung
Quote Reply
Re: Error loading required libraries In reply to
Hello JPDeni,

Thanks again, but to no avail. I used Notepad, Editplus etc...I also forced CuteFTP to upload in ASCII .... nada.
I got a few messages from the server though:


Redirecting STDERR to STDOUT

Environment Variables:
QUERY_STRING: ''
SCRIPT_NAME: '/cgi-bin/cgiwrapd'
PATH_INFO: '/folkevalgt/dbman/db.cgi'
PATH_TRANSLATED: '/www/folkevalgt/folkevalgt/dbman/db.cgi'
REMOTE_USER: '<NULL>'
REMOTE_HOST: 'spc-isp-van-58-10-746.sprint.ca'
REMOTE_ADDR: '209.148.226.239'


Trying to extract user from PATH_INFO.
Retrieved User Name 'folkevalgt'
User Data Retrieved:
UserID: 'folkevalgt'
UID: '810'
GID: '1431'
Home Dir: '/home/folkevalgt'

Script Base Directory '/home/folkevalgt/www/cgi-bin'
Trying to extract script from PATH_INFO
Script Name 'dbman/db.cgi'
Script Path '/home/folkevalgt/www/cgi-bin/dbman/db.cgi'

Fixing Environment Variables.

Environment Variables:
QUERY_STRING: ''
SCRIPT_NAME: '/cgi-bin/cgiwrapd/folkevalgt/dbman/db.cgi'
PATH_INFO: ''
PATH_TRANSLATED: '/www/folkevalgt'
REMOTE_USER: '<NULL>'
REMOTE_HOST: 'spc-isp-van-58-10-746.sprint.ca'
REMOTE_ADDR: '209.148.226.239'

Logging Request (syslog)

UIDs/GIDs Changed To:
RUID: '810'
EUID: '810'
RGID: '1431'
EGID: '1431'

Changing Current Directory to '/home/folkevalgt/www/cgi-bin/dbman'



Output of script follows:
=====================================================
Illegal character \015 (carriage return) at /www/folkevalgt/cgi-bin/default.cfg line 33.
Content-type: text/html

<PRE>

CGI ERROR
==========================================
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: (Maybe you didn't strip carriage returns after a network transfer?)

Script Location : /home/folkevalgt/www/cgi-bin/dbman/db.cgi
Perl Version : 5.00404
Setup File : default.cfg

Form Variables
-------------------------------------------

Environment Variables
-------------------------------------------
DOCUMENT_ROOT : /www/folkevalgt
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_CONNECTION : Keep-Alive
HTTP_HOST : folkevalgt.net
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.01; Windows 95)
PATH : /usr/local/bin:/usr/bin:/bin:.
PATH_INFO :
PATH_TRANSLATED : /www/folkevalgt
QUERY_STRING :
REMOTE_ADDR : 209.148.226.239
REMOTE_HOST : spc-isp-van-58-10-746.sprint.ca
REMOTE_PORT : 1446
REQUEST_METHOD : GET
REQUEST_URI : /cgi-bin/cgiwrapd/folkevalgt/dbman/db.cgi
SCRIPT_FILENAME : /www/cgi-bin/cgiwrapd
SCRIPT_NAME : /cgi-bin/cgiwrapd/folkevalgt/dbman/db.cgi
SERVER_ADMIN : webmaster@folkevalgt.net
SERVER_NAME : www.folkevalgt.net
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SIGNATURE :
SERVER_SOFTWARE : Apache/1.3.4 (Unix) FrontPage/4.0.4.3 PHP/3.0.14

</PRE>

It seems to always complain finding a carriage return on line 33. I removed that line, same thing.

Also, db.cgi can be reached by both
/home/folkevalgt/www/cgi-bin/dbman/db.cgi &
/www/folkevalgt/cgi-bin/dbman/db.cgi
and www is a symbolic link to /www/folkevalgt/
I wonder if that confuses DBMAn?

Thanks
Sung

Quote Reply
Re: Error loading required libraries In reply to
I have seen this before. (Good job in printing out the info from the log file. I think we may be onto something here.)

The problem could very well be earlier in the file. Temporarily, take out everything before the line

# File and URL's

(I know Alex said not to delete the copyright info, but we gotta find out where the problem is. Smile )

Give that a try and see what happens.


------------------
JPD





Quote Reply
Re: Error loading required libraries In reply to
Hello JPDeni,

Thanks for lookng into it. I am almost bald now : )
I did that and got the same thing. You mentioned that you have seen this problem before, how was the problem solved?

default.cfg:
$db_dir_url = "http://www.folkevalgt.net/cgi-bin";

# URL of dbman.

$db_script_url = $db_dir_url . "/db.cgi";

# Full Path and File name of the database file.

$db_file_name = $db_script_path . "/default.db";

# Full path and file name of the counter file.

$db_id_file_name = $db_script_path . "/default.count";

# Full path and file name of the authorization directory.

$auth_dir = $db_script_path . "/auth";

# Full path and file name of the password file.

$auth_pw_file = $db_script_path . "/default.pass";

# Full path and file name of the log file.

$auth_log_file = $db_script_path . "/default.log";

# Full path and file name of the html routines.

require $db_script_path . "/html.pl";

The following is the output:

Redirecting STDERR to STDOUT

Environment Variables:
QUERY_STRING: ''
SCRIPT_NAME: '/cgi-bin/cgiwrapd'
PATH_INFO: '/folkevalgt/db.cgi'
PATH_TRANSLATED: '/www/folkevalgt/folkevalgt/db.cgi'
REMOTE_USER: '<NULL>'
REMOTE_HOST: 'spc-isp-van-58-10-746.sprint.ca'
REMOTE_ADDR: '209.148.226.239'


Trying to extract user from PATH_INFO.
Retrieved User Name 'folkevalgt'
User Data Retrieved:
UserID: 'folkevalgt'
UID: '810'
GID: '1431'
Home Dir: '/home/folkevalgt'

Script Base Directory '/home/folkevalgt/www/cgi-bin'
Trying to extract script from PATH_INFO
Script Name 'db.cgi'
Script Path '/home/folkevalgt/www/cgi-bin/db.cgi'

Fixing Environment Variables.

Environment Variables:
QUERY_STRING: ''
SCRIPT_NAME: '/cgi-bin/cgiwrapd/folkevalgt/db.cgi'
PATH_INFO: ''
PATH_TRANSLATED: '/www/folkevalgt'
REMOTE_USER: '<NULL>'
REMOTE_HOST: 'spc-isp-van-58-10-746.sprint.ca'
REMOTE_ADDR: '209.148.226.239'

Logging Request (syslog)

UIDs/GIDs Changed To:
RUID: '810'
EUID: '810'
RGID: '1431'
EGID: '1431'

Changing Current Directory to '/home/folkevalgt/www/cgi-bin'



Output of script follows:
=====================================================
Illegal character \015 (carriage return) at /www/folkevalgt/cgi-bin/default.cfg line 1.
Content-type: text/html

<PRE>

CGI ERROR
==========================================
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: (Maybe you didn't strip carriage returns after a network transfer?)

Script Location : /home/folkevalgt/www/cgi-bin/db.cgi
Perl Version : 5.00404
Setup File : default.cfg

Form Variables
-------------------------------------------

Environment Variables
-------------------------------------------
DOCUMENT_ROOT : /www/folkevalgt
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_CONNECTION : Keep-Alive
HTTP_HOST : folkevalgt.net
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.01; Windows 95)
PATH : /usr/local/bin:/usr/bin:/bin:.
PATH_INFO :
PATH_TRANSLATED : /www/folkevalgt
QUERY_STRING :
REMOTE_ADDR : 209.148.226.239
REMOTE_HOST : spc-isp-van-58-10-746.sprint.ca
REMOTE_PORT : 1715
REQUEST_METHOD : GET
REQUEST_URI : /cgi-bin/cgiwrapd/folkevalgt/db.cgi
SCRIPT_FILENAME : /www/cgi-bin/cgiwrapd
SCRIPT_NAME : /cgi-bin/cgiwrapd/folkevalgt/db.cgi
SERVER_ADMIN : webmaster@folkevalgt.net
SERVER_NAME : www.folkevalgt.net
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SIGNATURE :
SERVER_SOFTWARE : Apache/1.3.4 (Unix) FrontPage/4.0.4.3 PHP/3.0.14

</PRE>

Thanks
Sung

Quote Reply
Re: Error loading required libraries In reply to
The only thing I could find by searching the forum had another problem that was sorta similar, but not the same thing.

The only thing I can suggest is that you get a new copy of the .cfg file, change the $db_dir_url and upload it again. You also might want to delete the old file.

I'm really stumped on this.


------------------
JPD





Quote Reply
Re: Error loading required libraries In reply to
Hello JPDeni,

Finally the Demo works! I reviewed the error message (the second one) and it says:
Illegal character \015 (carriage return) at /www/folkevalgt/cgi-bin/default.cfg line 1

now the carriage return is at line 1 instead of line33! So I edited the line using Telnet access and viola! But I just don't understand why CuteFTP, BulletProofFTP cannot do the job. But I'll leave it at that Smile

I am going to have a beer now! Thanks for you help : )

Take care
Sung
Quote Reply
Re: Error loading required libraries In reply to
I don't know why it didn't work with your FTP programs, either. But I'm sure glad you got it to working!

Have another beer for me. Smile


------------------
JPD