How To Install Php On Windows 10
Install PHP on Windows
Obtaining PHP
- Download latest version of PHP from http://www.php.internet/downloads.php.
- Yous can too download the .msi package i.due east. windows installer of PHP from sourceforge.cyberspace
Prerequisite and running on your Windows system, else yous will non be able to run PHP Scripts.
Alternatively, you can install WAMP server or AMPPS server to install PHP, MySQL, and Apache Web Server on your Windows car.
Options for installing PHP on Windows
- You can install php on windows manually.
- You tin run the .msi package, i.e. windows installer for php to install php.
- Besides total installation, you can install php extensions on an existing installation of PHP.
- Yous can upgrade to a higher version of PHP from an existing version.
Install PHP on Windows manually
Y'all have to download zipped binary version of PHP from http://www.php.cyberspace/downloads.php.
Extract the downloaded file to php binder which must exist created at the root of any of your windows drives (east.g. c:\php or d:\php).
Enter php binder and rename the file php.ini-recommonded to php.ini.
Open the file php.ini with whatever text editor and find extension_dir within the file.
Modify the extension directory, i.east. if yous have installed php in php folder of D drive, setting will be extension_dir=D:\php.
Now you open Surround Variables (MyComputer -> System Properties -> Environment Variables), under arrangement variables, select Path and click Edit,
in the Variable value, become to the end of the list and put a semicolon, and then add D:\php;D:\php\ext assuming D:\php is the location of your php installation.
Then Click on New under arrangement variable and add PHPRC against Variable proper name and D:\php against Variable value.
Restart your organisation.
Install PHP on Windows using Windows installer
But run the .msi Windows installer file and follow the installation wizard.
Testing if PHP is installed properly
Create a php file containing lawmaking <?php repeat phpinfo(); ?> and save it as test.php.
Run this file on your spider web server and if you go an output similar this:
and then yous have installed PHP properly.
Install PHP extensions on Windows
What is a PHP extension?
A PHP extension is a piece of code which is not part of the cadre PHP and you lot need it to explore certain functionalities of PHP (e.g. for using mysql yous need mysql extension of PHP).
Many extensions are available out of the box in the PHP installer downloaded from php.net or in the .msi parcel. Merely many need to be obtained separately from php.net.
In Windows, extensions come in the form of a .dll file which you can download from php.net.
How practise you configure an extension on Windows?
You demand to change the setting of extension dir in php.ini file. For example, If you are using PHP five.0.3, and you have installed php in c:\php, so y'all have to set extension_dir = C:\php\ext in your php.ini file.
After downloading the files needed, y'all have to open php.ini and enable a line pointing to an extension in question.
For enabling extensions, you have to uncomment a line in your php.ini file. For example, for enabling mysql extension, you take to change; extension = php_mysql.dll to extension = php_mysql.dll in your php.ini file.
You lot besides need to restart your web server and php in order to complete the installation of a specific extension.
Sample php.ini
Previous: PHP Home
Next: Install php on Linux
How To Install Php On Windows 10,
Source: https://www.w3resource.com/php/installation/install-php-on-windows.php
Posted by: pierremagards.blogspot.com
0 Response to "How To Install Php On Windows 10"
Post a Comment