Are you facing issues with installing PHP on Windows?
This guide is for you.
PHP is a server side scripting language. that is used to develop Static websites or Dynamic websites or Web applications. PHP stands for Hypertext Pre-processor, that earlier stood for Personal Home Pages. PHP scripts can only be interpreted on a server that has PHP installed.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform PHP installation.
Now you can learn the process to install PHP.
Why is PHP so popular?
PHP remains the web’s most prominent and influential server-side programming language.
The advantages of PHP includes;
i. Common programming language installed by most web hosts.
ii. It has a simple learning curve.
iii. Strong connection with the MySQL database.
iv. An excellent collection of libraries to benefit the development time.
The process of installing PHP on a System?
The installation of PHP on the development system makes it possible to build and test a web application safely without affecting the live website data.
There are ways to install and run PHP on Windows that are different. Now, let’s look into these different methods.
1. All-in-One packages
Fortunately, there is an all-in-one Windows distributions that have Apache, PHP, MySQL, and other applications in a single installation file. For example, XAMPP and WampServer are the most popular Windows distributions among the PHP community.
To install PHP, we just download the corresponding installer and run it to install it in the Windows installation.
2. Manual Installation
Now, let’s check how our Support Engineers install PHP on windows manually.
As a Prerequisites, we prefer to take back up the server before the installation.
1. Initially, we download the latest PHP ZIP package from www.php.net/downloads.php.
2. Then, we install the PHP files to C:\php, so we create that folder and extract the contents of the ZIP file into it.
Normally, PHP can be installed anywhere on the system, but it’s important to change the paths.
3. Next, we copy C:\php\php.ini-development to C:\php\php.ini. Then we configure php.ini according to the needs like define the extension directory, Enable extensions etc.
To enable the extension directory
extension_dir = "C:/php/ext"
4. And, we add C:\php to the path environment variable.
For that, we Open Settings > Type ‘environment variables’ into the search field and open the result > Select the “Advanced” tab > Click the “Environment Variables” button.
After that scroll down the System variables list > click on “Path” followed by the “Edit” button. Click “Edit text” and add ;C:\php to the end of the Variable value line.
Now click OK until we are out and reboot the system
5: After that, we configure PHP as an Apache module.