Skip to content

Commit a14edf5

Browse files
committed
adding flag to diable opcache
1 parent f3626cb commit a14edf5

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on
1010
### Versioning
1111
| Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version |
1212
|-----|-------|-----|--------|--------|
13-
| latest/2.0.2 | Master Branch |1.21.6 | 8.1.3 | 3.15 |
13+
| latest/2.0.3 | Master Branch |1.21.6 | 8.1.3 | 3.15 |
1414

1515
For other tags please see: [versioning](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/versioning.md)
1616

docs/config_flags.md

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ The following flags are a list of all the currently supported options that can b
2020

2121
| Name | Description |
2222
|-------------------------|----------------------------------------------------------------------------------------------------------------|
23+
| OPcache | Set to 1 to disable opcache (enabled by default)
24+
|
2325
| WEBROOT | Change the default webroot directory from `/var/www/html` to your own setting |
2426
| ERRORS | Set to 1 to display PHP Errors in the browser |
2527
| HIDE_NGINX_HEADERS | Disable by setting to 0, default behaviour is to hide nginx + php version in headers |

docs/versioning.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The latest tag will always follow the master branch in git. the other versions w
1717

1818
| Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | Notes |
1919
|-----|-------|-----|--------|--------|----------|
20+
| 2.0.3 | 8.1.3 |1.21.6 | 3.15 | 0.3.15 | added disable flag for opcache |
2021
| 2.0.2 | 8.1.3 |1.21.6 | 3.15 | 0.3.14 | fix gd and opcache extentions |
2122
| 2.0.1 | 8.1.3 |1.21.6 | 3.15 | 0.3.14 | upgrade to PHP 8.1.3 |
2223
| 2.0.0 | 8.1.2 |1.21.6 | 3.15 | 0.3.14 | upgrade to PHP 8 |

scripts/start.sh

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ if [ ! -z "$PHP_CATCHALL" ]; then
2929
sed -i 's#try_files $uri $uri/ =404;#try_files $uri $uri/ /index.php?$args;#g' /etc/nginx/sites-available/default.conf
3030
fi
3131

32+
# Disable opcache
33+
if [ ! -z "$OPcache" ]; then
34+
sed -i 's#zend_extension=opcache#;zend_extension=opcache#g' /usr/local/etc/php/php.ini
35+
fi
3236

3337
# Setup git variables
3438
if [ ! -z "$GIT_EMAIL" ]; then

0 commit comments

Comments
 (0)