• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

cgi and includes

S

swebs

Guest
I have an schedule.shtml file in my httpdcos dir that includes the following line:
Code:
<!--#include virtual="sched.cgi?2007"-->

This script (sched.cgi is also in the httpdocs dir) is included below and works on other servers..
I just moved my site to a new dedicated server with plesk 8.0.1 running on linux and the above page now returns an error.

I tried moving the script to the cgi-bin directory and turning on/off the Mod-Perl in the control panel. Nothing seems to work.

Any suggestions/help would be much appreciated.

Code:
#!/usr/bin/perl

$yyyy = $ENV{'QUERY_STRING'};
chomp($yyyy);

$file = '/var/www/vhosts/xyz.com/httpdocs/_sched.dat';

open(F,$file) || die "Cant open $! \'$filepath\'";
@line=<F>;
close(F);

print "Content-type: text/html\n\n";
....

This is what I see in the suexec.log
Code:
[2007-08-03 04:17:23]: uid: (10024/proact) gid: (10001/10001) cmd: sched.cgi
[2007-08-03 04:17:23]: target uid/gid (10024/10001) mismatch with directory (10024/2523) or program (10024/10001)
 
ok.. I'm still not clear why but I found a combination that worked...

I turned on Mod-Perl in the control panel for the domain
and
changed the include line:
Code:
<!--#include virtual="sched.pl?2007"-->
(from .cgi to .pl)

everything seems to be working now.

I have the script handler setup in the httpd.conf so .cgi should get treated the same as .pl so not sure why it doesnt work the other way but as long as it works.
 
Back
Top