Apache won't run with FCGID .. not using virtual server php.ini ?

11 posts / 0 new
Last post
#1 Sat, 05/21/2011 - 01:41
fgossart

Apache won't run with FCGID .. not using virtual server php.ini ?

I setup webmin and virtualmin GPL as package (ubuntu 11.04). Every needed packages are installed for FCGID mode, but never run with this mode.

here is a phpinfo sample Server API Apache 2.0 Handler Virtual Directory Support disabled Configuration File (php.ini) Path /etc/php5/apache2 Loaded Configuration File /etc/php5/apache2/php.ini

on my virtual server I'm using FCGID

I disabled mod php5 in apache mod settings, and now it's running fcgid.

With an other server I was able to have choice for mod_php or mod_fcgid.

is it a bug ?

Sat, 05/21/2011 - 10:18
andreychek

Howdy,

Well, we generally recommend performing an installation using the install.sh script onto one of the Grade 'A' supported distributions here:

http://www.virtualmin.com/os-support.html

The problem that you're seeing is an issue that comes up on Ubuntu, but is automatically corrected by the installer :-)

However, if you wish to do a manual installation, what you'd need to do is edit /etc/apache2/conf.d/php5.conf, comment out the two SetHandler lines, and then restart Apache.

-Eric

Sun, 05/22/2011 - 04:26 (Reply to #2)
fgossart

I comment out these lines and restart apache but doesn't change anything. mod_fcgid is always ignored.

Sun, 05/22/2011 - 10:36 (Reply to #3)
fgossart

I comment out these lines and restart apache but doesn't change anything. mod_fcgid is always ignored.

Mon, 05/23/2011 - 06:55
fgossart

for the moment I've juste disabled mod_php. In this case I have of course FCGID but no other choice

Mon, 05/23/2011 - 08:56
andreychek

I'm unfortunately not sure what might cause that... it's possible you're seeing an issue with that particular distro, which isn't one we've done any testing on.

My suggestion would be to use one of the Ubuntu LTS releases if getting this working is important, as we'd be able to better support you in that case.

If you do figure it out though, by all means let us know and we'll add the problem to the OS notes for Ubuntu.

-Eric

Wed, 05/25/2011 - 10:34 (Reply to #6)
raymonvdm

I noticed that i am experiencing the same issue. I thought my sites where running in FCGID but apparently they are not. I think the issue occurred after updating using "apt-get update" but i`m not sure.

Im running: Ubuntu 10.04.2 LTS \n \l and Virtualmin version 3.84.gpl GPL

I just found this link but it does not seem to fix my issues.

http://www.virtualmin.com/node/14733

Wed, 05/25/2011 - 10:40
andreychek

So to clarify what steps you've taken -- what we'd suggest is reviewing /etc/apache2/mods-available/php5.conf, comment out the SetHandler lines, and then restart Apache.

After that, do things work for you?

-Eric

Wed, 05/25/2011 - 10:47 (Reply to #8)
raymonvdm

I don`t think it is working correctly

Selecting Apache mod_php (run as Apache's user) tells me Server API Apache 2.0 Handler Selecting FCGId (run as virtual server owner) tells me Server API = CGI/FastCGI

both using phpinfo.php

However ps aux tells me

ps aux | grep apache
root     31895  0.4  0.5  48544 22616 ?        Ss   17:39   0:01 /usr/sbin/apache2 -k start
www-data 32203  0.0  0.1  45760  4388 ?        S    17:43   0:00 /usr/sbin/apache2 -k start
www-data 32205  0.0  0.1  49172  6972 ?        S    17:43   0:00 /usr/sbin/apache2 -k start
www-data 32206  0.0  0.2  49584  8368 ?        S    17:43   0:00 /usr/sbin/apache2 -k start
www-data 32207  0.0  0.1  49040  5816 ?        S    17:43   0:00 /usr/sbin/apache2 -k start
www-data 32208  0.0  0.1  49172  6964 ?        S    17:43   0:00 /usr/sbin/apache2 -k start
www-data 32209  0.0  0.1  49040  5804 ?        S    17:43   0:00 /usr/sbin/apache2 -k start
www-data 32210  0.0  0.1  49040  5804 ?        S    17:43   0:00 /usr/sbin/apache2 -k start
www-data 32211  0.0  0.1  49040  5804 ?        S    17:43   0:00 /usr/sbin/apache2 -k start
www-data 32212  0.0  0.1  49040  5804 ?        S    17:43   0:00 /usr/sbin/apache2 -k start
root     32218  0.0  0.0   3324   808 pts/0    S+   17:44   0:00 grep --color=auto apache

I should see apache running under the user also isn`t is ?

Wed, 05/25/2011 - 10:46
andreychek

No, the Apache process still runs as www-data.

What is different when running under CGI/FCGID is that, whenever PHP code is executed, Apache will spawn a new PHP process that runs the PHP code as your username, and then exits.

-Eric

Mon, 06/06/2011 - 09:36
fgossart

finally, I try again after some days, and I comment the SetHandler lines again. Before I commented out as I could see in this thread but didn'tchange anything.

I don't why everything is ok now...

Topic locked