Home > an error > cgi an error occurred while processing this directive

Cgi An Error Occurred While Processing This Directive

Contents

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us an error occurred while processing this directive ssi Learn more about Stack Overflow the company Business Learn more about hiring developers

An Error Occurred While Processing This Directive Joomla

or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack

An Error Occurred While Processing This Directive Wordpress

Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Perl not running up vote 0 down

An Error Occurred While Processing This Directive Justhost

vote favorite I have experience with setting up multiple Perl program with mac before, but come to a strange situation today. I delete one of my existing Perl folder and download it from GitHub, when I try to run again, it shows this error: [an error occurred while processing this directive]. So, what I do to debug is: 1) I create test.shtml (some problem displaying the arrow an error occurred while processing this directive godaddy sign in here) #exec cgi="/Users/lion/htdocs/app/cgi-bin/test.pl"--> 2) I create test.pl #!/usr/bin/perl print "content-type: text/html \n\n"; print "test"; 3) I create a new htaccess AddType text/html .shtml AddHandler server-parsed .shtml 4) I set the test.pl permission to 777 5) I tested with http://app.local/test.shtml -> come out error [an error occurred while processing this directive]. 6) If I manually run from console, it is working fine. Here's my apache config as well. DocumentRoot "/Users/lion/htdocs/app" ServerName app.local ScriptAlias /cgi-bin/ "/Users/lion/htdocs/app/cgi-bin/" My apache error log show this: [Wed Nov 09 16:45:25 2011] [error] [client 127.0.0.1] invalid CGI ref "/Users/lion/htdocs/app/cgi-bin/test.pl" in /Users/lion/htdocs/app/test.shtml Not sure what I missed out, my other Perl program is running just fine. Run out of ideas what cause the problem. perl apache cgi share|improve this question edited Nov 9 '11 at 9:31 asked Nov 9 '11 at 8:59 TonyTakeshi 2,76953262 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote accepted exec cgi expects a URL-path, not a file system path as an argument. Try #exec cgi="/cgi-bin/test.pl" or just #exec cgi="test.pl" share|improve this answer answered Nov 9 '11 at 9:59 al. 497210 I run this without problem on another perl

In ) Network Solutions Forums>nsHosting™ Forums>Script Help (Perl, PHP, ASP, .Net) Server Side Include (perl) Not Working Options BoBAgi View Member Profile Apr 25 2013, 08:12 AM Post an error occurred while processing this directive bluehost #1 Group: Verified NS Member Posts: 37 Joined: 25-April 13 Member No.: an error occurred while processing this directive html 20,658 We moved our website hosting from Earthlink to Network Solutions and after the move we are now getting an error occurred while processing this directive php an error printed on top of all of our password protected pages:[an error occurred while processing this directive] This happens in the location where this server side include directive is http://stackoverflow.com/questions/8062473/perl-not-running located:The script is a very simple Perl program that composes and sends a report email to ourselves where the login name, date and the webpage name is supplied for our user access tracking.It has worked for ages (like 10 years) on Earthlink on their Apache server but here it just fails....It does not have any output, it just executes...Other perl scripts http://forums.networksolutions.com/script-help-perl-php-asp-net-f50-server-side-include-perl-not-working-t10856.html we use to send us user input from web forms work OK, so it is not a problem of locating the perl interpreter or similar.What can be the reason for the #exec command not to work? Craig View Member Profile Apr 28 2013, 07:01 PM Post #2 Group: Administrators Posts: 974 Joined: 23-June 08 From: Pennsylvania Member No.: 1,317 QUOTE (BoBAgi @ Apr 25 2013, 09:12 AM) We moved our website hosting from Earthlink to Network Solutions and after the move we are now getting an error printed on top of all of our password protected pages:[an error occurred while processing this directive] This happens in the location where this server side include directive is located:The script is a very simple Perl program that composes and sends a report email to ourselves where the login name, date and the webpage name is supplied for our user access tracking.It has worked for ages (like 10 years) on Earthlink on their Apache server but here it just fails....It does not have any output, it just executes...Other perl scripts we use to send us use

CoolUsesForPerl PerlNews Q&A Tutorials Poetry RecentThreads NewestNodes Donate What'sNew on Jul 26, 2002 at 02:13UTC ( #185405=categorized question: print w/replies, xml ) Need Help?? Contributed by dswimboy on Jul 26, 2002 at 02:13UTC Q&A > CGI programming Description: i tried http://www.perlmonks.org/?node_id=185405 calling from the web page, and i got "an error occurred http://megaton.net/help/cgi_problems.shtml while processing this directive".Answer: How do you pass info to perl through an SSI call on a web page?contributed by blokhead Depending on your Apache setup, you may need to try #include virtual= instead of #exec cgi=. This worked on my server, at least. But I think to use this SSI directive, your file must be an error *.shtml, or else Apache must recognize it as 'server-parsed' .. Somebody correct me if I'm wrong.Answer: How do you pass info to perl through an SSI call on a web page?contributed by sedhed In this case, there could be a few things that would cause that error: The script could not be found. Try using the full path to /var/www/cgi-bin/config.pl or wherever. (In apache at least, you can start the path an error occurred "/" at the document root, or "/cgi-bin/config.pl" in other words. The script was found, but did not return a proper header. This, in turn, can be caused by either by the script not compiling, or of course by the script running just fine, but never actually printing a header. Be sure your program prints a CGI->header() or "Content-Type: text/html\n\n" line. Once you get the script to run, you can pass parameters to it by using the #include virtual style of SSI, like so: