PDA

View Full Version : Really Dumb CGI question


beyondxm
05-26-2006, 07:57 PM
I'm trying to get some cgis to run and and I know I must be missing something. I have my cgi is in the cgi-bin and chmoded 755.

When I run it I get..... an error occurred while processing this directive. This really doesnt make sense since there are perl modules like HTML::Template installed.

Can I only use CGIs as an ssi ? That really makes no sense to me. I'm obviously running the cgi from the wrong place, but where should I be wrunning it from?

Can someone clarify how I should be running my cgis or point me to a tech note even ?

Thanks,
Michael

vegasgwm
05-28-2006, 08:48 PM
perhaps you can look at one of the scripts in the cgi library and compare with yours to see if there are syntacts errors.

siguie
05-29-2006, 03:20 AM
I run plenty of Perl CGI's with no problems and not from SSI's Also you don't need to put them in the cgi-bin they will work from the public_html directory.

You may just have a problem in your script that's causing the error. If you want to try out a simple cgi try this ...

#!/usr/bin/perl

use CGI::Carp qw(fatalsToBrowser);

print "Content-type: text/html\n\n";
print "<html><title>test</title><body bgcolor=\"#FFFFFF\">";

print "Hello World";

print "</body></html>";
exit(0);

I just wrote and tested this as a demo so I know it works and you can give it a try on your system. It's the traditional "Hello World" test script but I added some html tags since that's a place where many scripts have problems.

beyondxm
05-29-2006, 08:24 AM
Thanks Siguie,

I placed that code up on my server and its returning the same error.

Its got to be some type of configuration issue, before I put in a support ticket does anyone else have any ideas?

Thanks,
Michael

beyondxm
05-30-2006, 06:04 PM
Doh....this was a permissions issue on my end. Spencer @ Support pointed this out to me....Thanks again Spencer if you're reading.

Thanks,
Michael