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

PHP fastCGi / CGI Permission Problem

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by MarkM2, Jun 22, 2011.

  1. MarkM2

    MarkM2 Guest

    0
     
    Hi,

    i have some problems, first apache use a lot of ram when i use php as apache module
    i found out switching to fastcgi or cgi fix the ram issue, but now my scipts are not working

    Does any one have a solution for me ?

    thanks,
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,547
    Likes Received:
    1,240
    Location:
    Novosibirsk, Russia
    What do you mean "my scipts are not working"? Any details, error logs, etc?
     
  3. MarkM2

    MarkM2 Guest

    0
     
    Hi,

    ok i explain it ;)
    was late yesterday ...

    1. the problem was that apache uses to much ram, this is a new server xeon 4 core with 4gb
    and i am runing just 3 sites with wordpress with ca. 120-200 / Visits / Day for all sites togehter
    But apache keeps using more and more ram then i changed php from apache module to cgi and fcgi to test
    and it works the ram was on a good level have a look here

    [​IMG]

    But when i use cgi or fcgi my scripts are runing under some other user who has not the sufficent rights to eg write
    in folders etc.

    i used a little php script to find out under which user the scripts runs

    <?php echo(exec("whoami"));?>

    when i use php as apache module it runs under "apache" user when i run it under cgi or fcgi it shows nothing

    2. so eg. Wordpress the error is that i cant change themes or plugins becouse the script has not the rights to the folders and piwik doesent even start anymore error msg is :

    --
    Piwik couldn't write to some directories.

    Try to Execute the following commands on your server:

    chmod 0777 /var/www/vhosts/domain.tld/httpdocs/stat/tmp
    chmod 0777 /var/www/vhosts/domain.tld/httpdocs/stat/tmp/templates_c
    chmod 0777 /var/www/vhosts/domain.tld/httpdocs/stat/tmp/cache
    chmod 0777 /var/www/vhosts/domain.tld/httpdocs/stat/tmp/assets
    --

    The folders already have 777

    3. all the folders on the different webspaces have ether apache or username of the webspace as owner

    thanks,

    Plesk Version is 10.2 / CentOS 5
     
    Last edited by a moderator: Jun 23, 2011
Loading...