• 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

PHP fastCGi / CGI Permission Problem

M

MarkM2

Guest
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,
 
What do you mean "my scipts are not working"? Any details, error logs, etc?
 
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



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:
Back
Top