3 ms·
I could not even begin to consider using PHP again until php.ini is completely eliminated. Not even optionally eliminated, I need to know I won't have to deal w
by jameslk 7y ago
I could not even begin to consider using PHP again until php.ini is completely eliminated. Not even optionally eliminated, I need to know I won't have to deal with a hidden php.ini with all it's configured extensions somewhere on a system before use, surprising me with missing, insecure or completely changed PHP behavior. The fact that I didn't know what features a server supported until I investigated or configured this file was a sinkhole of my productivity in any new project.
- tylerjwilk00 7y agoWhy not run phpinfo()? Lists all loaded configuration as well as extensions and their configuration. Basically everything about the runtime environment your in. Beginner level stuff.
- jameslk 7y agoYes, that was the first thing I had to do when starting a project. Create a file called pi.php that ran that very function and scan pages of configuration looking for a specific key. I would have to do this not once but many times, whenever I thought I was losing my sanity because some random extension wasn't available or the configuration enabled something unpredictable that I only found out about at runtime (e.g. magic quotes was a perfect example).
- gremlinsinc 7y agoyou couldn't just run "php -i | grep xdebug" ? Or even explicitly set/unset the phpini settings from the app in question or even your nginx settings? Lots of ways to ensure everything works as needed. You can also include excensions as requirements in composer so it errors if they aren't installed so you don't forget to install them.
- jameslk 7y agoI spent 10 years in the PHP world and yes I can do all that stuff. I had to do it just to use PHP. Grepping around configs isn't even the problem I'm trying to point out. It's the surprises, and having to do anything at all to prevent these issues.
- gremlinsinc 7y agoreally? Arguably webpack + babel.config.js + eslintrc.js + postcss + typescript config + package.json ... ALL just to be able to get your ui/ux built -- and still the entire stack can fall apart w/ one wrong version, or one wrong babel setting, etc.... JS is way worse than PHP... yet I'm not going to throw it out w/ the bath water. Not to mention all the damn dependencies inside node_modules... Vue and react have some amazing things going for them, once you've got all the tooling setup. But it's still a nightmare config wise that makes php way better. I generally touch php.ini maybe once or twice over the lifetime of an app. Can't say the same about JS tooling/webpack configs.
- abujazar 7y agoYou could just run your app in a container.