Done because differences between distros is quite big, and this was the beter solution then using alot of if statements List of changes: * Replaced service names php"$phpver"-fpm with $phpFPMService * Replaced PHPver in package list with phpPkgName * Replaced full php config path with $phpMainConf * Replaced php pool path with $phpPoolDir
18 lines
953 B
Bash
18 lines
953 B
Bash
systemctl stop $phpFPMService
|
|
###############
|
|
# PHP-FPM #
|
|
###############
|
|
|
|
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' "$phpMainConf"
|
|
sed -i 's/;opcache.memory_consumption=128/opcache.memory_consumption=256/g' "$phpMainConf"
|
|
sed -i 's/;opcache.enable=1/opcache.enable=1/g' "$phpMainConf"
|
|
sed -i 's/;opcache.interned_strings_buffer=8/opcache.interned_strings_buffer=8/g' "$phpMainConf"
|
|
sed -i 's/;opcache.max_accelerated_files=10000/opcache.max_accelerated_files=50000/g' "$phpMainConf"
|
|
sed -i 's/;opcache.max_wasted_percentage=5/opcache.max_wasted_percentage=5/g' "$phpMainConf"
|
|
sed -i 's/;opcache.revalidate_freq=2/opcache.revalidate_freq=0/g' "$phpMainConf"
|
|
sed -i 's/; max_input_vars = 1000/max_input_vars = 10000/g' "$phpMainConf"
|
|
sed -i 's/upload_max_filesize = 2/upload_max_filesize = 128/g' "$phpMainConf"
|
|
sed -i 's/post_max_size = 8/post_max_size = 64/g' "$phpMainConf"
|
|
|
|
systemctl start $phpFPMService
|
|
systemctl enable $phpFPMService |