Author Topic: Internal Server Error with CSVREAD  (Read 4680 times)

0 Members and 1 Guest are viewing this topic.

Offline mvakbar

  • Full Member
  • ***
  • Posts: 70
Internal Server Error with CSVREAD
« on: December 01, 2006, 09:28:09 PM »
I have used CSVWRITE and have successfully created my database.  However when I try CSVREAD or CSVSEARCH I get the following error message:

" Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, or webmaster and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log."

My database and template files are in the same directory as the scripts.  Is this an access control issue? and if so how can I go about solving it.

Offline mvakbar

  • Full Member
  • ***
  • Posts: 70
Re: Internal Server Error with CSVREAD
« Reply #1 on: December 01, 2006, 10:46:35 PM »
I changed the path and it seems to be workinb except now I get the message that it can not open the template file.  I assuminb this means it can find the template file, but why it can not open it I don't know.

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: Internal Server Error with CSVREAD
« Reply #2 on: December 02, 2006, 05:55:36 AM »
That means it cannot find the template page, so your path to the template page is probably wrong.

Offline mvakbar

  • Full Member
  • ***
  • Posts: 70
Re: Internal Server Error with CSVREAD
« Reply #3 on: December 02, 2006, 12:39:21 PM »
Earlier on I had a similar problem with CSVWRITE for finding the thankyou.htm.  This was placed in the public directory.  The ISP tech people changed the path in my code to:

http://syntony-fs.com.sitepreview.mysuperpageshosting.com/thankyou.htm and now my CSVWRITE works fine.

Now before changeing the path for the template for CSVREAD I was getting the strange System Error noted earlier.

Again they changed the path to

'http://syntony-fs.com.sitepreview.mysuperpageshosting.com/template.htm'

This stopped getting the system error but now the script says it can not open it. Specifically the message is:

Can't open file http://syntony-fs.com.sitepreview.mysuperpageshosting.com/template.htm

I do have the template.htm in the public directory whose address from outside is:

'http://syntony-fs.com.sitepreview.mysuperpageshosting.com/'

So I do't know what to test to further narrow down this issue.

Thank you for yoru support and keep sending me your advise.

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: Internal Server Error with CSVREAD
« Reply #4 on: December 02, 2006, 12:44:58 PM »
The template needs a PATH, not a URL.

Offline mvakbar

  • Full Member
  • ***
  • Posts: 70
Re: Internal Server Error with CSVREAD
« Reply #5 on: December 02, 2006, 03:08:50 PM »
That is a good point.  Thank you.

My Directory structure looks like this:

annoucer
cgi-bin
log
private
public

when I had the template.htm in the cgi-bin directory, I referred to it in the code as:

my $HTML_template    = "template.htm";

That is when I got the system error although it is set for every one to read and write from the directory and the file.

Considering the above directory structure where cgi-bin and public are at the same level, what would be the correct syntax in my $HTML_template    = if I put the template in the public directory?

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: Internal Server Error with CSVREAD
« Reply #6 on: December 02, 2006, 03:32:49 PM »
if your script and template are both in the cgi-bin directory, then
my $HTML_template    = "template.htm";
should work.

What is the error you get when you do it like this?

Offline mvakbar

  • Full Member
  • ***
  • Posts: 70
Re: Internal Server Error with CSVREAD
« Reply #7 on: December 02, 2006, 04:13:39 PM »
The error would be the one which I reported in the first posting, that is:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, or webmaster and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log
.

It was upon reporting this error that the ISP guys suggested the change which stopped the above error but didn't solve the problem either.

Offline Jason

  • Administrator
  • Hero Member
  • *****
  • Posts: 1018
    • slipdex
Re: Internal Server Error with CSVREAD
« Reply #8 on: December 02, 2006, 06:02:40 PM »
There are two things there I think.  First the internal server error might be caused by what EZ said.  Make sure you are using the path and not the url.  I tend to have good luck using the entire path instead of just the relative path.  Also, you may want to try putting your template.htm file in a public directory and chmod both the script and the template file to 755.  Also make sure you properly included the <template> tags in the template file.  If all else fails, I suggest starting over and following the set up instructions very closely.  chmod is a simple thing to overlook, as well as forgetting template tags.  Also, just in case you opted to include data on your thank you page, you need to use the path to the thankyou page and not the url.  Little detail often overlooked.  Hope some of that helps!

Jason
Founder of www.slipdex.com

Offline mvakbar

  • Full Member
  • ***
  • Posts: 70
Re: Internal Server Error with CSVREAD
« Reply #9 on: December 02, 2006, 06:29:43 PM »
Jason,

Thank you for your input.   If I put the template in the public directory what would be the proper syntax for the entire path.  As mentioned earlier my directory structure has cgi-bin and public at the same level?

For now I have gone back and use the default template file and database until I get this problem resolved.  So I just checked and my template file does have the <template> tags .

By the way I should also tell you that I am using these on an NT/2000/XP platform and I was really excited that CSVWRITE worked well.  The other thing you should know (if you haven't guessed already) is that I know near zilch about pearl and UNIX.  So instead of CHMOD what I do is I look at the properties of the file and folders and make sure the owner, group and all users have Read, Write and Execute access.  I assume that does the same thing.

But first things first, What would be the full path specification if the template is in public directory, I should try that and will report back to you.



Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: Internal Server Error with CSVREAD
« Reply #10 on: December 03, 2006, 07:10:26 AM »
a wrong template path should not cause an internal server error, so there was something else wrong.

Offline mvakbar

  • Full Member
  • ***
  • Posts: 70
Re: Internal Server Error with CSVREAD
« Reply #11 on: December 03, 2006, 11:15:31 AM »
OK, Let's see if we can do some diagnosis here.  Can some one PLEASE answer the following question, and if it is a stupid question also let me know: 

Considering that I have the following directory structure:

annoucer
cgi-bin
log
private
public

That is to say annoucer, cgi-bin, log, private and public are all at the same level, NOW, if I wanted to place my template in the public directory, what would be the full path I would specify in my script[/color].  Can some one please answer this question, so I can do some test.

Believe it or not, as strange as it appears, it looks like path does have something to do with the error, becasue when the ISP boys made the change in the path it stopped the system error, though it did not solve the problem either.  Again I agree that no such thing should casue system error and that may point to some issues with the server, but I need to focus on possbilities I can eliminate, so:

Please,  can someone tell me the correct syntax for the full path to the template in the public directory so I can test it. 

I really appreciate everyone' support and patience with a dumb fellow like me. 

Please keep posting and let's get past this so I can then try the extended version.

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: Internal Server Error with CSVREAD
« Reply #12 on: December 03, 2006, 11:19:35 AM »
Often when you upload via FTP, they do not show you the full path.  So it's best to ask your ISP helpdesk what the full absolute path to your public directory is.  This is not something we can tell you out of nothing.

Offline mvakbar

  • Full Member
  • ***
  • Posts: 70
Re: Internal Server Error with CSVREAD
« Reply #13 on: December 03, 2006, 11:34:30 AM »
Thanks EZ, That's a great start.  I will definitely check with them, though it is so hard to get hold of them.

Meanwhile, what if I wanted to specifiy the relative path in my script considering that the script is in CGI-BIN and the template is in Public and both Public and CGI-BIN are child of the same parent directory, what would be the right syntax to specify for a relative path in the script pointing to a template in Public.

Once again thank you for your feedbacks and I am confident that with your support and ideas we will make this happen.


Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: Internal Server Error with CSVREAD
« Reply #14 on: December 03, 2006, 11:39:48 AM »
it would be  ../Public

the '..' means 'go back one directory'.