Php Download Mac

VPS Production Gear.Camera: Mic: Mic: M. Get the Toolbox App to download and its future updates with ease. Is also available as a snap package. If you’re on Ubuntu 16.04 or later, you can install from the command line. Sudo snap install phpstorm -classic. Download Apache Php Mysql For Mac. Restart the Apache HTTP Server for the change to take effect. Make sure that your new document root directory and its contents have read permission set for others (for example, “chmod 755” for directories and “chmod 644” for files). Tons of awesome winter wallpapers for Mac to download for free. How to Install PHP on macOS Introduction. PHP is a server-side scripting language. Originally it was designed for web development but it can also be used as a general-purpose language. It was created by Rasmus Lerdorf in 1994. Originally it stood for Personal home page but now It stands for Hyper Text Preprocessor. PHP code can be embedded into.

So finally I have decided to learn PHP and I use Mac for my personal usage, so the first step was to install Apache, PHP and MySql on my Mac OS X. My Mac OS is Mountain Lion (10.8), so for earlier versions you might need to make some changes in the steps provided below. The -DBIND8COMPAT=1 gets you over a problem in the DNS files because MacOS X has definitions for Bind9 and PHP expects Bind8 definitions.DEAPI is needed if you build it for Apache 1.3.31.O3 enables the gcc optimizer.

Each Mac has a built-in Apache server that runs a built-in PHP.

To upgrade it you need less than 10 minutes once you have understood all the steps needed.

The same applies also to install the last PHP 7.1 version: you only need to change the required version of PHP (see below).

Exploring the LAMP server of a Mac

To understand the built-in PHP of your Mac the first thing you should do is open your terminal and type in:

Php

This is the PHP version installed in your Mac.

But, from where is it executed?

And the php.ini?

So, by default Mac OsX has PHP 5.5.24 with xDebug 2.2.3 and our php.ini is located at /usr/bin/php.

How to update PHP on Mac OsX

Update Php On Mac

As we want to update the built-in version of PHP of our Mac OsX, at this point maybe its better to think at a more valuable solution.

Update PHP… go to php.net/downloads.php, download the latest version of PHP, unzip, compile, configure… Mmm, there is a better solution for sure!

And in fact, those good boys at Liip have thought that there should be a better solution… And they built it!

So, in your Terminal, type (use 7.1 if you want to install the last PHP 7.1 version!):

You have just downloaded the best PHP latest version you can find ever.

How To Download Php 7 On Mac Download

Now, let’s configure it: it needs less then 5 minutes!

WARNING: If you receive an error like, then you need to stop the built-in Apache instance and reinstall it from Homebrew: it seems the Apache version shipped with MacOS causes some troubles that prevent the server to starting.
Here all the information you need to disable the built-in version of Apache in MacOS and install a fresh new one with Homebrew.

How to configure your updated version of Mac OsX built-in PHP

The package you have just downloaded is a custom version of PHP built by Liip and it provides a lot more functionalities and useful PHP extension than the original Mac OsX built-in PHP, so you will save a lot of time when you’ll install and update them (think at Intl extension or xDebug, for example).

Once downloaded, the Liip’s PHP moves all the files into /usr/local/php5-5.6.11-20150710-223902/bin and makes a symlink of this folder called php5. In this way, when you’ll update PHP, Apache will automatically load the new PHP version (see more about this in a moment). Really smart!

If you type in Terminal again which php you’ll get the same result as before. This is because we have to tell our Mac OsX to load PHP from the new location.

To do this we will create a .bash_profile in our user directory:

This will open VIM that will create the new file (if it is already present, type the letter a to enter the edit mode).

Into the .bash_file write the line export PATH=/usr/local/php5/bin:$PATH, then press Esc and type SHIFT + Zfor two times (a shortcut to save and close the file).

Then load again the .bash_profile file and restart Apache:

You have updated your Mac OsX built-in PHP.

On the Liip’s PHP Mac OsX home page you will find a lot of useful information about your new PHP.

The next step you should do is open the php.ini located at /usr/local/php5/lib/ and set it the right way.

Download Php For Mac

And, once you have configure your php.ini, maybe you want to configure your Mac Osx built-in Apache or want to install MySQL in your Mac (as it is not shipped by default).

Remember to “Make. Ideas. Happen.”.

Php 7.2 Download

Php Download Mac

I wish you flocking users, see you soon!

« back — written by Brent on November 28, 2019

Do you want to learn more about PHP 8.1? There's The Road to PHP 8.1. For the next 10 days, you'll receive a daily email covering a new and exiting feature of PHP 8.1; afterwards you'll be automatically unsubscribed, so no spam or followup. Subscribe now!

# Upgrading with Homebrew

Start by making sure brew is up-to-date:

Next, upgrade PHP:

Check the current version by running php -v:

Restart Nginx or Apache:

And make sure that your local web server also uses PHP 7.4 by visiting this script:

The version should show 7.4.x.

Note: if you're using Laravel Valet, please keep on reading,you need some extra steps in order for the web server to properly work.

# Valet

If you're using Laravel Valet, you should do the following steps to upgrade it:

Now run valet install:

# Extensions

Homebrew doesn't support the installation of PHP extensions anymore, you should use pecl instead.I personally use Imagick, Redis and Xdebug.

They can be installed like so:

You can run pecl list to see which extensions are installed:

You can search for other extensions using pecl search:

Make sure to restart your web server after installing new packages:

If you're using Laravel Valet, you should restart it as well.

Make sure all extensions are correctly installed and loaded by checking both your PHP webserver and CLI installs:

If extensions aren't properly loaded, there are two easy fixes.

First, make sure the extensions are added in the correct ini file. You can run php --ini to know which file is loaded:

Now check the ini file:

Php download for mac free

Note that if you're testing installed extensions via the CLI, you don't need to restart nginx, apache or Valet.

The second thing you can do, if you're updating from an older PHP version which also used pecl to install extension; is to reinstall every extension individually.

# Last step

Finally you should test and upgrade your projects for PHP 7.4 compatibility.

Php Download For Mac Free

👍