• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Nginx PHP5-FPM Restart Fix Note For Ubuntu (HP Cloud)

By Abhishek Ghosh September 19, 2015 9:21 am Updated on September 19, 2015

Nginx PHP5-FPM Restart Fix Note For Ubuntu (HP Cloud)

Advertisement

PHP5-FPM Restart Can Be Fixed on Ubuntu in 2 Ways. Our Famous Nginx PHP5-FPM Restart Fix Needs a Note For Ubuntu Instances on HP Cloud. We have forgotten how we fixed the issue, but our uploading the fix to Github seems to be useful for the users. We are elaborating the issue along with our fix and alternative method.

 

Nginx PHP5-FPM Restart Fix Note For Ubuntu : Problem Scenario

 

The user installed PHP5-FPM. Then changed some basic settings around php.ini or installed some dependent packages. Upon running service php5-fpm restart, the server will not take restart and throw “stop: Unknown instance” error.
Upon reboot, PHP5-FPM may fail to start again. It is pathetic & not intentionally created. Running tail -f /var/log/php5-fpm.log& returns no significant issue.

 

Nginx PHP5-FPM Restart Fix Note For Ubuntu : Our Way of Fix

 

Here is our full Github project to fix the Ngnx PHP5-FPM Restart Issue. As you can see, it is licensed under GNU GENERAL PUBLIC LICENSE, that means it is a Free Software.

Advertisement

---

Problem creating file is :

Vim
1
/etc/init/php-fpm.conf

cd to /etc/init/ and do a ls to check the file name. The filename can be different (php-fpm or php5-fpm). cd to /etc/init/ and find the file named php-fpm.conf or php5-fpm.conf, run a cat to see the content and find the lines :

Vim
1
2
3
4
5
# Precise upstart does not support reload signal, and thus rejects the
# job. We'd rather start the daemon, instead of forcing users to
# reboot https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1272788
#
# reload signal USR2

and uncomment this :

Vim
1
reload signal USR2

on running service php5-fpm restart, you’ll get warning though. Because, of this script :

Vim
1
/etc/init.d/php5-fpm

Open Filezilla, take backup of /etc/init.d/php5-fpm on your computer, delete php5-fpm script from /etc/init.d/ and create a new script :

Vim
1
nano /etc/init.d/php5-fpm

curl or wget this file :

Vim
1
https://raw.githubusercontent.com/AbhishekGhosh/Nginx-PHP5-FPM-Restart-Fix-on-Ubuntu/master/php5-fpm

reboot, PP5-FPM will work fine :)

 

Nginx PHP5-FPM Restart Fix Note For Ubuntu : Alternative Way of Fix

 

On the Ubuntu launchpad forums it is suggested that users may create an /etc/init/php5-fpm.override file with only reload signal USR2 in it instead of editing /etc/init/php5-fpm.conf file. There is no other difference on the rest of the method.

Nginx PHP5-FPM Restart Fix Note For Ubuntu (HP Cloud)

 

Nginx PHP5-FPM Restart Fix Note For Ubuntu : For OS X

 

/usr/local/sbin is your $PATH. Create a new file :

Vim
1
nano /usr/local/etc/php/fpm-restart

copy-paste this :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
 
echo "Custom Script Stopping PHP5-FPM..."
launchctl unload -w ~/Library/LaunchAgents/homebrew-php*.plist
 
echo "Custom Script Starting PHP5-FPM..."
launchctl load -w ~/Library/LaunchAgents/homebrew-php*.plist
 
# alternate file name, use if current does not work :
# homebrew.mxcl.php*.plist
 
echo "PHP5-FPM Restarted!"
exit 0

Now chmod it rightly & symlink it :

Vim
1
2
chmod ug+x /usr/local/etc/php/fpm-restart && cd /usr/local/sbin
ln -s /usr/local/etc/php/fpm-restart

Thats it.

Tagged With php5-fpm restart
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Nginx PHP5-FPM Restart Fix Note For Ubuntu (HP Cloud)

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud

    Here is a Step by Step Guide on Setting Up WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud with All Commands and the Configuration.

  • XCache Admin Page on Nginx-PHP5-FPM (Ubuntu, HP Cloud)

    Here is How to Setup a XCache Admin Page on Nginx-PHP5-FPM on Ubuntu Instance Running on HP Cloud. It Gives a Clear Graphical Idea of Caching.

  • Ubuntu Nginx PHP5-FPM UNIX Socket Configuration

    Some Extra Steps Needed to Perform in Ubuntu for the Right Nginx PHP5-FPM UNIX Socket Configuration. Else You’ll Face Random 502, 504 Error.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy