is it the host or me?
am 10.03.2006 18:48:41 von freemont
Hello all.
I started an account with godaddy that includes CGI support.
The scripts must reside within the /cgi folder they created.
The shebang line they require is /usr/bin/perl.
I cannot get anything to work. I am new to this, having only used perl
before in a classroom. When my new code failed at godaddy, I tried putting
some of the classroom code up there for troubleshooting. Very simple
stuff, passing some pairs to the script to be output in an htm file.
Is there any reason that this code:
#!/usr/bin/perl
#spanish.cgi - creates a dynamic Web page
print "Content-type: text/html\n\n";
use CGI qw(:standard);
#create Web page
print "\n";
print "
Jackson Elementary School\n";
print "\n";
print param('trans'),"\n";
print "\n";
print "\n";
would not execute correctly from this page:
Jackson Elementary School
Click an English word to display its Spanish equivalent
This is the simplest example I could find. All it produces from godaddy
is:
"Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request." And so on. Nothing helpful.
I appreciate any help.
--
"Because all you of Earth are idiots!"
¯`·.¸¸.·´¯`·-> freemont© <-·´¯`·.¸¸.·´¯
Re: is it the host or me?
am 10.03.2006 19:50:06 von Dave Turner
freemont wrote:
> Hello all.
>
> I started an account with godaddy that includes CGI support.
> The scripts must reside within the /cgi folder they created.
> The shebang line they require is /usr/bin/perl.
>
> I cannot get anything to work. I am new to this, having only used perl
> before in a classroom. When my new code failed at godaddy, I tried putting
> some of the classroom code up there for troubleshooting. Very simple
> stuff, passing some pairs to the script to be output in an htm file.
>
> Is there any reason that this code:
>
> #!/usr/bin/perl
> #spanish.cgi - creates a dynamic Web page
> print "Content-type: text/html\n\n";
>
> use CGI qw(:standard);
>
> #create Web page
> print "\n";
> print "
Jackson Elementary School\n";
> print "\n";
>
> print param('trans'),"\n";
>
> print "\n";
> print "\n";
>
> would not execute correctly from this page:
>
>
> Jackson Elementary School
>
> Click an English word to display its Spanish equivalent
>
>
>
>
>
>
>
>
> This is the simplest example I could find. All it produces from godaddy
> is:
> "Internal Server Error
> The server encountered an internal error or misconfiguration and was
> unable to complete your request." And so on. Nothing helpful.
>
> I appreciate any help.
>
Just a guess, but did you change the permissions on the script?
Re: is it the host or me?
am 10.03.2006 21:23:07 von Paul Lalli
freemont wrote:
> I started an account with godaddy that includes CGI support.
So... why aren't you getting them to support you?
> The scripts must reside within the /cgi folder they created.
> The shebang line they require is /usr/bin/perl.
>
> I cannot get anything to work. I am new to this, having only used perl
> before in a classroom. When my new code failed at godaddy, I tried putting
> some of the classroom code up there for troubleshooting. Very simple
> stuff, passing some pairs to the script to be output in an htm file.
>
> Is there any reason that this code:
>
> #!/usr/bin/perl
> #spanish.cgi - creates a dynamic Web page
Wait. This is what you learned "in a classroom"? You weren't taught
to always use strict and warnings?
Go ask for your money back.
> print "Content-type: text/html\n\n";
>
> use CGI qw(:standard);
If you're going to use CGI (as you should), then you should use CGI
use CGI qw/:standard/;
print header();
> #create Web page
> print "\n";
> print "
Jackson Elementary School\n";
> print "\n";
>
> print param('trans'),"\n";
>
> print "\n";
> print "\n";
>
> would not execute correctly from this page:
>
>
> Jackson Elementary School
>
> Click an English word to display its Spanish equivalent
>
>
>
>
>
>
>
>
> This is the simplest example I could find. All it produces from godaddy
> is:
> "Internal Server Error
> The server encountered an internal error or misconfiguration and was
> unable to complete your request." And so on. Nothing helpful.
I find that unlikely. I find it more likely that you stopped reading
too early. Read the rest of that error message, and then do what it
tells you. If your GoDaddy.com account doesn't let you access the
server logs (they do advertise themselves to be the cheapest domain
providers, don't they? You get what you pay for), then contact them
directly. You are paying for the CGI support, after all.
As a complete guess, maybe your permissions are wrong. The file needs
to be executable by whatever user runs your web server. (This of
course, has nothing to do with Perl)
You could try adding
use CGI::Carp qw/fatalsToBrowser/
to the top of the script, right after use CGI qw/:standard/;. If you
actually have a Perl problem, this will cause the message to be
displayed in your browser window. If, however, as we suspect it's not
a perl problem, this will not help you, as your CGI script is not being
executed in the first place.
Paul Lalli
Re: is it the host or me?
am 10.03.2006 23:15:37 von freemont
On Fri, 10 Mar 2006 10:50:06 -0800, Dave Turner wrote:
> Just a guess, but did you change the permissions on the script?
Hi, Dave. No, the permissions are 755, which is what I believe they should
be.
Thanks-
--
"Because all you of Earth are idiots!"
¯`·.¸¸.·´¯`·-> freemont© <-·´¯`·.¸¸.·´¯
Re: is it the host or me?
am 10.03.2006 23:24:12 von freemont
On Fri, 10 Mar 2006 12:23:07 -0800, Paul Lalli wrote:
> freemont wrote:
>> This is the simplest example I could find. All it produces from godaddy
>> is:
>> "Internal Server Error
>> The server encountered an internal error or misconfiguration and was
>> unable to complete your request." And so on. Nothing helpful.
>
> I find that unlikely. I find it more likely that you stopped reading too
> early. Read the rest of that error message, and then do what it tells
> you. If your GoDaddy.com account doesn't let you access the server logs
> (they do advertise themselves to be the cheapest domain providers, don't
> they? You get what you pay for), then contact them directly. You are
> paying for the CGI support, after all.
>
> As a complete guess, maybe your permissions are wrong. The file needs to
> be executable by whatever user runs your web server. (This of course, has
> nothing to do with Perl)
>
> You could try adding
> use CGI::Carp qw/fatalsToBrowser/
> to the top of the script, right after use CGI qw/:standard/;. If you
> actually have a Perl problem, this will cause the message to be displayed
> in your browser window. If, however, as we suspect it's not a perl
> problem, this will not help you, as your CGI script is not being executed
> in the first place.
>
> Paul Lalli
Somehow the "use strict" got cut out of my paste, don't ask me how. It
was there. ;-) But per someone else's suggestion, I changed the script to
read:
Aw, shucks, the whole tale is here-
http://tinyurl.com/zaw57
Sorry, Paul, but this crap has gotten me so frustrated that I can't bring
myself to rehash everything. I changed the script to a better version and
got the same error, then talked to godaddy again and was told that they
didn't see a problem there, so it's gotta be me.
The script is good, the html page is good, but it doesn't work. I'm at a
loss.
Thank you for your attention, Paul.
--
"Because all you of Earth are idiots!"
¯`·.¸¸.·´¯`·-> freemont© <-·´¯`·.¸¸.·´¯
Re: is it the host or me?
am 10.03.2006 23:41:51 von Matt Garrish
"freemont" wrote in message
news:pan.2006.03.10.17.48.38.414952@dabba.doo...
> Hello all.
>
> I started an account with godaddy that includes CGI support.
> The scripts must reside within the /cgi folder they created.
> The shebang line they require is /usr/bin/perl.
>
> I cannot get anything to work. I am new to this, having only used perl
> before in a classroom. When my new code failed at godaddy, I tried putting
> some of the classroom code up there for troubleshooting. Very simple
> stuff, passing some pairs to the script to be output in an htm file.
>
> Is there any reason that this code:
>
> #!/usr/bin/perl
> #spanish.cgi - creates a dynamic Web page
> print "Content-type: text/html\n\n";
>
> use CGI qw(:standard);
>
A total guess, but have you isolated that it's not a problem with the CGI
module they have on their site? (or that they even have CGI.pm installed?)
Can you just print the content type and send some html to the browser
without using the module? If you can do that, add in the use CGI line and
see if your script dies.
I'd slowly work upward like that adding a line at a time until you hit the
problem.
Matt
Re: is it the host or me?
am 11.03.2006 07:49:19 von webmaster
In message
freemont wrote:
> Hi, Dave. No, the permissions are 755, which is what I believe they should
> be.
Are you sure? I've got two FTP programs and both report that permissions are
755 because that is the program default, but in actual fact a newly uploaded
file is more like 555. You have to actually *set* the permissions to 755;
you can't trust the report.
Ken Down
--
================ ARCHAEOLOGICAL DIGGINGS ===============
| Australia's premiere archaeological magazine |
| http://www.diggingsonline.com |
========================================================
Re: is it the host or me? SOLVED
am 11.03.2006 19:58:31 von freemont
On Fri, 10 Mar 2006 12:48:41 -0500, freemont wrote:
> Hello all.
>
> I started an account with godaddy that includes CGI support. The scripts
> must reside within the /cgi folder they created. The shebang line they
> require is /usr/bin/perl.
>
> I cannot get anything to work. I am new to this, having only used perl
> before in a classroom. When my new code failed at godaddy, I tried putting
> some of the classroom code up there for troubleshooting. Very simple
> stuff, passing some pairs to the script to be output in an htm file.
>
> Is there any reason that this code:
>
> #!/usr/bin/perl
> #spanish.cgi - creates a dynamic Web page print "Content-type:
> text/html\n\n";
>
> use CGI qw(:standard);
>
> #create Web page
> print "\n";
> print "
Jackson Elementary School
> SIZE=5>\n"; print "\n";
>
> print param('trans'),"\n";
>
> print "\n";
> print "\n";
>
> would not execute correctly from this page:
>
>
> Jackson Elementary School
>
> Click an English word to display its Spanish equivalent
> HREF="cgi/spanish.cgi?trans=Hola">Hello
> HREF="cgi/spanish.cgi?trans=Adios">Good-bye
> HREF="cgi/spanish.cgi?trans=Amor">Love
> HREF="cgi/spanish.cgi?trans=Gato">Cat
> HREF="cgi/spanish.cgi?trans=Perro">Dog
>
>
> This is the simplest example I could find. All it produces from godaddy
> is:
> "Internal Server Error
> The server encountered an internal error or misconfiguration and was
> unable to complete your request." And so on. Nothing helpful.
>
> I appreciate any help.
Solved by uploading the scripts in ascii mode instead of binary mode. :-\
"This sort of thing has come up before. It can only be attributable to
human error."
Thanks to all who helped. Useful info was offered. :-)
--
"Because all you of Earth are idiots!"
¯`·.¸¸.·´¯`·-> freemont© <-·´¯`·.¸¸.·´¯