/php_linux_build

Build instructions for Apache-like suite on Arch

php

CS1_IAD Portfolio 3 Repo

image

Motive

This repository pertains towards the adherance of a Project Brief for CS1_IAD. Whereby the goal was to create a login system using php to communicate with a Database.

Any and all corresponding functionality can be found within these respective files, this is how I have it laid out on my local machine so if you were to build it for yourself, the layout would be the same.

Build Instructions:

To build and use this project to verify all of the functionality, it would be a case of running XAMPP through your own Database.

However, I used my Arch Linux side of my PC to make this project so assuming you want to follow my steps, this is what I did

1. update your repositories using sudo pacman -Syu

2. install httpd, php-apache, apache, php, phpMyAdmin and mariaDB

Setup the correspondence:

1. cd into /etc/httpd/conf then run sudo YOUR_TEXT_EDITOR . and navigate to the prepriatory httpd.conf file

image

2. comment this line using # "#LoadModule mpm_event_module modules/mod_mpm_event.so" and uncomment this line "LoadModule mpm_prefork_module modules/mod_mpm_prefork.so"

3. to enable php, in the same file, add these indents to the end of the file

image

4. to setup phpMA, cd into /etc/httpd/conf/exta/phpmyadmin.conf and add these lines as shown

image

5. last but not least, MariaDB

Before running the mariaDB service, run this command mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

The following will assume that you already have a working lib directory for your mySQL SSL connection. From there, it will create an arbitrary connection point

Now, in a similar vein to how you would setup MySQL, run the mariaDB service sudo systemctl start mariadb.service

create a new user using sudo mysql -u root

from there, run the following

image

and select Enter for all of them

When prompted to make a new password, just set it to whatever, your username by default will be root

To test if everything is working, you can run the following command

image

which will show you a runtime showcase of your httpd SSL connection

image

NOTE:

If in doubt whereby you are experiencing issues running phpMA on localhost or through any SSL connection, make sure that you cd into /etc/php then sudo YOUR_TEXT_EDITOR php.ini

and uncomment these lines:

image

this adds the necessary funcrtionality to the phpMA connection because it will assume by default that you dont have the necessary mysqli extensions

Should you need any and all help with installation, email me at 230315257@aston.ac.uk