PHP FAST CGI - Works for new accounts, when updating old accounts uses wrong php cli location

PHP FAST CGI - Works for new accounts, when updating old accounts uses wrong php cli location.

For old accounts which get set to Fast CGI, /home/user/fcgi-bin/php/fcgi.cgi says /usr/bin/php5 which does not work. For new accounts it references php5-cli which does work.

Kind regards,

Curtis

Status: 
Closed (fixed)

Comments

Hi Curtis -- that's an unusual issue! Which Virtualmin version are you using there?

Does it help if you switch to mod_php mode for one of the old domains, then back to fcgid again?

I am using the latest (3.85). I did try switching to mod_php and back but that did not fix it.

In the end I had to chattr -i fcgi.cgi edit fcgi.cgi to say php5-cli ;chattr +i fcgi.cgi

Thank you for the quick response by the way.

Ok, I see the issue now .. Virtualmin will never use php-cgi , only php-cgi which is typically for binary for CGI use. Do you have php-cgi on your system? If not, there is probably another package you need to install ..

I have php-cgi/php5-cgi it was from the php5-cgi ubuntu package.

"will never use php-cgi , only php-cgi" The problem was it says just php5?

I have php-cgi/php5-cgi it was from the php5-cgi ubuntu package.

"will never use php-cgi , only php-cgi" The problem was it says just php5?

Sorry, what I meant to write is that Virtualmin will use php-cgi if installed, and fall back to php otherwise. It will never use php-cli , as that usually doesn't work in CGI or fCGId scripts..

Sorry I meant /usr/bin/php5-cgi not php5-cli earlier. I just realised my mistake!

Ok .. so is virtualmin doing the right thing now for new domains (using php5-cgi if installed) ?

Ok .. so is virtualmin doing the right thing now for new domains (using php5-cgi if installed) ?

It does the correct thing for new domains yes.

It is not working when editing an existing domain.

So for an existing domain that it fails for, does it help if you switch to mod_php mode, delete the fcgi-bin/*php* files, then switch back to fcgid mode?

Hi Jamie,

Not sure what happened but it seems to switch over fine now. I did update before trying so I am not sure if maybe anything changed in 3.86 fixed it.

Ok, great! I don't think anything changed in this area in 3.86 though..