1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

cgi and includes

Discussion in 'Plesk for Linux - 8.x and Older' started by swebs, Aug 3, 2007.

  1. swebs

    swebs Guest

    0
     
    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)
    
     
  2. swebs

    swebs Guest

    0
     
    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.
     
Loading...