In this tutorial I'm going to explain how to configure PHP5 after installing with Apache and finish the and successfully finish installation with Apache.
Please Stop apache service if linked to php5 before proceed.
PHP 5
First make sure the version as it's very important. (Thread Safe)
Package Name:
php-5.6.32-Win32-VC11-x64.zip
Rename:
php.ini-development
to php.ini
Edit php.ini
(I'm going to use Notepad++ for example)
Uncomment ; extension_dir = "ext"
by removing ;
Then replace ext
with your ext folder path in windows. you will find it inside php folder.
Now Enable some important extensions
;extension=php_mysql.dll
(if you're using it)
;extension=php_mysqli.dll
;extension=php_mbstring.dll
;extension=php_pdo_mysql.dll
If you want to access your MySQL database from PHP 5, you'll need to enable extensions that allow you to do so, like php_mysqli
or php_pdo_mysql
. (Both Recommend)
Just Uncomment it. remove ;
and it will be enabled.
Composer (optional)
Composer is a tool for dependency management in PHP, like a package manager. It allows to easily install PHP packages and even entire frameworks.
Composer requires the PHP OpenSSL extension to be enabled, so let's enable it in C:\php5\php.ini
for example.
Use your text editor's search function to search for php_openssl.dll, there should already be a commented line for it, just uncomment that line.
Now download Composer's Windows installer:
Download Page or Direct link
Follow the instructions, when prompted for the path to PHP, browse to C:\php5
and select php.exe
.
That's it, Composer is now installed system-wide and can be used from anywhere - you can try it out, just open a new command prompt and type composer.
Now create new file in your htdocs
to test our configuration.
for example that path in Apache:
C:\Apache24\htdocs
Create new file info.php
Add this to the file:
<?php phpinfo() ?>
Open it from your browser for example:
http://localhost/info.php
Mysqli Support
PDO
Previous tutorials:
Setup your own Apache MariaDB PHP phpMyAdmin on Windows!
How to use multiple PHP versions with Apache on Windows
Image Credits:
All Screenshots taken by @Jinzo
Post Intro a free design available on the web licensed for public usage for php an open source web language.
Posted on Utopian.io - Rewarding Open Source Contributors