Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 3rd December 2011, 12:47
talkingnews talkingnews is offline
Join Date: Jan 2011
Posts: 67
Thanks: 15
Thanked 6 Times in 6 Posts
Default ISPconfig Nginx - php5-fpm requires manual restart to "take" values.

Ubunutu 11.10
Niginx 1.0.10
php5-fpm 5.3.8

Everything's been working perfectly for days, but I need to make a config change to the php.ini. Specifically, I need to work out why a login page is doing an endless redirect loop in nginx, where it worked fine in Apache (.htaccess is not relevant here).

Here's what I put in the php.ini config section in ISPC:

date.timezone = "UTC"
error_reporting = "E_ALL";
display_errors = On
display_startup_errors = Off
log_errors = On
ignore_repeated_errors = Off
ignore_repeated_source = Off
error_log = error_log
post_max_size = 28M
session.gc_maxlifetime = 604800
upload_max_filesize = 28M
and here's what appears in the php5 pool.d/web1.conf file:

php_admin_value[date.timezone] = "UTC"
php_admin_value[error_reporting] = "E_ALL"\;
php_admin_flag[display_errors] = off
php_admin_flag[display_startup_errors] = off
php_admin_flag[log_errors] = off
php_admin_flag[ignore_repeated_errors] = off
php_admin_flag[ignore_repeated_source] = off
php_admin_value[error_log] = error_log
php_admin_value[post_max_size] = 28M
php_admin_value[session.gc_maxlifetime] = 604800
php_admin_value[upload_max_filesize] = 28M
Notice how the "on" has become "off" and the case changed?

But more than that, it doesn't restart php5-fpm, so those values don't "take".
By going into a shell and issuing "service php5-fpm restart", then it works.

If I manually make than change in the file, then it WILL stick, but then of course it's out of synch with ISPC control panel, so as soon as I make another change, it gets overwritten. Phew!

But I also noticed when I restart php5-fpm after making a change, or leaving it for a few minutes, that it takes about 30 seconds to restart. But when I do it straight after the restart, it's instant. I watched free and top in another window, and it wasn't running out of memory.

In case it matters, following multiple articles about managing fpm on vps with limited memory, I made the following changes in ISPC which look like this in the log:

pm = dynamic
pm.max_children = 4
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 2
This is actually perfectly adequate for my needs, and greatly reduced the fpm footprint - I only have 2 sites anyway.

And finally.... phpinfo says the error log is in /usr/error_log - seeing as I've got reporting turned to "all", and when I put it to display errors I get loads, I'm surprised to see the error log doesn't even exist.
Reply With Quote
Sponsored Links
Old 4th December 2011, 23:32
falko falko is offline
Super Moderator
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts

I've seen this problem (the slow PHP-FPM restart) on Ubuntu 11.10 myself - I'm not sure why. It works on 11.04 as well as the other distributions I tested (OpenSUSE 11.4, CentOS 6.0, Fedora 15).

My overall impression is that 11.10 is a bit buggy - see this problem for example: http://www.howtoforge.com/ubuntu-11....nism-available
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Old 17th August 2012, 19:31
bkraul bkraul is offline
Junior Member
Join Date: Aug 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Cool php flags.

I know it has been a while, but I have had this same issue with flags being turned off even though I specify them as on. I did a lot of checking and testing, and it seems it has to do with the way the ISPConfig parser takes in the "php.ini" value and converts it into a php_admin_value[var] = value.

It seems that if it has no double quotes (if it is not text), and it is not a number, it assumes it is a boolean value and must evaluate in a specific way. In terms of boolean interpretation, it is my guess that "on/off" means nothing to the parser, therefore it will always evaluate as false, which means "Off".

I finally figured out that if you enter the value on the "Custom php.ini directives" as for example:

display_errors = true
The parser will then write the conf file as:

php_admin_value[display_errors] = true
which will translate as "On" for all purposes and the change will take place. I hope this can still help someone.
Reply With Quote


fpm, nginx, php-fpm

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig fresh instalation - email tab is empty artur_gib Installation/Configuration 14 28th January 2014 20:02
ISPConfig and bind9 pjanzen General 8 13th March 2012 10:34
Ubuntu 11.10, ISPConfig needs some nginx.conf tweaks after following guide. talkingnews Installation/Configuration 10 28th November 2011 22:55
Nginx doesn´t restart after installation of ISPConfig 3 cyprus Installation/Configuration 2 6th November 2011 19:48
Loads of mysql connections to dbispconfig StrikerNL General 2 5th March 2009 15:31

All times are GMT +2. The time now is 03:37.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.