SF.net SVN: gar:[25421] csw/mgar/pkg/php5/branches/php-5.6.x/files/ CSWap24-modphp5.postinstall
cgrzemba at users.sourceforge.net
cgrzemba at users.sourceforge.net
Mon Nov 30 11:26:34 CET 2015
Revision: 25421
http://sourceforge.net/p/gar/code/25421
Author: cgrzemba
Date: 2015-11-30 10:26:33 +0000 (Mon, 30 Nov 2015)
Log Message:
-----------
php5/branches/php-5.6.x: add prefork MPM selection in CSWap24_modphp5.postinstall
Modified Paths:
--------------
csw/mgar/pkg/php5/branches/php-5.6.x/files/CSWap24-modphp5.postinstall
Modified: csw/mgar/pkg/php5/branches/php-5.6.x/files/CSWap24-modphp5.postinstall
===================================================================
--- csw/mgar/pkg/php5/branches/php-5.6.x/files/CSWap24-modphp5.postinstall 2015-11-29 22:51:39 UTC (rev 25420)
+++ csw/mgar/pkg/php5/branches/php-5.6.x/files/CSWap24-modphp5.postinstall 2015-11-30 10:26:33 UTC (rev 25421)
@@ -2,7 +2,7 @@
AP2_CONFIG=$CSW_PREFIX/apache2/httpd.conf
AP2_MODULE=$CSW_PREFIX/apache2/extra/modules.load
-Configure mod_php5 in httpd.conf
+# Configure mod_php5 in httpd.conf
if [ -n "`egrep 'IfModule (mod_php|php_module)' $AP2_CONFIG`" ] ; then
echo "Existing mod_php5 configuration detected"
elif [ -n "`egrep '#Include extra/httpd-php5.conf' $AP2_CONFIG`" ]; then
@@ -17,18 +17,22 @@
fi
if [ -n "`egrep 'LoadModule php5_module' $AP2_MODULE`" ] ; then
- perl -i -plne 's,^#(LoadModule php5.*),$1,' $AP2_MODULE
+ perl -i -plne 's,^#[ ]*(LoadModule php5.*),$1,' $AP2_MODULE
else
echo "Adding LoadModule php5_module for extra/modules.load"
cat << END >> $AP2_MODULE
LoadModule php5_module lib/apache2/modules/libphp5.so
END
fi
+# PHP5 needs prefork MPM
+perl -i -plne 's,^#[ ]*(LoadModule mpm_prefork_module*),$1,' $AP2_MODULE
+perl -i -plne 's,^(LoadModule mpm_event_module*),#$1,' $AP2_MODULE
+perl -i -plne 's,^(LoadModule mpm_worker_module*),#$1,' $AP2_MODULE
# Finito
cat <<END
-NOTICE: php5_module is enabled in httpd.conf but the server was not restarted.
+NOTICE: php5_module and prefork MPM is enabled in httpd.conf, extra/modules.load but the server was not restarted.
Please examine your php5 configuration and restart apache.
END
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list