3 ms·
Why not run phpinfo()? Lists all loaded configuration as well as extensions and their configuration. Basically everything about the runtime environment your in
by tylerjwilk00 7y ago
Why 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.