This repository is for document all work done with PHP7 + MySQL + Apache in AM first challenge - Endava
Bonus: MariaDB + NGINX
You need to install and configure necessary tools. These instructions are just for Windows users
Please download software here:
- MySQL 5.7 - For data persistence
- Apache Lounge - Local server in your machine
- PHP7 - Programming Language Thread Safe Version
Just follow the installer instructions. Port default 3306
Unzip all files from php-7.2.2-Win32-VC15-x64 into C:\php7 This is default folder. You will need aditional steps if you want to unzip in another folder
Copy php.ini-development and rename to php.ini this is the configuration file. If you want to put in another place you will need aditional steps.
Open file and uncomment the line:
extension_dir = "ext"
Next, you have to add PDO library adding two lines in file:
extension=C:/php7/ext/php_mysqli.dll
extension=C:/php7/ext/php_pdo_mysql.dll
Be sure you have installed the latest C++ Redistributable Visual Studio 2017
- vc_redist_x64 - 64bits version
Unzip all files from httpd-2.4.29-Win64-VC15.zip into C:\Apache24 This is default folder. You will need aditional steps if you want to unzip in another folder
Open C:\Apache24\conf\httpd.conf file and be sure this lines are ok:
- ServerRoot "c:/Apache24"
- Listen 80
At the end of the file you have to add these lines
AddHandler application/x-httpd-php .php
AddType application/x-httpd-php .php .html
LoadModule php7_module "C:/php7/php7apache2_4.dll"
PHPIniDir "c:/php7"
In C:\Apache24\bin execute the next commands:
httpd -k install
httpd -k start
To test. Open your browser and go to http://localhost You shoud see the message It works!
You can use ApacheMonitor.exe to shut down and reset the server.
- Excute script.sql in MySQL workbench
- Copy *.php files into C:\Apache24\htdocs
- Adjust with the password for your MySQL Server
- Execute in your browser http://localhost/mysql.php you should see a list of names
- Jhonatan J. Guzmán
This project is licensed under the MIT License - see the LICENSE file for details
- Endava AM Team