HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   A bug with Mod-PHP and Custom php.ini settings (http://www.howtoforge.com/forums/showthread.php?t=51617)

autogun 25th February 2011 02:04

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

mike_p 25th February 2011 11:15

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?

till 25th February 2011 13:29

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.

autogun 25th February 2011 14:25

Quote:

Originally Posted by till (Post 252112)
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!


All times are GMT +2. The time now is 09:13.

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