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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th February 2011, 01:04
autogun autogun is offline
Member
 
Join Date: Sep 2009
Posts: 69
Thanks: 9
Thanked 5 Times in 5 Posts
Default A bug with Mod-PHP and Custom php.ini settings

Hi,

A website Im hosting is running on Mod-PHP.
I've tried adding "memory_limit = 256M" to custom php.ini settings under Options tab.
This exactly configuration worked on Fast-CGI running website.

After checking website.com.vhost file, I noticed:
Code:
# mod_php enabled
...
# PHPIniDir /var/www/conf/web9
Which was still commented out

Did another change to this website using the control panel, just to make sure new configuration is applied, .vhost file changed its time stamp but PHPIniDir left commented out.

Manually removed the comment, reloaded apache and it worked! Did another change to the website using control panel, waited 1min and the comment was back on

Running Debian 5.0.7
ISPConfig 3.0.3.2
Reply With Quote
Sponsored Links
  #2  
Old 25th February 2011, 10:15
mike_p mike_p is offline
Senior Member
 
Join Date: Mar 2010
Location: Surrey, England
Posts: 140
Thanks: 9
Thanked 28 Times in 17 Posts
Default

Yes, it does appear to have the '#' in /usr/local/ispconfig/server/conf/vhost.conf.master
Perhaps that has been left in by accident after testing?
Reply With Quote
  #3  
Old 25th February 2011, 12:29
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Thats no bug. It is intended that the line is commented out as this kind of configuration does not work for mod_php when you have more then one vhost on a server that has this configuration line in the vhost file. If this line is active in a second vhost, then apache will not start anymore. The reason for that is simple, php can load only one configuration per process, as all websites with mod_php share the same process, there can only be one php.ini for all mod_php websites.

The custom php.ini settings are only for php-cgi, php-fcgi and suphp as explained in the manual, chapter 4.6.1.1. For mod_php, use the php_admin_flag and php_value options of the mod_php module in the apache directives field.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 25th February 2011, 13:25
autogun autogun is offline
Member
 
Join Date: Sep 2009
Posts: 69
Thanks: 9
Thanked 5 Times in 5 Posts
Default

Quote:
Originally Posted by till View Post
Thats no bug. It is intended that the line is commented out as this kind of configuration does not work for mod_php when you have more then one vhost on a server that has this configuration line in the vhost file. If this line is active in a second vhost, then apache will not start anymore. The reason for that is simple, php can load only one configuration per process, as all websites with mod_php share the same process, there can only be one php.ini for all mod_php websites.

The custom php.ini settings are only for php-cgi, php-fcgi and suphp as explained in the manual, chapter 4.6.1.1. For mod_php, use the php_admin_flag and php_value options of the mod_php module in the apache directives field.
Hello till,

Thank you very much for clarifying this to me, I know this is my fault - not reading the manual.

Just a little suggestion, there is plenty of space under the "Custom php.ini settings" where this can be pointed out. Something like "Works only with php-cgi, php-fcgi and suphp - refer to the manual for more info" or something alike.

Thanks again!
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
mod-PHP and custom php settings restricted... radim_h Tips/Tricks/Mods 2 30th January 2011 21:47
Site Directives and Custom php.ini GoremanX Installation/Configuration 14 1st May 2010 18:31
Custom PHP.ini for ISPC3 with Suphp and FastCGI ethanlifka Tips/Tricks/Mods 0 7th March 2010 03:14
Custom crontab running clients PHP file Thomas Jensen General 1 30th August 2009 13:49
Provide a path for custom php.ini with php-fcgi oncletom Feature Requests 1 11th May 2009 13:21


All times are GMT +2. The time now is 11:23.


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