Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech Bugs & Fixes 2 years ago
Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
I've been doing alot of research and trying to figure out why I have this "older" version of PHP on my Mac (Snow Leopard). I tried MAMP, and it's cool if you just want a *AMP stack and not much leverage over what you want in regards of configuration means (especially coming from a Unix SysAdmin). I tried XAMPP, which works, but is in the same boat as MAMP. I also went the MacPorts route, which was fine, but I recently uninstalled MacPorts and left it for my new love, HomeBrew.
So, I've installed a custom version of PHP using HomeBrew and it installed the binaries in /usr/local/bin.
After a bit of research it has just come to my attention that Apache (httpd) and PHP are installed by default in Snow Leopard. I've seen different sources say its okay to remove it and others that say just leave it. Coming from a Linux/Unix background, I understand that an easy solution would be to symlink /usr/bin/php to /usr/local/bin/php (and renaming /usr/bin/php (binary) to something else such as /usr/bin/php_5.3.4. To me this is overkill and could possibly break some internal OSX stuff, since enabling the built-in apache is merely just turning on Web Sharing under "Sharing".
/usr/bin/php
/usr/local/bin/php
/usr/bin/php_5.3.4
So, I don't want to remove the pre-installed PHP binaries.
With that being said, what are the recommendations for this type of setup? I'm basically going to use homebrew to set up a MAMP stack, that way I have complete control over my setup, and I can always run bleeding-edge and/or have multiple versions of PHP, MySQL, and/or apache/nginx.
My thoughts are to just update the environmental variables and add /usr/local/bin to the beginning of the PATH string (launchctl getenv PATH). For example, here's my PATH is /usr/bin:/bin:/usr/sbin:/sbin. I could possibly run the following:
/usr/local/bin
launchctl getenv PATH
/usr/bin:/bin:/usr/sbin:/sbin
launchctl setenv PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
In the end, I would then end up adding the following to my .bash_profile file:
.bash_profile
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin launchctl setenv PATH $PATH
Doing so, should let me use the binaries in /usr/local first for custom stuff such as git, mysql, apache, php, etc. Not sure if this is the way to go or not. Leaving it up to you guys to point me into the right direction on this one.
/usr/local
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 9 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.