Gossamer Forum
Home : General : Perl Programming :

Internal server error!

Quote Reply
Internal server error!
I followed all the directions, but I get an internal server error when I try to run the db.cgi from the net. what do I do to fix this problem? I am new to cgi/perl programming. all the files that I donwloaded are in my perl directory.
Quote Reply
Re: Internal server error! In reply to
Try this....

Access your account via telnet. Go to your cgi-bin directory where your db files are located.

At the command prompt, type in the following:

Code:
perl -c db.cgi

This will report any syntax errors you may have in your file. If you have syntax errors and are unable to fix them, then post the syntax errors in the DBMAN Installation Forum. You might want to repeat this step for the html.pl file.

Make sure that you temporarily set the $db_debug variable to 1 in your default.cfg file, so that you can see internal syntax or coding errors of the script.

Also, make sure that you change the permission of the db.cgi file to 755.

Have you tried searching the DBMAN Installation Forum for similar Threads that may help you??

Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited August 17, 1999).]
Quote Reply
Re: Internal server error! In reply to
this is what I got when I changed directories and placed everything in the cgi-bin.

Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: Can't locate ./html.pl in @INC (@INC contains: . D:\perl\lib D:\perl\site\lib .) at default.cfg line 51.
Quote Reply
Re: Internal server error! In reply to
I don't know how to use telnet. Is it anything like using ftp? I am on a computer that uses windows98. The server for the site is in California. Like I said, I'm new to cgi and perl programming, if you could tell me how to use telnet I would greatly appreciate it.
P.S.
Thank you for your response to my problem.
Quote Reply
Re: Internal server error! In reply to
I assume that your host is Unix because if it is WindowsNT, then there is no telnet access.

As a beginner and this is your first time hearing about telnet, use the telnet that is included in Windows 98.

Click on Start -> Run -> Type (Telnet) . A program of telnet will be opened. Connect to your domain with your username and password.

If you can connect, it means your host is Unix where else if can't; it's NT. Just follow Eliot's suggestion once connected.
Quote Reply
Re: Internal server error! In reply to
Thank you for your help with telnet. I did just what you suggested. I don't know the domain name. all its listed as in dreamweaver is /www/. This is all very confusing. why can't I just use the db.cgi in my perl directory? I installed a version of perl called activestate, which is supposed to allow you to run perl programs on a windows OS. but I do not understand how to use the IDE. there was no instructions on how to navigate the command line. so I am totaly in the dark right now. Could someone please help me out here, I'm not stupid, just un-informed. Thanks for all your help everybody.
Quote Reply
Re: Internal server error! In reply to
syntax checks out ok Eliot. I ran the command you suggested on the local side. the files are the same on both the local and server. but I still get the internal server error. this sucks. theres no way for me to test a script visually! by executing it in a browser to see how it runs before I put it on my site.
Quote Reply
Re: Internal server error! In reply to
How did you transfer the files to your server? Did you use FTP? If you used FTP, make sure that it was transferred in ASCII mode.

One thing that confuses me...Where do you have your files?? They should be in your cgi-bin directory NOT your Perl directory. (These are two totally different directories. Perl is typically located in a common resource directory on the web server. Your cgi-bin is typically located under your account's root.) You kept saying that you have the files in your Perl directory. Make sure the files are in your cgi-bin.

This is quite odd. If the syntax is okay. Then try this:

From telnet, use the following command line:

Code:
perl db.cgi

OR

Code:
perl -w db.cgi

This will execute the cgi file within your telnet shell account. This will show processing errors within your script.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Internal server error! In reply to
Eliot, I recieved the following errors.
From local side:
Same error for all files listed below.

Name "main::db_max_hits" used only once
"db_not_null"
"db_bold"
"db_debug"
"auth_no_authentication"
Possible typo at db.cgi (then line number)

From the web:
Error message:
unable to open directory in auth_cleanup ./auth
Reason: No such file or directory


[This message has been edited by WebGeo99 (edited August 18, 1999).]
Quote Reply
Re: Internal server error! In reply to
For the first set of errors...I would check the line that the message is referring to. To find a line in telnet, use the following codes:

Code:
vi db.cgi
:linenumber

Then you can refer to the file via your text editor and fix any syntax errors that are around that line.

Replace linenumber with the line number that the error message is giving you. Then look over the syntax VERY CAREFULLY. Also, since the main sub-routine only finds db_max_hits once that shows that you have either neglected to put a maximum number of hits in the default.cfg file or you have deleted the db_max_hits variable in your default.cfg file.

The second error shows that you have not created a directory auth within the directory where you have your DBMAN files located. You must create a new directory and change its permissions to 777.

George, these threads in DBMAN Installation Forum may assist you:

http://www.gossamer-threads.com/scripts/forum/resources/Forum5/HTML/001133.html
http://www.gossamer-threads.com/scripts/forum/resources/Forum5/HTML/001110.html
http://www.gossamer-threads.com/scripts/forum/resources/Forum5/HTML/001038.html
http://www.gossamer-threads.com/scripts/forum/resources/Forum5/HTML/000946.html

The next step would be for you to post your problem in DBMAN Installation Forum and pose your problem there, but referencing this Thread.

Hope this helps.

Regards,


------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited August 18, 1999).]
Quote Reply
Re: Internal server error! In reply to
Eliot, I tried to use "vi db.cgi : linenumber" from the command line, but got a bad command or file name error. ??????
Also, my browswer IE5 can not find the threads that you listed, but thanks for them anyway.

[This message has been edited by WebGeo99 (edited August 18, 1999).]
Quote Reply
Re: Internal server error! In reply to
When you using PERL in windows OS, make sure you have installed apache 1.3.1 for wins also. They both work together.

Now, in Apache httpd.conf, set all directive not in format windows path like apache instructed, but UNIX path, for example:

C:\www\cgi-bin

must be type

"/www/cgi-bin"

And make sure you have C:\usr\bin\perl in autoexec.bat