summaryrefslogtreecommitdiff
path: root/GlobalConfig.md
diff options
context:
space:
mode:
authorfox <[email protected]>2021-02-24 08:12:31 +0300
committerfox <[email protected]>2021-02-24 08:12:31 +0300
commit2c02075d85978ae3006dd1b04a8085ce181c7318 (patch)
tree9657b3a9b6f77e76d32f74b71e2360452c036aa6 /GlobalConfig.md
parent845c5265ca33b8fa5a609e1ccf6db13ad0c03a27 (diff)
Update 'GlobalConfig'
Diffstat (limited to 'GlobalConfig.md')
-rw-r--r--GlobalConfig.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/GlobalConfig.md b/GlobalConfig.md
index 6cda783..b08da74 100644
--- a/GlobalConfig.md
+++ b/GlobalConfig.md
@@ -16,6 +16,22 @@ Plugin-required constants also go here, using `define()`:
define('LEGACY_CONSTANT', 'value');
```
+To set evaluated values to `putenv()` you have to get them evaluated by PHP, this would work:
+
+```php
+putenv('TTRSS_SESSION_COOKIE_LIFETIME='.(86400*30));
+```
+
+And both of those won't give you expected results:
+
+```php
+putenv("TTRSS_SESSION_COOKIE_LIFETIME='2592000'");
+# => 0, because '2592000' is an invalid number
+
+putenv(‘TTRSS_SESSION_COOKIE_LIFETIME=86400*30’);
+# => 86400, because expression is not evaluated, so you're just casting a string literal "86400*30" to integer
+```
+
## Migrating from old-style config.php
For any `config.php` settings you have changed from the defaults (normally this is the `DB_` group of settings and `SELF_URL_PATH`, replace as follows: