Install PHP
1. Download PHP
- Go to the PHP Downloads page.
- Choose the latest Thread Safe version and download the zip file.
2. Extract PHP
- Create a folder (e.g.,
C:\php
). - Extract the downloaded zip file into this folder.
3. Configure PHP
- Rename
php.ini-development
tophp.ini
. - Open
php.ini
and uncomment necessary extensions (e.g.,extension=mysqli
).
4. Add PHP to PATH
- Search for Environment Variables in the Start menu.
- Edit the
Path
variable in System variables and addC:\php
.
5. Verify Installation
Open Command Prompt and run:
bash
php -v
You should see the PHP version info.
Basically There are five types of server for php.
- WAMP for windows
- XAMPP (Cross, Apache, MySQL, PHP, Perl) for Cross Platform
- LAMP for linux
- MAMP for mac
- SAMP for Solaris