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.
Thread Tools Display Modes
Old 23rd January 2012, 14:27
ispconfig_question ispconfig_question is offline
Junior Member
Join Date: Jan 2012
Posts: 13
Thanks: 4
Thanked 0 Times in 0 Posts
Default How to use php_value at place of php_admin_value?

I'm using ISPconfig 3 for webserver management. I noticed the PHP scripts are unable to set session.save_path and several other ini values. After a little searching I found out it is caused by ISPconfig settings in the vhost Apache configuration file. ISPconfig sets different session.save_path for each website. Up to this point, everything is OK. But ISPconfig uses Apache directive php_admin_value to set the PHP config value, which disallows further changes in .htaccess or runtime. I don't want to limit the scripts in setting their own session.save_path, so settings this by php_value directive (at place of php_admin_value) would be perfect for me.

Is there any way how to set ISPconfig to use php_value at place of php_admin_value for certain ini settings? If not, what can I expect if I change the .vhost Apache config file generated by ISPconfig? Will it break ISPconfig's ability to set up this website? Or will it get overwritten each time I change anything in ISPconfig for this website?
Reply With Quote
Sponsored Links
Old 23rd January 2012, 15:00
till till is offline
Super Moderator
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts

If you use mod_php, then you can set these values in the apache directives field of the website settings, if you use php cgi, fcgi or suphp, then you can use the custom php.ini field. Thats all described in the ISPConfig manual by the way.
Till Brehm
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Old 23rd January 2012, 22:40
ispconfig_question ispconfig_question is offline
Junior Member
Join Date: Jan 2012
Posts: 13
Thanks: 4
Thanked 0 Times in 0 Posts

Thanks for the answer. I have a slight suspicion it's not an answer to what I was asking (I didn't want the admin to be able to change the settings, but the script itself to be able to change the settings by ini_set), but nevertheless it worked.

So just for record if someone else searches for the solution of same problem:
- ISPconfig creates Apache conf file for each website and in this conf file it places php_admin_value to set php config values of open_basedir, session.save_path and several others
- due use of php_admin_value Apache directive, the user is unable to change these settings in .htaccess or runtime (using ini_set), he must ask admin to change it (which means for example that runtime decision in the script is impossible)
- you cannot stop ISPconfig from generating conf files this way, however you can add new Apache directive (in ISPconfig Sites section, on a site's Options tab) "php_value session.save_path xxx" (where xxx is the same value as ISPconfig has created)
- at this point you have a conf file for this website containing
php_admin_value session.save_path xxx
php_value session.save_path xxx
- now php_value takes precedence over php_admin_value and effectively removes the limits imposed by php_admin_value - and you can set session.save_path by ini_set in your php scripts.

Please note that even though this seems to work (on PHP 5.3.2), I haven't found any documentation about it so this might be changed in next version or even considered a bug (which wouldn't surprise me, as having "weaker" directive php_value to take precedence over "stronger" directive php_admin_value looks a bit strange to me).
Reply With Quote
Old 24th January 2012, 23:19
ispconfig_question ispconfig_question is offline
Junior Member
Join Date: Jan 2012
Posts: 13
Thanks: 4
Thanked 0 Times in 0 Posts

In case anybody's interested: the answer to my original question (how to replace php_admin_value by php_value) is /usr/local/ispconfig/server/conf/vhost.conf.master (on CentOS 6, perhaps might be located elsewhere on different distros). This file seems to be a template used by ISPconfig when constructing Apache conf file for each website. I have modified it and it seems to work and to have no unwanted side-effect. This seems to me to be "cleaner" approach than having both php_admin_value and php_value for the same config var in the conf file.
I hope this information might help somebody. In case I'm wrong about it, please someone correct me.

Last edited by ispconfig_question; 24th January 2012 at 23:22.
Reply With Quote


apache, php, php_admin_value, session.save_path, vhost

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
atmail in place of Squirrelmail sellotape General 7 7th December 2010 02:03
appropriate place for software so that all user can have access it linux.ab HOWTO-Related Questions 0 20th February 2010 20:29
How do I install in the correct place a dictionary in fatdog puppy. ex-para HOWTO-Related Questions 0 27th May 2009 22:00
ldconfig deferred procesing now taking place unsichtbare Installation/Configuration 1 5th March 2009 20:47
best place to change the number of returned results? greeblesnort General 5 20th December 2007 00:41

All times are GMT +2. The time now is 21:29.

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