You’ll need the PHP Windows installer. There are a number of versions of PHP available. Make sure you get the latest PHP 8 x64 Thread Safe ZIP package from : https://windows.php.net/download#php-7.4
Create a new php folder in the root of your C:\
drive and extract the contents of the ZIP into it.
PHP can be installed anywhere on your system, but you’ll need to change the paths referenced below if C:\php
isn’t used or C:\php-7.4
si on utilise plusieurs version de php.
PHP’s configuration file is named php.ini. This doesn’t exist initially, so copy C:\php\php.ini-development to C:\php\php.ini. This default configuration provides a development setup which reports all PHP errors and warnings.
There are several lines you may need to change in a text editor (use search to find the current value). In most cases, you’ll need to remove a leading semicolon ( to uncomment a setting.
First, enable any required extensions. This will depend on the libraries you want to use, but the following extensions should be suitable for most applications:
extension=curl
extension=gd
extension=mbstring
extension=pdo_mysql
If you want to send emails using PHP’s mail() function, enter the details of an SMTP server in the [mail function] section (your ISP’s server should be suitable):
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = mail.myisp.com
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = my@emailaddress.com
To ensure Windows can find the PHP executable, you need to change the PATH environment variable. Click the Windows Start button and type “environment”, then click Edit the system environment variables. Select the Advanced tab, and click the Environment Variables button.
Scroll down the System variables list and click Path followed by the Edit button. Click New and add C:\php
:
PHP path environment variable
Note that older editions of Windows have a single text box where each path is separated by a semi-colon (.
Click OK until you’re out. You shouldn’t need to reboot, but you may need to close and restart any cmd terminals you have open.