Jump to content

php for macOS

Go to solution Solved by Eigenvektor,

In that case you can compile it yourself. Or if you're on macOS older than 12, it should actually be included in the Apache installation that's bundled with macOS.

https://www.php.net/manual/en/install.macosx.php

 

Not sure why you're opposed to a package manager since it'll make your life a ton easier for development tasks. But you can always replicate anything it does by hand, it's just much work (busy)work.

 

https://getgrav.org/blog/macos-monterey-apache-multiple-php-versions

Whatever the blog does with brew, you can replicate by downloading/installing the packages yourself.

In that case you can compile it yourself. Or if you're on macOS older than 12, it should actually be included in the Apache installation that's bundled with macOS.

https://www.php.net/manual/en/install.macosx.php

 

Not sure why you're opposed to a package manager since it'll make your life a ton easier for development tasks. But you can always replicate anything it does by hand, it's just much work (busy)work.

 

https://getgrav.org/blog/macos-monterey-apache-multiple-php-versions

Whatever the blog does with brew, you can replicate by downloading/installing the packages yourself.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
https://linustechtips.com/topic/1466464-php-for-macos/#findComment-15646753
Share on other sites

Link to post
Share on other sites

7 hours ago, Eigenvektor said:

In that case you can compile it yourself. Or if you're on macOS older than 12, it should actually be included in the Apache installation that's bundled with macOS.

https://www.php.net/manual/en/install.macosx.php

 

Not sure why you're opposed to a package manager since it'll make your life a ton easier for development tasks. But you can always replicate anything it does by hand, it's just much work (busy)work.

 

https://getgrav.org/blog/macos-monterey-apache-multiple-php-versions

Whatever the blog does with brew, you can replicate by downloading/installing the packages yourself.

yeah about compiling I am probably not doing that, because it seems very complicated and I don't even know if hose links on the article are steps. If they are. no I am not doing that, I don't think I can. So compiling is out. I am opposed to a package manager because I don't like installing stuff that I am not sure if I will need later, and when it's CLI stuff not apps I have to follow guides if I want to remove it and it's complicated. But if I don't have a choice I might do it I need php. You said if I replicate the blog steps I can install it manually. But which packages exactly do I need to download. Can you highlight the part where I actually start following the guide? Is it where it says php installation? Do I follow only that segment? Because the other stuff seems not related to php but to local servers and other stuff.

Link to comment
https://linustechtips.com/topic/1466464-php-for-macos/#findComment-15647103
Share on other sites

Link to post
Share on other sites

3 hours ago, stefanmz said:

Can you highlight the part where I actually start following the guide? Is it where it says php installation? Do I follow only that segment? Because the other stuff seems not related to php but to local servers and other stuff.

No, I can't, since I've never had the need to do that stuff manually. You'll have to figure that out on your own.

 

I would strongly recommend to use Homebrew. It'll make your life a ton easier as a developer. Installation and removal of Homebrew itself is pretty easy (see: https://github.com/homebrew/install#uninstall-homebrew). Both are one-liners on the terminal.

 

In general Homebrew is the one tool you always want to keep around. It'll help you install, update and remove all of the other CLI tools you'll need during development.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
https://linustechtips.com/topic/1466464-php-for-macos/#findComment-15647472
Share on other sites

Link to post
Share on other sites

On 11/9/2022 at 7:35 PM, Eigenvektor said:

No, I can't, since I've never had the need to do that stuff manually. You'll have to figure that out on your own.

 

I would strongly recommend to use Homebrew. It'll make your life a ton easier as a developer. Installation and removal of Homebrew itself is pretty easy (see: https://github.com/homebrew/install#uninstall-homebrew). Both are one-liners on the terminal.

 

In general Homebrew is the one tool you always want to keep around. It'll help you install, update and remove all of the other CLI tools you'll need during development.

Awesome! So I might actually use it. I am just wondering, is it invasive? So like, does it take over default app and cli functions from my system built in macOS stuff? Like when I install it will it set itself to be the default package manager for example? Instead of my built-in system macOS one? Will it take over other functions? Does it change anything in the way I use my MacBook when I install it? Or does it just do stuff when I command it to and the rest of the time stays hidden? Will I know in any way that I have it if I don't explicitly use it to install stuff or anything else I might need to use it for? That's what I want to know before I install it. Also second question do you recommend HomeBrew or Macports now that you know what my requirements are? Also is it safe to use? Are there vulnerabilities and security issues when I use it?

