Comments (6)
Thanks for this report, @nymous!
What is your config.php
?
Instead of editing core file, you should prefer using the config file.
The one distributed with the Docker image is written to respect environnement variables.
from images.
I didn't change the config.php
from the Docker image, that isn't the issue here.
Environment variables are respected, but they are retrieved as strings, which in YOURLS code are compared to a boolean. In PHP, the string "false"
is truthy.
My patch forces YOURLS to convert the constant value to the corresponding boolean, whether this value is already a boolean or a string.
That being said, maybe this isn't YOURLS responsibility to handle this better, maybe the maintainers from the Docker image should patch it, as it works if the config file is edited manually to enter a boolean value...
from images.
Wait, did I really create this issue in the Docker repository? Woops, it was supposed to go to the YOURLS source repository, sorry! 😅
from images.
Wait, did I really create this issue in the Docker repository?
No, I moved it, the issue does not target YOURLS itself but its usage inside the docker image.
Environment variables are respected, but they are retrieved as strings, which in YOURLS code are compared to a boolean. In PHP, the string
"false"
is truthy
OK, got it now.
What about fixing this on the PHP constants in the config.php
directly?
from images.
Oh, right. Thought I lost my mind for a second ^^
Well, adding this filter in the config file seems like a better idea. Not sure if there is any other variable that would be affected by the same issue.
from images.
Agreed. I think this is the case for all boolean variables.
Would you aim opening a pull request with the fix? 👍
from images.
Related Issues (20)
- Dependency Dashboard
- docker container doesn't start after resetting the container HOT 7
- Images on dockerhub and github registry not the same HOT 2
- Setting environment variables to falsy values (0, empty string, etc) reverts to default value HOT 1
- config.php belongs to user root by default: Could not auto-encrypt passwords. Error was: "cannot write file". HOT 2
- Docker data not persisted HOT 6
- "&" in the password bricks the config file (docker) HOT 8
- Old logo on Docker Hub HOT 1
- Error setting `USER` in `Dockerfile` HOT 4
- docker update HOT 1
- Latest Github Expiry plugin not working with latest version of YOURLS HOT 1
- Automatic inclusion of plugin-specific configuration HOT 1
- Volume in docker-compose.yml HOT 2
- Diverts to `install.php` after pulling latest image HOT 5
- Latest `fpm-alpine` image is broken HOT 2
- White screen with 1.8 image
- White screen with 1.8 using docker HOT 19
- It seems something wrong with your demo yml configs ? HOT 2
- Docker setup doesn't work at all HOT 3
- Mysqli with SSL is broken HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from images.