QUOTE
/usr/sbin/suexec -V
Yes that worked and the settings are the same as yours. My paths for the virtualhost directive for the cgi-bin, and public_html are correct. However I had to add the SuexecUserGroup in the virtual host. However when I run the .pl script, I get this error message now:
QUOTE
failed to open log file
fopen: Permission denied
Premature end of script headers
This is dumped in the error_log file of the virtual host. I do not know why Apache wants to write to another log file. I have tried changing permission of the global /var/log/httpd of both the error_log, and access_log and the error is still there.
The .pl script runs on the command line without any errors reported. As I need help I paste below my virtualhost settings and the script code I am running
QUOTE
SuexecUserGroup owner owner
Servername localdomain.owner.net
ServerAlias owner.net
ScriptAlias /cgi-bin/ /var/www/html/owner/cgi-bin/
DocumentRoot /var/www/html/owner/public_html
ErrorLog /var/www/html/owner/logs/error_log
CustomLog /var/www/html/owner/logs/access_log common
LogLevel debug
ServerSignature email
DirectoryIndex index.html index.php index.htm index.shtml
Options Indexes IncludesNOEXEC FollowSymLinks
Options +ExecCGI
SetHandler cgi-script
AllowOverride All
QUOTE
#!/usr/bin/perl
#open pipe to ps
open PS, "/usr/bin/whoami |";
# loop for each file
my $user;
while(
) {
chomp();
$user = $_;
}
close PS;
print "Content-type: text/htmlnn";
print "*Webserver is running as user $user*
";
exit;
PHP Issue:
I have also tried a simple PHP script and I also get errors in the error_log . The script is called index1.php with contents:
QUOTE
echo 'Order Processed.n';
?>
The error follows:
QUOTE
PHP Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /var/www/html/owner/public_html/index1.php on line 2
Running on the command line as php index.php also gives this error which makes no sense to me as the syntax above look ok to me. I am on PHP/4.3.9
What is going on here
Please help
Thank You