Change language

How to set up PHP development environment on Windows?

Steps to set up a PHP environment on a local machine.There are two main ways to set up PHP on a local machine:
  • Using just one package (XAMPP & amp; WAMPP) ... (recommended)
  • Manually install all required packages (MySQL, PHP and Apache) and configure them.
We will cover a simpleand almost error-freemethod to install PHP on a local machine that uses everything in one package called XAMPP .Steps to install XAMPP:
  • Download XAMPP:You can download XAMPP software from the official site here with latest Windows and latest PHP.
  • Open the downloaded .exe file.After opening the downloaded file, you will see pop-up from the window, click "Yesand continue.
  • Click Next:you will see the XAMPP welcome window as shown below, click Next ”
  • Select components:Select the components you want to install. Please select the MySQLand phpMyAdmincomponents, all other components are optional for this tutorial. 
  • Select an installation location:select a location whereyou want to install XAMPP, the default is C: / xampp
  • Click Next.After clicking Next, it will start installation. 
  • Open the XAMPP control panel.After successfully installing XAMPP on your local On your computer, open Control Panel by searching the Windows search bar "XAMPP Control Panel" or by navigating to the XAMPP installation directory. You will see a window as shown below. 
  • Configuring Apache *:This step is not required,i. e. If you have problemswith Windows 10 related to a blocked port
    Open the config file for Apache as shown in the picture below. 

    Press CTRL + F and find LISTEN 80. Replace port 80with something like 81and save the file and restart the control panel. 
  • Start the Apache server.Start the Apache server by clicking startupand you will see the port number right before the Apache column. You can stop the service at any time and start any service by simply clicking the Start button. 
  • Verifying installation:go to your browser and type localhost: 81(or just localhost,if you haven’t changed the port). You will see a page as shown below. 
  • Verifying PHP installation:create php in the htdocs folder in your installation folder. (C: / XAMPP / htdocs) and add the following code to it. echo phpinfo(); ?> Save the file as demo.php and go to your browser and enter localhost: 81 / demo.php (or just localhost / demo.php,if you haven’t changed the port). 
    If the installation went well, you should see the result as shown below.If all of the above went well, congratulations! You have successfully set up your PHP development environment on your local machine.

Shop

Learn programming in R: courses

$

Best Python online courses for 2022

$

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Latest questions

NUMPYNUMPY

Common xlabel/ylabel for matplotlib subplots

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Why do I get "Pickle - EOFError: Ran out of input" reading an empty file?

12 answers

NUMPYNUMPY

Flake8: Ignore specific warning for entire file

12 answers

NUMPYNUMPY

glob exclude pattern

12 answers

NUMPYNUMPY

How to avoid HTTP error 429 (Too Many Requests) python

12 answers

NUMPYNUMPY

Python CSV error: line contains NULL byte

12 answers

NUMPYNUMPY

csv.Error: iterator should return strings, not bytes

12 answers


Wiki

Python | How to copy data from one Excel sheet to another

Common xlabel/ylabel for matplotlib subplots

Check if one list is a subset of another in Python

sin

How to specify multiple return types using type-hints

exp

Printing words vertically in Python

exp

Python Extract words from a given string

Cyclic redundancy check in Python

Finding mean, median, mode in Python without libraries

cos

Python add suffix / add prefix to strings in a list

Why do I get "Pickle - EOFError: Ran out of input" reading an empty file?

Python - Move item to the end of the list

Python - Print list vertically