Skip to content

Commit

Permalink
PHP82 and PHP83 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
Vooperino authored Apr 13, 2024
1 parent 955da52 commit 2f9e568
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Currently includes
* Cron
* Python 3 and 2
* PHP Composer
* Systemd replacer (Python) - *Incase if you want to use Pterodactyl, you will need to use it for the service*
* Systemd replacer (Python) - *Incase if you want to use Pterodactyl or Pelican, you will need to use it for the service*
* Certbot or LetsEncrypt

When using this docker container its best to use docker-compose
Expand Down
14 changes: 9 additions & 5 deletions install/cleanConfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ output() {
echo "Debug: $@"
}

function permissionFixPHP() {
sed -i 's/;listen.mode = 0660/listen.mode = 0666/g' $CLEAN_PATH/config/php/"$1"/fpm/pool.d/www.conf
}

output "Creating Clean Directory"
mkdir -p $CLEAN_PATH/scripts
mkdir -p $CLEAN_PATH/config
Expand All @@ -21,11 +25,11 @@ cp -r -f -v $CONFIG_PATH/* $CLEAN_PATH/config

mkdir $CLEAN_PATH/config/php
cp -r -f -v $PHP_ROOT/* $CLEAN_PATH/config/php
output "Configuring PHP Permissions (Temp bugfix)"
sed -i 's/;listen.mode = 0660/listen.mode = 0666/g' $CLEAN_PATH/config/php/8.1/fpm/pool.d/www.conf
sed -i 's/;listen.mode = 0660/listen.mode = 0666/g' $CLEAN_PATH/config/php/8.0/fpm/pool.d/www.conf
sed -i 's/;listen.mode = 0660/listen.mode = 0666/g' $CLEAN_PATH/config/php/7.4/fpm/pool.d/www.conf

permissionFixPHP "8.3"
permissionFixPHP "8.2"
permissionFixPHP "8.1"
permissionFixPHP "8.0"
permissionFixPHP "7.4"

output "Applying script directory permission!"
chmod 755 -R $CLEAN_PATH/scripts
Expand Down
2 changes: 2 additions & 0 deletions install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ apt-get update
apt-get install -y php7.4 php7.4-{fpm,common,mysql,gmp,curl,intl,mbstring,xmlrpc,gd,xml,cli,zip,soap,imap,sqlite3,bcmath,apcu,zip}
apt-get install -y php8.0 php8.0-{fpm,common,mysql,gmp,curl,intl,mbstring,xmlrpc,gd,xml,cli,zip,soap,imap,sqlite,bcmath,apcu,zip}
apt-get install -y php8.1 php8.1-{fpm,common,mysql,gmp,curl,intl,mbstring,xmlrpc,gd,xml,cli,zip,soap,imap,sqlite,bcmath,apcu,zip}
apt-get install -y php8.2 php8.2-{fpm,common,mysql,gmp,curl,intl,mbstring,xmlrpc,gd,xml,cli,zip,soap,imap,sqlite,bcmath,apcu,zip}
apt-get install -y php8.3 php8.3-{fpm,common,mysql,gmp,curl,intl,mbstring,xmlrpc,gd,xml,cli,zip,soap,imap,sqlite,bcmath,apcu,zip}

curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

Expand Down
16 changes: 16 additions & 0 deletions nginx-build/config/nginx/php82_fastcgi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 404
try_files $fastcgi_script_name =404;

# default fastcgi_params
include fastcgi_params;

# fastcgi settings
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_index index.php;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;

# fastcgi params
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$base/:/usr/lib/php/:/tmp/";
16 changes: 16 additions & 0 deletions nginx-build/config/nginx/php83_fastcgi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 404
try_files $fastcgi_script_name =404;

# default fastcgi_params
include fastcgi_params;

# fastcgi settings
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
fastcgi_index index.php;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;

# fastcgi params
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$base/:/usr/lib/php/:/tmp/";
2 changes: 2 additions & 0 deletions nginx-build/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ service nginx start
service php7.4-fpm start
service php8.0-fpm start
service php8.1-fpm start
service php8.2-fpm start
service php8.3-fpm start
service cron start

if checkFile $crontab_file; then
Expand Down
16 changes: 16 additions & 0 deletions openresty-build/config/openresty/php82_fastcgi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 404
try_files $fastcgi_script_name =404;

# default fastcgi_params
include fastcgi_params;

# fastcgi settings
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_index index.php;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;

# fastcgi params
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$base/:/usr/lib/php/:/tmp/";
16 changes: 16 additions & 0 deletions openresty-build/config/openresty/php83_fastcgi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 404
try_files $fastcgi_script_name =404;

# default fastcgi_params
include fastcgi_params;

# fastcgi settings
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
fastcgi_index index.php;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;

# fastcgi params
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$base/:/usr/lib/php/:/tmp/";
2 changes: 2 additions & 0 deletions openresty-build/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ sysctl start openresty
service php7.4-fpm start
service php8.0-fpm start
service php8.1-fpm start
service php8.2-fpm start
service php8.3-fpm start
service cron start

if checkFile $crontab_file; then
Expand Down

0 comments on commit 2f9e568

Please sign in to comment.