alright...i know this is not game related but i need some help concerning perl
basically i'm trying to get my perl script to post some text to and html file, when i access it from command line, it works, but when i have it executed through the web it doesnt work (i'm running slackware 9.1, kernel 2.6.4, apache, 1.3.29)
this is my code:
Code:
!/usr/bin/perl -w
#
require "cgi-lib.pl";
&ReadParse (*input);
$file='/usr/local/apache/htdocs/index.html';
open(INFO, ">>$file") or die ("failed to open file: &!");
print INFO '<table cellspacing="1" cellpadding="5" border="0" bgcolor="#000000">';
print INFO '<TR bgcolor="#EEEEEE" ><td height="130" width="100" align="center" valign="top"> Picture goes here<br>Name</td>';
print INFO '<TD rowspan="2" width="870" valign="top" >';
$sFormInput = $input{'TextPost'};
print INFO $sFormInput;
print INFO '</table>';
print INFO '</br>';
close(INFO);
this is my error log entry when i have it run through the web:
Code:
print() on closed filehandle INFO at /usr/local/apache/cgi-bin/newpost.pl line 10
print() on closed filehandle INFO at /usr/local/apache/cgi-bin/newpost.pl line 11
print() on closed filehandle INFO at /usr/local/apache/cgi-bin/newpost.pl line 13
print() on closed filehandle INFO at /usr/local/apache/cgi-bin/newpost.pl line 15
print() on closed filehandle INFO at /usr/local/apache/cgi-bin/newpost.pl line 16
print() on closed filehandle INFO at /usr/local/apache/cgi-bin/newpost.pl line 17
the perl script works fine when i execute it through the server's bash shell.
i tried chmod +x index.html
i even tried (under /usr/local/apache) chmod 755 htdocs
no change in the error message
by the way, this is the error i get through the web, when i try to execute
Code:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@P100Server.mtmc.phub.net.cable.rogers.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/1.3.29 Server at P100Server.mydomain.org Port 80
can anybody help?