Results 1 to 3 of 3
  1. #1

    PHP as CGI, and logrotate

    Hey all. I'm fairly new to dedicated servers so bare with me! But these are the two problems I've been having...

    1. I want to rotate all my virtual host's logs every 2MB or so, but logrotate doesn't seem to be doing anything. Granted, I just did "yum install logrotate" but I wasn't sure how to configure it beyond that! On a related note, I'm persuing this because although Plesk is supposed to rotate logs automatically, it isn't. So if that can be solved this doesn't need to be.

    2. I switched PHP to run in CGI mode instead of Apache module for security purposes on all sites on the server. Some sites work and most do not, when PHP CGI is enabled on them there is just a 500 error on any PHP page. As far as I can tell the "pattern" of who works and who doesn't work is purely sites created recently work, and sites created in the past do not.

    Any help would be very appreciated! If it helps you diagnose, the server is running an up to date CentOS and Plesk 10 install.

  2. #2
    Join Date
    Feb 2004

    in plesk logrotate is per account.

    and the 500 internal errors will be to do with file permissions, ie they are more than 755.


  3. #3
    I tried changing a php files chmod from 644 to 755, neither setting worked though. Loading the file generates this error in the sites error_log:

    [Thu Apr 21 09:23:48 2011] [error] [client] suexec policy violation: see suexec log for more details
    [Thu Apr 21 09:23:48 2011] [error] [client] Premature end of script headers: cgi_wrapper

    (suexec log says this

    [2011-04-21 09:23:48]: uid: (10008/uplannrman) gid: (2522/2522) cmd: cgi_wrapper
    [2011-04-21 09:23:48]: target uid/gid (10008/2522) mismatch with directory (0/0) or program (0/0)

    PS: Think the logrotate might actually be working now...
    Last edited by RubberDucky; 04-22-2011 at 04:57 AM.

Similar Threads

  1. Replies: 0
    Last Post: 04-17-2011, 03:37 PM
  2. Fast CGI PHP and Normal CGI PHP In Windows 2003
    By boonchuan in forum Hosting Security and Technology
    Replies: 3
    Last Post: 05-07-2008, 09:02 AM
  3. CASH: CGI -> PHP /or/ CGI Fix
    By AKWS in forum Employment / Job Offers
    Replies: 3
    Last Post: 06-11-2006, 08:28 AM
  4. Raq550 cgiwrap fails all cgi requests after logrotate?
    By barry9 in forum Dedicated Server
    Replies: 1
    Last Post: 06-02-2004, 03:26 AM
  5. [Needed] PHP and CGI Programmer to convert some CGI into PHP
    By a2km in forum Employment / Job Offers
    Replies: 4
    Last Post: 01-28-2004, 08:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts