PHP-FPM - Change my actual fastCGI
-
Dear,
I use you tutorial to install the nginx with fastCGI, but, now, I´d like to change the fastCGI to PHP-FPM. It is possible? It is simple?
Please, help.. With fastCGI, I get 502 error every time..
Tanks
Andre Pavini
Posted 2 years ago # -
hi Andre,
I'm writing up a PHP index of related tutorials right now
.. to swap from FastCGI to php-fpm is on this list. I'll publish it when I've tested the change-over .. I want a solution that has no downtime but, if that's not an issue for you, it should be as simple as:-
sudo aptitude purge [list all the FastCGI_php_applications_here, basically reversing the bulk install command from the FastCGI tut]
reboot.
then just carry out the new guide.
but your 502's .. maybe I can help you with that .. one of the chaps here, Haynes, had a similar issue and solved it with:-
I figured out how to fix it myself.
nano /etc/default/php-fastcgi
Find and Change
This
FCGI_HOST=localhost
to
This
FCGI_HOST=127.0.0.1Posted 2 years ago # -
Oh dear... tried purging the existing PHP instance and have PHP-FPM running, but when wordpress loads I get
"Your PHP installation appears to be missing the MySQL extension which is required by WordPress."
not so sure what to do now!
also, I changed this cp command as I opened a second putty session so wasn't in the correct directory
cp /usr/local/src/php-5.3.0/php.ini-production /etc/php/php.iniPosted 2 years ago # -
seems that PHP is unable to connect to mysql...
Posted 2 years ago # -
have you tried:-
install php5-mysql
else, back up your databases first, just in case, maybe check you get all of them:-
show databases;
then install mysql_server php5-mysql && mysql_secure_installation
.. no?
Posted 2 years ago # -
Hey Guv,
I tried "aptitude install php5-mysql"
but no good. Ended up firing up the old php install command over the top of everything and got the fastcgi wrapper going again. So who knows what's running at the moment!Could be time for a clean install (combined with forum upgrade), is there a way to do that on a seperate linode while keeping the current site live? Would be good to avoid downtime.. if I can get the new site going on a seperate linode with a different url that'd be the easy way out I reckon..
Posted 2 years ago # -
it would be easy enough. i'm playing with Lucid - 10.04 LTS - at home now, but not the server beta yet .. i guess go 8.04 with a view to an upgrade in a couple of months time, when the alpha settles in.
either way, leaving current Linode and ips untouched, build the new and point your local hosts file to the new ip, then test everything there before changing the A records in Linode's DNS Manager for whatever domains to make the IP switch. (and swap your local hosts file back as it was.)
then bin the old Linode.
Posted 2 years ago # -
btw .. nearly forgot, you should check out this cool pic someone sent me, over at:-
PHP BENCHMARKED: PHP-FPM vs Spawn-FCGI vs FastCGI
ciao./
Posted 2 years ago # -
Nice work, I noticed the pic had made it up! If you want the .xls send me an email, I don't have your address.. though could probably guess it
Posted 2 years ago # -
splendid .. send it over, catch-all@whatever will do fine!
Posted 2 years ago # -
Hey guv, you suppose you can tell me what the code to link php-fpm to nginx is cause i've got everything mostly working on my end with it i just don't know how to link the two. I had some free time today and i wanted to get rid of fcgi as i had lots of problems like everyone else has.
Posted 2 years ago # -
Ok i think i got it working mostly except phpmyadmin. Apparently your tutorial wasn't as thorough as you had assumed since the ini file you have us copy has almost everything commented out. That and after installing everything, it seems that phpmyadmin Cannot load mysql extension.
Posted 2 years ago # -
tx Haynes .. yes, hadn't tested MySQL!
Have amended tutorial to allow for this, tested works.
Posted 2 years ago # -
guv you need to add how to compile the php.ini file in the tutorial as it's missing.
Posted 2 years ago # -
no, that's there Haynes. to check it's being recognised:-
/usr/local/bin/php --ini
Posted 2 years ago #
Reply
You must log in to post.
Want HTML?
a blockquote code em strong ul ol liPlace code between backticks `codeHere`
You've got it.
