By octoxan
Hello all,
We recently updated to php 5.6 on a Ubuntu 14.04 LEMP stack to meet a dependency requirement and after doing this our server can no longer find phpmyadmin.
The nginx error log states…
*7225 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 147.0.179.114, server: localhost, request: “GET /phpmyadmin/ HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php5-fpm.sock:”
I know it’s probably because it needs to use php5.6-fpm.sock now, but I can’t find where to change that at?
I’ve already updated nginx sites-available and sites-enabled config file.
Any ideas?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Using /var/run/php5-fpm.sock isn’t required and you can swap back over to TCP quickly and easily.
First thing we need to do is login to SSH as root or your sudo user and then navigate to:
cd /etc/php/5.6/fpm/pool.d
You’ll see a file named ``www.conf```. That’s the file we need to modify, so go ahead and open it:
nano www.conf
Now we need to find the line that looks like this:
listen = /run/php/php5.6-fpm.sock
Change that line to read:
listen = 127.0.0.1:9000
Then restart php-fpm using:
service php5.6-fpm restart
The only time this won’t work is if NGINX is configured to route PHP requests to another port, such as 9001, 9002, etc. This is possible, so if the above doesn’t work, don’t worry, we just need to do a little more investigating.
You’d want to browse over to /etc/nginx and look in sites-available for your NGINX server block configuration file, open it and find the location block that handles your PHP requests and see what the port is there.
cd /etc/nginx/sites-available
Once you have the port that is set in one of the configuration files for your site, simply copy that port to the above PHP-FPM configuration. In most cases, 9000 is the default, but in rare cases, some pre-configurations use another.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.