updated php version

This commit is contained in:
Bachir Soussi Chiadmi 2021-11-08 15:53:04 +01:00
parent 443fb016bd
commit 1272de1add
7 changed files with 14 additions and 13 deletions

View File

@ -89,7 +89,7 @@ server {
#fastcgi_param DOCUMENT_ROOT /var/www/enfrancais.fr/api;
# fastcgi_buffer_size 16k;
# fastcgi_buffers 4 16k;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {

View File

@ -116,7 +116,7 @@ server {
fastcgi_intercept_errors on;
# fastcgi_buffer_size 16k;
# fastcgi_buffers 4 16k;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
}
# Fighting with Styles? This little gem is amazing.
# location ~ ^/sites/.*/files/imagecache/ { # For Drupal <= 6

View File

@ -92,7 +92,7 @@ server {
fastcgi_intercept_errors on;
# fastcgi_buffer_size 16k;
# fastcgi_buffers 4 16k;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
}
# Fighting with Styles? This little gem is amazing.
# location ~ ^/sites/.*/files/imagecache/ { # For Drupal <= 6

View File

@ -48,7 +48,7 @@ server {
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@ -24,7 +24,7 @@ server {
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@ -36,7 +36,7 @@ echo -e '\033[35m
/ ____/ __ / ____/
/_/ /_/ /_/_/
\033[0m'
echo -e "\033[35;1mInstalling PHP 7.3 \033[0m"
echo -e "\033[35;1mInstalling PHP 7.4 \033[0m"
sleep 3
# mv: cannot stat '/etc/php/7.0/fpm/php.ini': No such file or directory
@ -45,11 +45,11 @@ sleep 3
# Failed to enable unit: Unit file php7.0-fpm.service does not exist.
# Failed to start php7.0-fpm.service: Unit php7.0-fpm.service not found.
apt-get --yes install php7.3-fpm php7.3-mysql php7.3-opcache php7.3-curl php7.3-mbstring php7.3-zip php7.3-xml php7.3-gd php-memcached php7.3-imagick php7.3-apcu
# php7.3-mcrypt ??
apt-get --yes install php7.4-fpm php7.4-mysql php7.4-opcache php7.4-curl php7.4-mbstring php7.4-zip php7.4-xml php7.4-gd php-memcached php7.4-imagick php7.4-apcu
# php7.4-mcrypt ??
mv /etc/php/7.3/fpm/php.ini /etc/php/7.3/fpm/php.ini.back
cp "$_assets"/php-fpm.ini /etc/php/7.3/fpm/php.ini
mv /etc/php/7.4/fpm/php.ini /etc/php/7.4/fpm/php.ini.back
cp "$_assets"/php7.4-fpm.ini /etc/php/7.4/fpm/php.ini
echo "Configuring PHP"
@ -57,8 +57,8 @@ mkdir /var/log/php
chown www-data /var/log/php
cp "$_assets"/logrotate-php /etc/logrotate.d/php
systemctl enable php7.3-fpm
systemctl start php7.3-fpm
systemctl enable php7.4-fpm
systemctl start php7.4-fpm
# echo "Installing memecached"
# replaced by redis
@ -182,7 +182,7 @@ apt-get --yes install redis-server php-redis
systemctl enable redis-server
systemctl restart redis-server
systemctl restart php7.3-fpm
systemctl restart php7.4-fpm
echo -e "\033[92;1mRedis installed\033[Om"
echo -e '\033[35m

View File

@ -78,6 +78,7 @@ do
read _install_vhost
done
if [ "$_install_vhost" = "yes" ]; then
# TODO bug vhost.sh file does not exists ...
. bin/vhost.sh
else
echo 'no vhost installed'