Menu
Current Stable PHP 7.4.11 (Changelog)
- php-7.4.11.tar.bz2(sig) [12,451Kb] 01 Oct 20205408f255243bd2292f3fbc2fafc27a2ec083fcd852902728f2ba9a3ea616b8c5
- php-7.4.11.tar.gz(sig) [16,149Kb] 01 Oct 2020b4fae5c39ca1eedf5597071996d9c85d0674b83f5003126c39b7b44bbfbcd821
- php-7.4.11.tar.xz(sig) [10,061Kb] 01 Oct 20205d31675a9b9c21b5bd03389418218c30b26558246870caba8eb54f5856e2d6ce
PHP 7.1 is installed inside /usr/local/Cellar. In order to execute php globally, we need to set path in.bashprofile stored in the user's home directory. Open the file using VI editor and add the following line. PHP 7.4 has just been released!This latest version adds several new features to the language such as arrow functions for shorter one-liner functions, typed properties in classes, covariant & contravariant type handling, Preloading for better performance, and much more! Here's a brief guide on how to install PHP 7.4 on Linux, Windows, and Mac OS X.
Old Stable PHP 7.3.23 (Changelog)
- php-7.3.23.tar.bz2(sig) [14,772Kb] 01 Oct 2020fd6666ad4605508042c6964151379475daea36c43e03b11b1e79d4ae6b04c04c
- php-7.3.23.tar.gz(sig) [19,212Kb] 01 Oct 2020a21094b9ba2d8fe7fa5838e6566e30cf4bfaf2c8a6dce90ff707c45d0d8d494d
- php-7.3.23.tar.xz(sig) [11,849Kb] 01 Oct 20202bdd36176f318f451fb3942bf1e935aabb3c2786cac41a9080f084ad6390e034
Old Stable PHP 7.2.34 (Changelog)
- php-7.2.34.tar.bz2(sig) [14,876Kb] 01 Oct 20200e5816d668a2bb14aca68cef8c430430bd86c3c5233f6c427d1a54aac127abcf
- php-7.2.34.tar.gz(sig) [19,469Kb] 01 Oct 20208b2777c741e83f188d3ca6d8e98ece7264acafee86787298fae57e05d0dddc78
- php-7.2.34.tar.xz(sig) [12,021Kb] 01 Oct 2020409e11bc6a2c18707dfc44bc61c820ddfd81e17481470f3405ee7822d8379903
GPG Keys
The releases are tagged and signed in the PHP Git Repository.The following official GnuPG keys of the current PHP Release Manager can be usedto verify the tags:
PHP 7.4
PHP 7.3
PHP 7.2
Supported Versions Check the supported versions page for more information on the support lifetime of each version of PHP.
-->The following instructions assume a clean environment and show how to install PHP 7.x, the Microsoft ODBC driver, the Apache web server, and the Microsoft Drivers for PHP for SQL Server on Ubuntu 16.04, 18.04, and 20.04, RedHat 7 and 8, Debian 8, 9, and 10, Suse 12 and 15, Alpine 3.11, and macOS 10.13, 10.14, and 10.15. These instructions advise installing the drivers using PECL, but you can also download the prebuilt binaries from the Microsoft Drivers for PHP for SQL Server GitHub project page and install them following the instructions in Loading the Microsoft Drivers for PHP for SQL Server. For an explanation of extension loading and why we do not add the extensions to php.ini, see the section on loading the drivers.
These instructions install PHP 7.4 by default using
pecl install
. You may need to run pecl channel-update pecl.php.net
first. Note that some supported Linux distros default to PHP 7.1 or earlier, which is not supported for the latest version of the PHP drivers for SQL Server -- please see the notes at the beginning of each section to install PHP 7.2 or 7.3 instead.Also included are instructions for installing the PHP FastCGI Process Manager, PHP-FPM, on Ubuntu. This is needed if using the nginx web server instead of Apache.
While these instructions contain commands to install both SQLSRV and PDO_SQLSRV drivers, the drivers can be installed and function independently. Users comfortable with customizing their configuration can adjust these instructions to be specific to SQLSRV or PDO_SQLSRV. Both drivers have the same dependencies except where noted below.
Contents of this page
Installing the drivers on Ubuntu 16.04, 18.04, and 20.04
Note
To install PHP 7.2 or 7.3, replace 7.4 with 7.2 or 7.3 in the following commands.
Step 1. Install PHP
Step 2. Install prerequisites
Install the ODBC driver for Ubuntu by following the instructions on the Linux installation article.
Step 3. Install the PHP drivers for Microsoft SQL Server
If there is only one PHP version in the system, then the last step can be simplified to
phpenmod sqlsrv pdo_sqlsrv
.Step 4. Install Apache and configure driver loading
Step 5. Restart Apache and test the sample script
To test your installation, see Testing your installation at the end of this document.
Installing the drivers with PHP-FPM on Ubuntu
Note
To install PHP 7.2 or 7.3, replace 7.4 with 7.2 or 7.3 in the following commands.
Step 1. Install PHP
Verify the status of the PHP-FPM service by running
Step 2. Install prerequisites
Install the ODBC driver for Ubuntu by following the instructions on the Linux installation article.
Step 3. Install the PHP drivers for Microsoft SQL Server
If there is only one PHP version in the system, then the last step can be simplified to
phpenmod sqlsrv pdo_sqlsrv
. Cheat engine 6.0 mac download.Verify that
sqlsrv.ini
and pdo_sqlsrv.ini
are located in /etc/php/7.4/fpm/conf.d/
:Restart the PHP-FPM service:
Step 4. Install and configure nginx
To configure nginx, you must edit the
/etc/nginx/sites-available/default
file. Add index.php
to the list below the section that says # Add index.php to the list if you are using PHP
:Next, modify the section following
# pass PHP scripts to FastCGI server
as follows:Step 5. Restart nginx and test the sample script
To test your installation, see Testing your installation at the end of this document.
Installing the drivers on Red Hat 7 and 8
Step 1. Install PHP
To install PHP on Red Hat 7, run the following:
Note
To install PHP 7.2 or 7.3, replace remi-php74 with remi-php72 or remi-php73 respectively in the following commands. https://playbank.weebly.com/free-greek-fonts-for-mac-download.html.
To install PHP on Red Hat 8, run the following: Firefox setup 57.0.
Note
To install PHP 7.2 or 7.3, replace remi-7.4 with remi-7.2 or remi-7.3 respectively in the following commands.
Step 2. Install prerequisites
Install the ODBC driver for Red Hat 7 or 8 by following the instructions on the Linux installation article.
Step 3. Install the PHP drivers for Microsoft SQL Server
You can alternatively install from the Remi repo:
Step 4. Install Apache
SELinux is installed by default and runs in Enforcing mode. To allow Apache to connect to databases through SELinux, run the following command:
Step 5. Restart Apache and test the sample script
To test your installation, see Testing your installation at the end of this document.
Installing the drivers on Debian 8, 9, and 10
Note
To install PHP 7.2 or 7.3, replace 7.4 in the following commands with 7.2 or 7.3.
Step 1. Install PHP
Step 2. Install prerequisites
Install the ODBC driver for Debian by following the instructions on the Linux installation article.
You may also need to generate the correct locale to get PHP output to display correctly in a browser. For example, for the en_US UTF-8 locale, run the following commands:
You may need to add
/usr/sbin
to your $PATH
, as the locale-gen
executable is located there.Step 3. Install the PHP drivers for Microsoft SQL Server
If there is only one PHP version in the system, then the last step can be simplified to
phpenmod sqlsrv pdo_sqlsrv
. As with locale-gen
, phpenmod
is located in /usr/sbin
so you may need to add this directory to your $PATH
.Step 4. Install Apache and configure driver loading
Step 5. Restart Apache and test the sample script
To test your installation, see Testing your installation at the end of this document.
Installing the drivers on Suse 12 and 15
Note
In the following instructions, replace
<SuseVersion>
with your version of Suse - if you are using Suse Enterprise Linux 15, it will be SLE_15 or SLE_15_SP1. For Suse 12, use SLE_12_SP4 (or above if applicable). Not all versions of PHP are available for all versions of Suse Linux - please refer to http://download.opensuse.org/repositories/devel:/languages:/php
to see which versions of Suse have the default version PHP available, or to http://download.opensuse.org/repositories/devel:/languages:/php:/
to see which other versions of PHP are available for which versions of Suse.Note
Packages for PHP 7.4 are not available for Suse 12.To install PHP 7.2, replace the repository URL below with the following URL:
https://download.opensuse.org/repositories/devel:/languages:/php:/php72/<SuseVersion>/devel:languages:php:php72.repo
.To install PHP 7.3, replace the repository URL below with the following URL:https://download.opensuse.org/repositories/devel:/languages:/php:/php73/<SuseVersion>/devel:languages:php:php73.repo
.Step 1. Install PHP
Step 2. Install prerequisites
Install the ODBC driver for Suse by following the instructions on the Linux installation article.
Step 3. Install the PHP drivers for Microsoft SQL Server
Note
If you get an error message saying
Connection to 'pecl.php.net:443' failed: Unable to find the socket transport 'ssl'
, edit the pecl script at /usr/bin/pecl and remove the -n
switch in the last line. This switch prevents PECL from loading ini files when PHP is called, which prevents the OpenSSL extension from loading.Step 4. Install Apache and configure driver loading
Step 5. Restart Apache and test the sample script
To test your installation, see Testing your installation at the end of this document.
Installing the drivers on Alpine 3.11
Note
The default version of PHP is 7.3. Alternate versions of PHP may be available from other repositories for Alpine 3.11. You can instead compile PHP from source.
Step 1. Install PHP
PHP packages for Alpine can be found in the
edge/community
repository. Please check Enable Community Repository on their WIKI page. Add the following line to /etc/apt/repositories
, replacing <mirror>
with the URL of an Alpine repository mirror:Then run:
Step 2. Install prerequisites
Install the ODBC driver for Alpine by following the instructions on the Linux installation article.
Step 3. Install the PHP drivers for Microsoft SQL Server
Step 4. Install Apache and configure driver loading
Step 5. Restart Apache and test the sample script
To test your installation, see Testing your installation at the end of this document.
Installing the drivers on macOS High Sierra, Mojave, and Catalina
If you do not already have it, install brew as follows:
Note
To install PHP 7.2 or 7.3, replace [email protected] with [email protected] or [email protected] respectively in the following commands.
Download Php For Mac
Step 1. Install PHP
PHP should now be in your path -- run
php -v
to verify that you are running the correct version of PHP. If PHP is not in your path or it is not the correct version, run the following:Step 2. Install prerequisites
Install the ODBC driver for macOS by following the instructions on the macOS installation article.
Download Php 7.2
In addition, you may need to install the GNU make tools:
Step 3. Install the PHP drivers for Microsoft SQL Server
Step 4. Install Apache and configure driver loading
To find the Apache configuration file,
httpd.conf
, for your Apache installation, runThe following commands append the required configuration to
httpd.conf
. Be sure to substitute the path returned by the preceding command in place of /usr/local/etc/httpd/httpd.conf
:Step 5. Restart Apache and test the sample script
Mac Os Install Php
![Php Php](/uploads/1/2/6/7/126734815/791411065.jpg)
Install Php On Mac
To test your installation, see Testing your installation at the end of this document.
Testing Your Installation
Download Php 7.4
To test this sample script, create a file called testsql.php in your system's document root. This is
/var/www/html/
on Ubuntu, Debian, and Redhat, /srv/www/htdocs
on SUSE, /var/www/localhost/htdocs
on Alpine, or /usr/local/var/www
on macOS. Copy the following script to it, replacing the server, database, username, and password as appropriate.Point your browser to https://localhost/testsql.php (https://localhost:8080/testsql.php on macOS). You should now be able to connect to your SQL Server/Azure SQL database. 7z to zip converter download mac.