The script should start with
Assuming that that is where perl is installed. usually this is /usr/bin/perl on standard UNIX like systems.
once that is changed try doing
perl -wc /opt/share/www/lighttpd/cgi-bin/QmakeCGI.pl
This will compile and print any warnings in the script but not run it.
If there are warnings or errors then they will also need to be fixed.
Note that it's possible that there will be module load errors. These may go away when called from the web browser as the PERL_LIB path may be set to include the required directories in lighttpd environment but that is unlikely.
To fix these you need to set the appropriate paths up in either the environment or in the script with a line like...
use lib "/usr/lib/perl5/site_lib/5.8.6/";
On 03/06/2007, at 9:15 AM, crombeenhans wrote:
I'm a beginner with a lot to learn. What have I done:
* installed lighttpd, working great
* activated mod_cgi
* restarted lighttpd
* installed two cgi scripts into the cgi-bin directory in the shared
directory, chmodded it to 755
* created a directory 'results' from the www root, chmodded it to 777
I get 404 -errors. The error log says this:
2007-06-03 01:05:41: (log.c.75) server started
Bareword found where operator expected at /opt/share/www/lighttpd/cgi-
bin/QmakeCGI.pl line 1, near "/opt/bin"
(Missing operator before bin?)
syntax error at /opt/share/www/lighttpd/cgi-bin/QmakeCGI.pl line 1,
BEGIN not safe after errors--compilation aborted
at /opt/share/www/lighttpd/cgi-bin/QmakeCGI.pl line 46.
In the CGI scripts, the first 2 lines are:
$file_path = '/opt/share/www/lighttpd/results';