• 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

This Article Has Been Shared 596 Times!

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 PHP5-FPM WordPress : Major Tweaks

    Here is a Short Yet More Than Enough Guide For the Most To Tweak Nginx PHP5-FPM WordPress Setup Running on Ubuntu 14.04 on Rackspace Cloud Server.

  • HHVM WordPress (Nginx Ubuntu Server) Tweaks

    Here are some special HHVM Wordpress (Nginx Ubuntu Server) Tweaks for Page Speed optimization, Compatibility of WordPress Themes and Plugins.

  • Steps To Install Nginx Plus on Ubuntu Server (HP Cloud)

    Here Are the Steps To Install Nginx Plus on Ubuntu Server Running on HP Cloud. Nginx Plus is the Paid Version of Nginx with Extra Features.

  • Zend Opcache Optimization for Nginx Ubuntu (HP Cloud)

    Here is Full Guide to Zend Opcache Optimization for Nginx PHP5-FPM for Ubuntu Server Running on HP Cloud. We Suggest to Use Zend Opcache over APC.

  • Nginx Cache Purge Module For fastcgi_cache WordPress

    Nginx Plus by Default Supports Cache Purging. Nginx Cache Purge Module For fastcgi_cache Exists Can Be Used For Community Edition of Nginx.

Additionally, 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 (22.1K 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

  • Types of Blackjack Variants: Discover the Different Versions of the Game May 23, 2022
  • How Cloud, Robotics And Sensor Technologies Are Changing The Business Landscape May 23, 2022
  • Modernizing Your Business With a Hybrid Cloud Strategy May 22, 2022
  • Big Data in Sports May 20, 2022
  • FaaS Versus PaaS Deployment: What You Should Know May 18, 2022

About This Article

Cite this article as: Abhishek Ghosh, "Nginx PHP5-FPM Restart Fix Note For Ubuntu (HP Cloud)," in The Customize Windows, September 19, 2015, May 24, 2022, https://thecustomizewindows.com/2015/09/nginx-php5-fpm-restart-fix-note-for-ubuntu-hp-cloud/.

Source:The Customize Windows, JiMA.in

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Privacy Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

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

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