Sanchit Batra
Sanchit Batra

Reputation: 196

Upgrading PHP on MacOS Sierra

I'm trying to update my php to the current version on my MacOS Sierra.

  1. When I type in vi ~/.bash-profile, all I get is a series of "~". How exactly do I update the PATH?

  2. sudo vi /usr/local/php5/php.d/99-liip-developer.ini gives me a ton of text, and when I try to run the next command (sudo cat /Library/Server/Web/Config/php/local.ini >> /usr/local/php5/php.d/99-liip-developer.ini) I get permission denied. How do I go about this?

enter image description here

Upvotes: 0

Views: 159

Answers (1)

jeroen
jeroen

Reputation: 91744

To answer your questions:

  1. If you are not familiar with the vi editor, you probably want to use another text editor. On OS X for example (this should open TextEdit normally...):
    $ open ~/.bash_profile
    If that does not give you TextEdit, you can also do:
    $ open -a TextEdit ~/.bash_profile
  2. If your user doesn't have sudo permissions, you need to login as root or as a user who does have super user privileges. That would be the only way you can change that file.

Upvotes: 1

Related Questions