3 ms·
Yeah, but easily switching between specific version of PHP, MySQL, Node.js, etc, without messing with /usr/local/bin and brew while having full speed disk acces
by tambourine_man 4y ago
Yeah, but easily switching between specific version of PHP, MySQL, Node.js, etc, without messing with /usr/local/bin and brew while having full speed disk access goes a long way.
I could probably get by with the chroot support that macOS has, but I never manage to find the motivation.
- duskwuff 4y agoYou can install multiple versions of PHP and Node alongside each other just fine using Homebrew: brew install php@7.2 php@7.3 php@7.4 php@8.0 php@8.1 # and soon php@8.2 brew install node@18 node@16 node@14 node@12 node@10
- jbverschoor 4y agoor just use asdf
- tambourine_man 4y agoI wasn't aware of it, thanks. I'm not it's exactly what I want though. Can it easily start and stop daemons? Can it assign different ports to different versions?
- tambourine_man 4y agoInstalling multiple versions is solved, changing the environment easily, not so much, I think
- Cyberdog 4y agoI'm not sure of the specifics with Homebrew, but with MacPorts, I have both PHP 7.4 and 8.1 running via FPM and serving sites rather trivially. The basics: Install both php74-fpm and php81-fpm, configure the former to put its socket at /var/run/php74-fpm.sock and the latter at /var/run/php81-fpm.sock, configure nginx's domain-specific config files to look for the FastCGI socket that the respective path, use MacPorts to load both daemons, and away you go. I imagine a similar approach would be possible with Homebrew.
- tambourine_man 4y agoI edit Apache’s config files and reload it every time, but I’m not pleased with that solution.
- Cyberdog 4y agoIs there not a way in Apache to specify a different path for the FastCGI socket based on the domain name? It's been a long time since I've used Apache but I'd be surprised if the functionality wasn't somewhere in its inscrutable config file syntax.
- tambourine_man 4y agoThat’s a really cool idea, never though of that. I’ll investigate, thanks! Sorry for the late reply.
- chrisseaton 4y agoMost people don't want to install and uninstall software at the system-level like that. They'd rather have nicely isolated disposable containers for individual projects.