Link to comment
https://linustechtips.com/topic/1466464-php-for-macos/#findComment-15649467
Share on other sites

Link to post
Share on other sites

10 hours ago, stefanmz said:
  1. I am just wondering, is it invasive? So like, does it take over default app and cli functions from my system built in macOS stuff?
  2. Like when I install it will it set itself to be the default package manager for example? Instead of my built-in system macOS one?
  3. Will it take over other functions?
  4. Does it change anything in the way I use my MacBook when I install it?
  5. Or does it just do stuff when I command it to and the rest of the time stays hidden?
  6. Will I know in any way that I have it if I don't explicitly use it to install stuff or anything else I might need to use it for?
  1. No. It's a simple terminal program you can use to install, update and uninstall other terminal programs.
  2. I assume you mean the app store, since macOS does not have a built-in package manager. It does not replace or interfere with the app store.
  3. No, it doesn't replace or take over anything.
  4. It makes is much easier to install and update tools, so I guess it does change the way you use your MacBook for the better?
  5. It doesn't do anything unless you tell it to do something.
  6. No. Unless you explicitly run "brew update && brew upgrade" it won't even update packages or remind you there are updates available.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
https://linustechtips.com/topic/1466464-php-for-macos/#findComment-15650334
Share on other sites

Link to post
Share on other sites

On 11/11/2022 at 7:26 AM, Eigenvektor said:
  1. No. It's a simple terminal program you can use to install, update and uninstall other terminal programs.
  2. I assume you mean the app store, since macOS does not have a built-in package manager. It does not replace or interfere with the app store.
  3. No, it doesn't replace or take over anything.
  4. It makes is much easier to install and update tools, so I guess it does change the way you use your MacBook for the better?
  5. It doesn't do anything unless you tell it to do something.
  6. No. Unless you explicitly run "brew update && brew upgrade" it won't even update packages or remind you there are updates available.

ok well I guess then I should install it, it will be much easier and I will be able to get php and other stuff I need, thanks! Last question. Homebrew or Macports?

Link to comment
https://linustechtips.com/topic/1466464-php-for-macos/#findComment-15653477
Share on other sites

Link to post
Share on other sites

2 minutes ago, stefanmz said:

Homebrew or Macports?

I've only ever used Homebrew (10+ years), so unfortunately I can't comment on how it compares to MacPorts. Maybe someone else can add their experience.

 

I found this: https://apple.stackexchange.com/questions/32724/what-are-pros-and-cons-for-macports-fink-and-homebrew

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
https://linustechtips.com/topic/1466464-php-for-macos/#findComment-15653489
Share on other sites

Link to post
Share on other sites

9 hours ago, Eigenvektor said:

I've only ever used Homebrew (10+ years), so unfortunately I can't comment on how it compares to MacPorts. Maybe someone else can add their experience.

 

I found this: https://apple.stackexchange.com/questions/32724/what-are-pros-and-cons-for-macports-fink-and-homebrew

Ok, I think I made up my mind and I am installing homebrew seems like the best option. Thanks for the information and links you sent me, also for the recommendations, it really helps and it really made my decision easier and showed me that I have thought wrongly about homebrew. So thanks a lot!

 

Now I kinda thought I wanted to install fink though, based on the articles you sent, because it is apt-based and I have worked a lot with apt and I am comfortable with it, so I like that and it might be great, however the fink website looks last century and also the latest mention of macOS is 10.15 even though the latest version of fink is from 2022 and we are using macOS 13. What? Does it even support newer macOS versions? Nothing on their website that mentions it. Do you know anything?

 

Also on the topic of homebrew I saw it installs in opt/local and that might cause conflicts winch I don't want but then it said for Apple Silicon it installs in opt/homebrew. So does that mean because I have an M1 that's not a problem for me and I can simply ignore it? Or is it still a problem and it still uses opt/local for some of the things?

Link to comment
https://linustechtips.com/topic/1466464-php-for-macos/#findComment-15654103
Share on other sites

Link to post
Share on other sites

  • 1 month later...
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×