[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] RaQ4 - cgi / SSI 'an error occurred' problem



Hi folks - new to this forum and new to the Raq4 - I've been trying to get
to the bottom
of this probelm for a few days now - it is driving me crazy. If anyone has
some advice I
would be very very grateful.

The problem occurs when attempting to call a cgi script from an shtml
document using the 'exec cgi' command. (Oddly the identical page and script
works fine on a Raq3.)

The main points are as follows;

a) both cgi and includes are active for this site
b) permissions seem ok
c) script runs fine from shell
d) cgiwrapper has not been disabled via .htaccess (although doing so makes
no difference)
e) use of 'strict' in the script itself and running the
'cgiwrapDir/cgiwrapd' diagnostic show no errors

When the shtml page loads it gives the 'an error occurred while processing
this directive'

The script itself is very simplistic - it just increments a counter file -
see below;

#! /usr/bin/perl

use strict;

# counter.cgi

my($count) = "montecristo.txt";
my($location)  = "./cgi-bin/";
my($print) = '1';

open (COUNT, "$location$count");
my($counter) = <COUNT>;
close (COUNT);

open (COUNT, "> $location$count");
$counter+= 1;
print COUNT "$counter";
close (COUNT);

exit;


Within the shtml file I call this script using

<!--#exec cgi="./cgi-bin/count.cgi"-->

I have also tried calling it using <!--#include virtual=


I really don't know what more I can do.

Any help would be very very welcome.

Regards TOM