Powered by Invision Power Board


  Reply to this topicStart new topicStart Poll

> CGI-perl question
mrickert
Posted: Jun 22 2004, 10:52 AM
Quote Post





Group: Members
Posts: 82
Member No.: 346
Joined: 2-December 03



I am trying to get a cgi program to work. I wrote it out, uploaded it for testing, and got the infamous 500 server error. So, I tried to strip it down a bit, and tested again. Still, same error. So I got desperate, and tried to just get the old "Hello World" script to work. Still, I'm getting 'premature end of script headers' in the error log. I uploaded in ASCII, chmod 755, ran it through ssh (no errors and correct syntax), yet still it won't work through a browser. Any ideas? The script is located at http://www.vvapplianceparts.com/cgi-bin/search/search.pl

Thanks
PMEmail Poster
Top
mrickert
Posted: Jun 23 2004, 10:11 AM
Quote Post





Group: Members
Posts: 82
Member No.: 346
Joined: 2-December 03



I just noticed something. In the control panel, all my other scripts etc. in the cgi-bin folder have size listed by a number and the classification, i.e. 45KB, 10KB etc. The script I keep trying to get to work just says size 200. no KB or whatever. I wonder if this has anything to do with my problem?
PMEmail Poster
Top
mrickert
Posted: Jun 23 2004, 10:58 AM
Quote Post





Group: Members
Posts: 82
Member No.: 346
Joined: 2-December 03



Well, got it to work.

I changed

#!/usr/bin/perl

to

#!/usr/bin/perl -w

and it works. Don't understand why, but as long as it's working I'm happy smile.gif
PMEmail Poster
Top
Matt
Posted: Jun 23 2004, 11:42 AM
Quote Post





Group: Members
Posts: 1,103
Member No.: 342
Joined: 25-November 03



QUOTE
Well, got it to work.

I changed

#!/usr/bin/perl

to

#!/usr/bin/perl -w

and it works. Don't understand why, but as long as it's working I'm happy 


#!/usr/bin/perl -w just shows warning messages while #!/usr/bin/perl does not. Just adding the -w would not cause it to work in and of itself. I suspect you may have had some invisible control characters within your script file and when you added the -w you removed them.

QUOTE
I just noticed something. In the control panel, all my other scripts etc. in the cgi-bin folder have size listed by a number and the classification, i.e. 45KB, 10KB etc. The script I keep trying to get to work just says size 200. no KB or whatever. I wonder if this has anything to do with my problem?


If a file has no "KB", "MB" or "GB" after it the size of the file is being expressed in bytes.


--------------------
Matt B.
Advantagecom Technical Support

Private messages are ignored unless solicited. If you have a support question, please email support@advantagecom.net, post in the appropriate section of the forum, or call if your service plan allows support by phone.
PMUsers Website
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll