Configure PHP 5 after installing with Apache on windows
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
Leave Configure PHP 5 after installing with Apache on windows to:
Read more #utopian-io posts
Best Posts From jinzo
We have not curated any of jinzo's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From jinzo
- iMacros - Facebook Scripts Code Improvments And Restructuring With Debug mode
- Warzone 2100 - A Free And Open Source Real-Time Strategy Game
- iMacros - Code Improvements, New Debug Mode , New Twitter Advanced Tweets [Development]
- iMacros - Introducing Facebook Groups Poster, Roadmap Updates After Quantom Release
- Task Request - README File Needed for Twitter iMacros Scripts
- iMacros Scripts - Twitter Advanced Follow, Twitter Accounts Creator New Version (MM)
- iMacros Scripts - New Scripts Twitter Arabization - Gmail Accounts Creator
- [Task-Response] Utopian-io - @utopian-bot a JavaScript mentions handler
- iMacros Scripts - New Scripts Auto Retweet Latest, Twitter Accounts Language Changer
- iMacros Scripts - Facebook Reactions Users Extractor, Tweet in My Time, Roadmap Changes