Upgrade default php version to 8.2

This commit is contained in:
2023-01-21 12:31:57 +01:00
parent c81ef18f5f
commit 21eb38c393
3 changed files with 8 additions and 8 deletions

View File

@ -1531,7 +1531,7 @@ LIBS='-lgpg-error' CXXFLAGS='-O3 -mtune=native -march=native' CFLAGS='-O3 -mtune
make -j $PROC_LIMIT install make -j $PROC_LIMIT install
make distclean make distclean
git reset --hard git reset --hard
ln -fs /usr/bin/php8.1 /usr/bin/php ln -fs /usr/bin/php8.2 /usr/bin/php
cd .. cd ..
ldconfig ldconfig

View File

@ -28,7 +28,7 @@ const ADMIN_PASSWORD='MY_PASSWORD'; //password for admin interface
const SERVICE_INSTANCES=['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's']; //one character per instance - run multiple tor+php-fpm instances for load balancing, remove all but one instance if you expect less than 200 accounts. If tor starts using 100% cpu and failing circuits every few hours after a restart, add more instances. In my experience this happens around 250 hidden services per instance - run setup.php after change const SERVICE_INSTANCES=['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's']; //one character per instance - run multiple tor+php-fpm instances for load balancing, remove all but one instance if you expect less than 200 accounts. If tor starts using 100% cpu and failing circuits every few hours after a restart, add more instances. In my experience this happens around 250 hidden services per instance - run setup.php after change
const DISABLED_PHP_VERSIONS=[]; //php versions still installed on the system but no longer offered for new accounts const DISABLED_PHP_VERSIONS=[]; //php versions still installed on the system but no longer offered for new accounts
const PHP_VERSIONS=[6 => '8.0', 7 => '8.1', 8 => '8.2']; //currently active php versions const PHP_VERSIONS=[6 => '8.0', 7 => '8.1', 8 => '8.2']; //currently active php versions
const DEFAULT_PHP_VERSION='8.1'; //default php version const DEFAULT_PHP_VERSION='8.2'; //default php version
const PHP_CONFIG='zend_extension=opcache.so const PHP_CONFIG='zend_extension=opcache.so
memory_limit = 256M memory_limit = 256M
error_reporting = E_ALL error_reporting = E_ALL
@ -82,7 +82,7 @@ server {
include snippets/fastcgi-php.conf; include snippets/fastcgi-php.conf;
fastcgi_param DOCUMENT_ROOT /html; fastcgi_param DOCUMENT_ROOT /html;
fastcgi_param SCRIPT_FILENAME /html$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME /html$fastcgi_script_name;
fastcgi_pass unix:/var/run/php/8.1-hosting; fastcgi_pass unix:/var/run/php/8.2-hosting;
} }
} }
location /squirrelmail { location /squirrelmail {
@ -90,7 +90,7 @@ server {
include snippets/fastcgi-php.conf; include snippets/fastcgi-php.conf;
fastcgi_param DOCUMENT_ROOT /html; fastcgi_param DOCUMENT_ROOT /html;
fastcgi_param SCRIPT_FILENAME /html$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME /html$fastcgi_script_name;
fastcgi_pass unix:/var/run/php/8.1-squirrelmail; fastcgi_pass unix:/var/run/php/8.2-squirrelmail;
} }
} }
location /phpmyadmin { location /phpmyadmin {
@ -98,7 +98,7 @@ server {
include snippets/fastcgi-php.conf; include snippets/fastcgi-php.conf;
fastcgi_param DOCUMENT_ROOT /html; fastcgi_param DOCUMENT_ROOT /html;
fastcgi_param SCRIPT_FILENAME /html$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME /html$fastcgi_script_name;
fastcgi_pass unix:/run/php/8.1-phpmyadmin; fastcgi_pass unix:/run/php/8.2-phpmyadmin;
} }
} }
location /adminer { location /adminer {
@ -107,7 +107,7 @@ server {
include snippets/fastcgi-php.conf; include snippets/fastcgi-php.conf;
fastcgi_param DOCUMENT_ROOT /html/adminer; fastcgi_param DOCUMENT_ROOT /html/adminer;
fastcgi_param SCRIPT_FILENAME /html/adminer$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME /html/adminer$fastcgi_script_name;
fastcgi_pass unix:/run/php/8.1-adminer; fastcgi_pass unix:/run/php/8.2-adminer;
} }
} }
location /externals/jush/ { location /externals/jush/ {
@ -627,7 +627,7 @@ function rewrite_nginx_config(): void
fastcgi_param MAIL_USER $tmp[system_account]; fastcgi_param MAIL_USER $tmp[system_account];
fastcgi_param DOCUMENT_ROOT /var/www/mail; fastcgi_param DOCUMENT_ROOT /var/www/mail;
fastcgi_param SCRIPT_FILENAME /var/www/mail\$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME /var/www/mail\$fastcgi_script_name;
fastcgi_pass unix:/var/run/php/8.1-mail; fastcgi_pass unix:/var/run/php/8.2-mail;
} }
} }
"; ";

View File

@ -332,4 +332,4 @@ for LIB in /usr/lib/php/*/*.so; do
done done
CHROOT_LIBRARIES CHROOT_LIBRARIES
ldconfig -r $CHROOT_DIRECTORY ldconfig -r $CHROOT_DIRECTORY
ln -f $CHROOT_DIRECTORY/usr/bin/php8.0 $CHROOT_DIRECTORY/usr/bin/php ln -f $CHROOT_DIRECTORY/usr/bin/php8.2 $CHROOT_DIRECTORY/usr/bin/php