Google Answers Logo
View Question
 
Q: CGI Wrap error on my website ( Answered 4 out of 5 stars,   0 Comments )
Question  
Subject: CGI Wrap error on my website
Category: Computers > Programming
Asked by: lray-ga
List Price: $40.00
Posted: 17 Mar 2005 17:27 PST
Expires: 16 Apr 2005 18:27 PDT
Question ID: 496502
How do I fix this?  I'm not a programmer at all.  The site is
www.jenniferterran.com and the page is
www.jenniferterran.com/vent/ventpost.html  It's a guestbook that was
working fine but when we changed servers, it went kaput.  I'll pay for
the answer as soon as my page works again.. and I'll get on the phone
or IM to get walked through.  let me know when's good.
Answer  
Subject: Re: CGI Wrap error on my website
Answered By: leapinglizard-ga on 17 Mar 2005 19:32 PST
Rated:4 out of 5 stars
 
Dear lray,

I can't get on the phone with you, nor can any other Researcher, since
the policy of this service prohibits us from taking up outside
communication with askers. I can help you with this problem, however.

The principal reason why your users can't post vents is that the
venting script doesn't have the right permissions on your new server.
The form calls a script at this location --

  http://www.jenniferterran.com/cgi-bin/jt/vent.pl

-- and the script, vent.pl, is indeed there, but outside users don't
have permission to execute it.

What you or another site administrator have to do is the following.
Log in to your webhost account, then navigate to the cgi-bin/jt
directory, and execute the following command.

  chmod 755 vent.pl

The form should now work.

If you can't log in through a text terminal, then you'll have to use
your graphical webhosting interface to navigate to the cgi-bin/jt
directory, select the vent.pl file, and change its permissions so that
everyone can read it and everyone can execute it. Don't let everyone
write to it, however. In some nomenclatures, this mode is called
world-readable and world-executable. You don't want to make it
world-writable.

If you have any difficulty following these instructions, don't
hesitate to post a Clarification Request so that I can help you change
the file permissions for vent.pl on your webhost. In the event that
you don't have terminal access, please let me know what kind of
control panel or web interface you're using to administer your
webhosting account.

Regards,

leapinglizard

Request for Answer Clarification by lray-ga on 21 Mar 2005 17:21 PST
Sorry it's taken me so long to get back to you.. google had a problem
with my card and locked me out.. it's fixed now.

Unbelieveably, I was successful at following you first instructions. 
However, it's now showing another problem.  I'm not sure what this
means, but I will say that the .pl file was not in that directory when
I discovered the problem.  I put it there after looking into the page
code and seeing that it was referred to.  But I just put it there by
dragging and dropping (from a backup disk that my wife had) in
dreamweaver.

I'm working on a PowerbookG4.  

If I need to put that file there with the terminal, please give
specific directions on what commands to use.  Last time I had to tap
my memory of unix from sixth grade computer class to remember the
command cd/ .   And that was a long time ago.   I was very impressed
with myself, needless to say.

thanks again!

Landon

Clarification of Answer by leapinglizard-ga on 21 Mar 2005 18:22 PST
It doesn't matter how you get the file there, as long as it ends up in
the right spot.

My diagnosis of the CGI error message tells me that you have the
vent.pl in the right place and that it has the right permissions, but
it's calling a piece of software that's in a different place on your
new server.

What I'd like you to do is the following.

First, look at the first line of vent.pl using any tool you please,
whether Dreamweaver or some text editor. It probably looks something
like this.

#!/usr/bin/perl

Tell me exactly what it is so I can follow along.

As a second step, log in to the webhosting account and execute the
following command.

  which perl

Show me the output. It's probably something like /usr/local/bin/perl,
or at any rate something similar to -- but not quite identical -- to
what is given in the first line of the vent.pl file.

Finally, open the vent.pl file and modify the first line so that the
pathname reflects the output of the above command. If, for example,
"which perl" returns /usr/local/bin/perl, you would change the first
line of vent.pl so that it reads as follows.

#!/usr/local/bin/perl

Now test the script and see if it works. Remember, you need to change
the vent.pl file that resides in the webhosting account, not just on
your local machine.

If something goes wrong, please get back to me with the results I've noted above.

leapinglizard

Request for Answer Clarification by lray-ga on 22 Mar 2005 17:55 PST
Well, I had a problem with the 'which' command (needed a password
other than mine) so I wrote the host and he said...

"Ouch, hope you didn't actually pay someone at google answers to help you with 
this..  This kinda problem is what we're here for :)

There were 3 problems i found with the script here..

1) vent.pl was uploaded as BINARY with your FTP program, so there were some 
hidden newline characters that were messing up the first line with the path 
to perl (btw /usr/bin/perl works fine).  You should make sure your FTP 
program uploads this file as TEXT/ASCII from now on (you can usually tell 
them to upload *.pl as ASCII)

2) The paths for $guestbookreal and $guestbooklog were wrong and pointing to 
what i assume were the server paths on the site's old host.  I changed two 
lines to use the exact paths our server uses:
$guestbookreal = "/www/jenniferterran.com/web/vent/ventmain.html";
$guestlog = "/www/jenniferterran.com/web/vent/ventlog.html";

3) The location of 'sendmail' was wrong.  I changed "/bin/sendmail" to 
"/usr/bin/sendmail"

Just tested it and it seems to work fine.  Also went in and deleted my test 
posts."

The people at HostBaby and CDBaby are studs of the very best sort and
I would and will recommend them to anyone.

Thanks for your time anyway.  I'll rate your answer based on the
assumption that we would have eventually figured this out.  (though it
turns out the it DOES matter how you get the file there...)

Take care

Clarification of Answer by leapinglizard-ga on 22 Mar 2005 19:07 PST
I'm glad the problem is solved.

leapinglizard
lray-ga rated this answer:4 out of 5 stars
Great service, quick responses, nice dude(?).  I ended up getting my
answer elsewhere but we would have gotten there eventually, I believe.
 Thanks for your time!

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy