SRG

SCSIraidGURU’s World

PHP page

One of the most important components for WordPress is PHP.  I recommend going on the latest version 7.3.  Below are easy to follow instructions for accomplishing it.

See the WordPress page for some other php fixes. 

WordPress 5.x works great with PHP 7.3 and above.   PHP 7.3 performance increases have been well documented. 

Multiple Code Execution Flaws Found In PHP Programming Language

The PHP security team has addressed the vulnerabilities in the latest versions. So users and hosting providers are strongly recommended to upgrade their servers to the latest PHP version 7.3.9, 7.2.22, or 7.1.32.

 phpMyAdmin Homepage

Many of the articles I read on MYSQL and MariaDB mentioned phpMyAdmin to create databases and users.   I have a notepad++ page filled with scripts to created WP databases and users.   I started off installing the base Ubuntu phpMyAdmin 4.5.4.   I added the repository for 4.6.    I went to their main site and downloaded the tar file for 4.8.5 because it fixed errors on the pages.   It was a manual install.  I just upgraded to 4.9.0.1 and rebooted. 

You will find  phpMyAdmin-4.9.0.1-all-languages.tar.gz  on the list.  Right click and copy link.  You will get this

 wget https://files.phpmyadmin.net/phpMyAdmin/4.9.0.1/phpMyAdmin-4.9.0.1-english.tar.gz
tar xvzf phpMyAdmin-4.9.0.1-english.tar.gz
sudo cp -f phpMyAdmin-4.9.0.1-english /usr/share/phpmyadmin

I did a wget in the /usr/share/phpmyadmin folder.   The tar command will unzip it into its own folder.   cp -Rf the contents into the folder above it.    Restart Apache.  

phpMyAdmin allows me a tool to create databases and users with ease.   I created a sa account and gave root limited access.   I moved phpMyAdmin off port 80 to another port.   It required a few basic steps of creating a Sites-Available file and removing the mods-enable configuration.  Both WP servers are now on this port.  

The main screen of phpMyAdmin shows you the databases on the left.  The versions of Apache, MySQL (MariaDB), and php on the right.  It also shows you the version of phpMyAdmin running.

I decided to setup a new database to parse out the Firewall Syslogs.  I created a new page for the Fortinet 60E hardening to show the results of this database.  pMyAdmin allows for the easy creation of databases, tables and setting up the user for the database.   Once you setup a unique table field, you can even edit, create and delete rows of data. 

In order for LOAD DATA LOCAL INFILE to work in your php code you need a few config file changes:

modify php.ini files in these directories.
/etc/php/7.3/
apache2
/etc/php/7.3/cli
/etc/php/7.3/fpm

Under the [MySQLi] and [MySQL]

mysqli.allow_local_infile = On

 /etc/mysql/my.cnf

Under the [MySQLi] and [MySQL]

local-infile=1

Back to top