Configure PHP 5 after installing with Apache on windows

in utopian-io •  7 years ago  (edited)

php-logo.png

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

Sketch.png

Rename:

php.ini-development to php.ini

Sketch.png

Edit php.ini (I'm going to use Notepad++ for example)
Sketch.png

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)

Sketch.png

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.
Sketch.png

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
Sketch.png

Add this to the file:

 <?php phpinfo() ?> 

Open it from your browser for example:
http://localhost/info.php

Sketch.png

Mysqli Support
Sketch.png

PDO
Sketch1.png

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

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Great post.

@OriginalWorks

The @OriginalWorks bot has determined this post by @jinzo to be original material and upvoted it!

ezgif.com-resize.gif

To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!

Hey @jinzo I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Very informative.
Thanks

This post has received a 0.12 % upvote from @drotto thanks to: @jinzo.

This post received a 1.95% upvote from @morwhale team thanks to @jinzo! For more information, click here! , TeamMorocco! .
STEEM Price : 6.431 $

You got a 0.30% upvote from @upme requested by: @jinzo.
Send at least 1.5 SBD to @upme with a post link in the memo field to receive upvote next round.
To support our activity, please vote for my master @suggeelson, as a STEEM Witness