0

My new work has just given me a MacBook Pro running macOS Sierra 10.12.6 to use as a development machine. It has PHP 5.6 installed and when I ran curl -s http://php-osx.liip.ch/install.sh | bash -s 7.1 (as recommended by many online guides), it installed PHP 7.1 in a separate directory while leaving PHP 5.6 intact.

I have a few issues:

  • PHP 7.1 will not run by default
  • The Non Thread Safe version was installed
  • When I run PHP 7.1 directly, it takes 5 seconds to start (I timed it), while PHP 5.6 starts instantly

One site recommended adding the new PHP directory to the start of the PATH environment variable, but that seems like a band-aid solution.

How can I update the existing PHP 5.6 version to PHP 7.1 (Thread Safe), and have it respond instantly when run?

  • Please edit the question to specify the version of macOS installed on your MacBook Pro. – Nimesh Neema Aug 21 '18 at 1:14
  • If you don't mind upgrading, the current release of macOS, macOS High Sierra 10.13.6 has PHP 7.1 installed by default. Else you can install PHP 7 using Homebrew in the current version of macOS. – Nimesh Neema Aug 21 '18 at 1:18
  • @NimeshNeema It says it will take 40 minutes for High Sierra to finish installing, so I'll let you know. – CJ Dennis Aug 21 '18 at 1:23
  • @NimeshNeema That was a quick 40 minutes! It's now on PHP 7.1.16 and it runs instantly, although it's still Non Thread Safe. – CJ Dennis Aug 21 '18 at 1:54
-1

I know you don't want to install a different PHP, but I've found using the Homebrew install method quite painless and robust. Maybe give it a try.

brew install php
  • Welcome to Ask Different. The OP states they don't want to install an additional PHP so an answer saying to do just that will get you many downvotes. This would be better as a comment telling them why your answer is a good alternative. See How to Answer for important info. - From Review. – fsb Jul 5 at 18:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .