How to get LOAD DATA INFILE to worked on my Linux server and/or Matomo Diagnostic System Check setting?

Your new/first Tips, tricks and tutorial forum.
Post Reply
User avatar
admin
Site Admin
Posts: 21
Joined: March 7th, 2022, 1:09 am

How to get LOAD DATA INFILE to worked on my Linux server and/or Matomo Diagnostic System Check setting?

Post by admin »

When you are running a Shell "Top" command and saw the Load average and the %Cpu(s) is dynamically continuous high,
while description of command-line is "php-cgi" within one of your websites (inline PID user) and mail queue is currently not running,
that's mean your LOAD DATA INFILE not working.

And Or

If the LOAD DATA INFILE related to Database abilities is still not working with your Matomo version: 4.11.0 to Diagnostic System Check setting, try the following configuration:

check within your configuration for MultiPHP.ini,
Currently I'm using the latest stable LTS tier released WHM version 11.102.0.21 using PHP 7.4.30 (cli) with Zend Engine v3.4.0
from ea-php74 and not using alt-php74,
in WHM menu: Home /Software /MultiPHP INI Editor >> Editor Mode
Edit the INI settings of current PHP version of your domain name server.
and...
change the settings that you should not have:
(Before PHP 7.2.16 and 7.3.3 the default was "1")

Code: Select all

enable_load_data_infile=0
If you see this line in the file, just delete it!
or change it with:

Code: Select all

#enable_load_data_infile=0
or

Code: Select all

;enable_load_data_infile=0
and/or

if you are using PHP-Mysqli,
you must enable the PHP INI setting with:

Code: Select all

mysqli.allow_local_infile = On
The system saves PHP sessions in the /var/cpanel/php/sessions directory by default. This allows PHP to write session files, but users will not possess permissions to delete those sessions in the directory. Because PHP writes setting files, PHP cannot clean its own sessions. Therefore, the root user must run a cron job to delete the expired session files.

This is WHM server Con job example:
Located at /var/spool/cron/root
within root shell terminal I'm using:

Code: Select all

nano /var/spool/cron/root
and Run for every 30 minutes at minute: 09 and minute: 39.

Code: Select all

09,39 * * * * /usr/local/cpanel/scripts/clean_user_php_sessions > /dev/null 2>&1
To make sure your database running correctly, add this too:

Code: Select all

15 0 * * * mysqlcheck --auto-repair --optimize --all-databases > /dev/null 2>&1
and your server will be better and running faster and more stable.
Image
Post Reply