Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th May 2014, 20:10
cbj4074 cbj4074 is offline
Senior Member
 
Join Date: Nov 2010
Posts: 392
Thanks: 29
Thanked 58 Times in 50 Posts
Default Preferred method for setting vhost-specific php.ini defaults while allowing override

I'm not sure if this is a new behavior or not, and it makes sense, but I noticed that when I enter custom php.ini configuration directives for a website, in the ISPConfig interface, the directives are written to the site's PHP-FPM pool configuration file with the php_admin_ prefix.

For example, if I enter the following in the site's "Custom php.ini settings" field

Code:
display_errors=On
the following results in /etc/php5/fpm/pool.d/web1.conf:

Code:
php_admin_flag[display_errors] = On
Does this occur because the "admin" account created the website in question? Or is that irrelevant here?

If so, what is the preferred method for specifying custom php.ini directives such that they are not prepended with php_admin_?

I ask because I need to allow site-owners/end-users to override certain php.ini defaults at run-time (for example, via the error_reporting() function).

Thanks for any help. ISPConfig 3.0.5.4p1 with nginx-1.1.19 and PHP-FPM.
Reply With Quote
Sponsored Links
  #2  
Old 13th May 2014, 19:37
cbj4074 cbj4074 is offline
Senior Member
 
Join Date: Nov 2010
Posts: 392
Thanks: 29
Thanked 58 Times in 50 Posts
Default

I hate to bump the thread, but this is an important issue.

If nobody has a definitive answer, I'll open an issue on the Bug Tracker, which, again, I hate to do if this is not a "bug".

Thanks for any insight.
Reply With Quote
  #3  
Old 13th May 2014, 19:49
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,202
Thanks: 829
Thanked 5,420 Times in 4,262 Posts
Default

php directives that you add in the custom php.ini field in ispconfig are stored as php_admin_flag[] to ensure that they can not be overridden by a user. So what you decsribe is the intended behaviour of this function and not a bug. If users would be able to override the php.ini settings themself, theny they could extend their limits that the administrator has set for their site which should not be possible.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
cbj4074 (13th May 2014)
  #4  
Old 13th May 2014, 20:33
cbj4074 cbj4074 is offline
Senior Member
 
Join Date: Nov 2010
Posts: 392
Thanks: 29
Thanked 58 Times in 50 Posts
 
Default

Thanks, Till. Your explanation as to why the client should not be able to override these values makes sense. I just wanted to be sure that the behavior is intentional.

I simply set the default value in the main php.ini (for example, /etc/php5/conf.d/zzz-my-customzations.ini) and removed the desired default error-reporting level from the client's ISPConfig website.

The end-result is that the client can override any setting that can be defined at run-time, unless I have explicitly set a value that I do not want to be overridden in the client's ISPConfig Website settings.

This gets me to where I want to be. Thanks for clarifying, Till.
Reply With Quote
Reply

Bookmarks

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
Swap squirrelmail for Roundcube Aerobaticrug Plugins/Modules/Addons 10 26th February 2014 15:32
ISPConfig 3.0.3.3 Autoresponder, adding subdomain problem BlackHat Installation/Configuration 4 18th October 2011 14:24


All times are GMT +2. The time now is 12:39.


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