Viewed   70 times

I want to update php version, currently I have 5.5.38 and I want 7.1

What I tried so far is using this command:

curl -s | bash -s 7.1

I tried several different versions but none of them worked. It opens bash_profile for a second and then I get Received SIGHUP or SIGTERM and message below:

Buffer written to /Users/Morpheus/

Not sure what went wrong and why it won't update...

Any ideas?




Use Homebrew:

I would probably recommend installing homebrew to manage such installations for you. With that installed you can just run the following command to install php7.1

brew update
brew install php@71
Wednesday, August 10, 2022

You will need to install the DataStax C/C++ driver which is a dependency of the PHP driver. Using these instructions followed by make install after the driver has been successfully built will ensure this dependency is available when building the PHP driver. Using the PHP driver build instructions you will need to make sure that GMP and PHP dev libraries are also available before running pecl install cassandra.


Since you are using El Capitan you are running into issues with the System Integrity Protection and you will need to disable it in order to copy files into /usr. The better and recommended option is to install PHP using Homebrew; however you can also use MacPorts if preferred.

Below are the steps used to reproduce the installation of the PHP driver on a clean OSX El Capitan image with Xcode and Homebrew already installed:

brew install autoconf cmake libuv gmp openssl pcre homebrew/php/php55
brew link homebrew/php/php55
mkdir code
pushd code
git clone
pushd php-driver
git submodule update --init --recursive
pushd lib/cpp-driver
mkdir build
pushd build
cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl ..
make -j$(sysctl -n hw.ncpu)
sudo make install
mkdir build
pushd ext
pushd build
../ext/configure --with-php-config=/usr/local/bin/php-config
make -j$(sysctl -n hw.ncpu)
sudo make install
sudo sh -c 'echo "" >> /usr/local/etc/php/5.5/php.ini'

You can then verify the installation using the following command:

/usr/local/bin/php -i | grep -A 10 "^cassandra$"

NOTE: PHP v5.5 is utilized above since that is the default version that comes with El Capitan; PHP v5.6 and v7.0 can also be used instead.

Tuesday, August 23, 2022

Go ahead and download XAMPP, which is probably the most popular local environment for development.

Once it's installed, open the XAMPP Control Panel, and click "Manage Servers":

Start the Apache Web Server. Your computer is now running as a 'localhost environment'.

If you go to your browser and type localhost, you should be greeted by a orange "Welcome to XAMPP" page.

In Finder, navigate to Applications > XAMPP > xamppfiles > htdocs, which is where you "create your sites". For example: inside the htdocs directory, I would make a folder called test which inside would be my relevant HTML, CSS, PHP etc - if I now went in my browser to localhost/test, I would see that site just like I would if it was hosted online.

Feel free to ask any further questions.

Monday, September 26, 2022

In command prompt type below

set PATH=%PATH%;C:pathtophp

Where C:pathtophp is the folder where your php.exe file is located. After this run

C:>php -v

than you will see something like

PHP 7.3.6 (cli) (built: May 29 2019 12:11:00) 


If you find that when you restart your computer, this solution will not work anymore:

Set the Path like as following:

Step 1 - Click on the Windows icon

Step 2 - Click on the Settings icon

Step 3 - Click on System

Step 4 - Click on About

Step 5 - Click on System info

Step 6 - Click on Advanced system settings

Step 7 - Click on Environment variables...

Step 8 - Select Path row and then click Edit

Step 9 - Click New and then click Browse, then in the next panel which will open you need to select the folder you want in the Path. For the initial premise of this guide i will add the folder C:UsersNewFolderInPath

Note: Replace your PHP installed path(e.g:C:Program Filesphp) with the above path ♥.

Step 10 - Click OK and click every OK button you will encounter to close every previous windows.

Monday, August 22, 2022

Ok, thanks to MBraedley I found the solution.

Quoting from the JRE 7 Installation Guide for Mac OS X:

Installing a JRE from Oracle will not:

  • Update java -version symlinks or add java to your path.
  • Show the installed JRE in the Java

To be able to do the above, you need to install the JDK.

Thursday, September 22, 2022
Only authorized users can answer the search term. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :