Author Archives: LinuxTech

ERROR 1292 (22007): Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘date’ at row 87103

We got error while altering a table in mysql

The issue was due to strict mode enabled in Mysql

You can check if mysql strict mode is checked using below command

# mysql

mysql> SELECT @@sql_mode;

If you see statement

+———————————————————————————————————————–+
| @@sql_mode |
+———————————————————————————————————————–+
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION |
+———————————————————————————————————————–+
1 row in set (0.01 sec)

To disabled it

open fie /etc/my.cnf

Add in below of file sql_mode=” “

and restart mysql

This will disable strict mode in mysql

Alter command works fine now

Error: GPG check FAILED

Getting error Error: GPG check FAILED while installing any package on alma linux 8 ?

While installing a package got an error

[root@secure ~]# yum install traceroute
Last metadata expiration check: 0:43:24 ago on Saturday 23 November 2024 10:15:46 AM EST.

Dependencies resolved.

Package Architecture Version Repository Size

Installing:
traceroute x86_64 3:2.1.0-8.el8 baseos 66 k

Transaction Summary

Install 1 Package

Total download size: 66 k
Installed size: 101 k
Is this ok [y/N]: y
Downloading Packages:

traceroute-2.1.0-8.el8.x86_64.rpm 260 kB/s | 66 kB 00:00

Total 147 kB/s | 66 kB 00:00
AlmaLinux 8 – BaseOS 3.3 MB/s | 3.4 kB 00:00
Importing GPG key 0xC21AD6EA:
Userid : “AlmaLinux packager@almalinux.org
Fingerprint: E53C F5EF 91CE B0AD 1812 ECB8 51D6 647E C21A D6EA
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
Is this ok [y/N]: y
Key imported successfully
Import of key(s) didn’t help, wrong key(s)?
Public key for traceroute-2.1.0-8.el8.x86_64.rpm is not installed. Failing package is: traceroute-3:2.1.0-8.el8.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing ‘yum clean packages’.
Error: GPG check FAILED

Fixed this issue by importing new repodata from Almaliux

rpm –import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux

This fixed my issue and was able to install any package

https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/

WordPress Error : Missing a temporary folder

You may get an error while uploading images in wordpress with error

The error message said – Missing a temporary folder

The solution to this issue is Open wp-config.php in server

Search for WP_TEMP_DIR in wp-config and check the path

Usually its wp-content/Temp

Check if this folders exists using ls -al /home/username /public_html/wp-content/Temp

If folder is not present can create using mkdir -p /home/username /public_html/wp-content/Temp

change permissions and ownership chown user.user /home/username /public_html/wp-content/Temp -R

This should fix the issue for wordpress

upcp on cPanel failed

while running upcp on cpanel server it stopped with error

Running /usr/local/cpanel/scripts/updatenow --upcp --log=/var/cpanel/updatelogs/update.486871.726225288.1718207292.log --force failed, exited with code 1 (signal = 0)

On checking logs in /var/cpanel/updatelogs/update.486871.726225288.1718207292.log

We see the error

[2024-09-04 13:06:20 -0400] * FATAL: Test install failed: error: Failed dependencies:
[2024-09-04 13:06:20 -0400] libonig.so.5()(64bit) is needed by (installed) alt-php-internal-mbstring-8.2.14-2.el8.x86_64
[2024-09-04 13:06:20 -0400] oniguruma is needed by (installed) alt-php-internal-mbstring-8.2.14-

The fix to this issue on Almalinux was installing oniguruma by command

dnf install oniguruma

now upcp work fine without any issues

Opencart Broken page CSS images missing

We had this issue with one of our customer

Where the opencard was showing broekn site with no images loading and only skeleton page showing up

The issue was due to issue in opencart config.php

/ HTTP
define(‘HTTP_SERVER’, ‘http where http needs to be changed to https for website to work properly

Once changed the website is working without any issues

Virtualizor Panel not opening Softacalous

First check status of virtualizor

ps aux | grep virtualizor

If nothing is showing up in results

Check using command

systemctl status virtualizor

If still now working use command

service virtualizor restart


Stopping php-fpm: php-fpm is stopped
Stopping nginx: nginx is stopped
Stopping php-fpm: php-fpm is stopped
Stopping nginx: nginx is stopped
ERROR! MySQL server PID file could not be found!
/bin/systemctl
Starting php-fpm: Done…
Starting nginx: Done…
Starting MySQL.. SUCCESS!

The public_html folder permission keeps getting reverted in cPanel

The ownership keeps getting changed to user.nobody in cpanel automatically.

on debugging this issue it was found that cpanel has a new feature which was causing this

in

Home /
Server Configuration /Enable File Protect

Disabling it fixed the issue of permission changing automatically


Tweak Settings

Updating “Enable File Protect” from “On” to “Off”.
“Enable File Protect” was updated.
Processing post action for Enable File Protect:
Setting /home permissions to 0711 …
Setting permissions for users …
my247web …
… Done
“Enable File Protect” was updated.
Done.

cPanel PHP 8.3 does not install Ioncube

cpanel latest version which does not include ioncube loader in php 8.3

due to check softacolous does not work

Fix of this issue is to install iocoube loader for PHP 8.3

Below are the steps to be executed

wget -O /usr/local/cpanel/3rdparty/php/unversioned/ioncube/ioncube_loader_lin_8.3.so https://files.virtualizor.com/ioncube/64/ioncube_loader_lin_8.3.so

Check version of Ioncube using below command

/usr/local/cpanel/3rdparty/bin/php –version
PHP 8.3.8 (cli) (built: Jun 11 2024 12:00:31) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.8, Copyright (c) Zend Technologies
with the ionCube PHP Loader v13.3.0, Copyright (c) 2002-2024, by ionCube Ltd.

Child failed to make LIVEAPI connection to cPanel.

Softacalous on cpanel was giving error or ioncube loader

Even disabling and reenabling ioncobe from tweak setting didnt fix the issue

Script error: the ionCube Loader for PHP needs to be installed. The ionCube Loader is the industry standard PHP extension for running protected PHP code, and can usually be added easily to a PHP installation. For Loaders please visit: https://get-loader.ioncube.com For an instructional video please see: http://ioncu.be/LV Child failed to make LIVEAPI connection to cPanel.

Reinstalling softacalous should fix the issue

wget -N http://files.softaculous.com/install.sh
chmod 755 install.sh
./install.sh –reinstall

Mysql 8.0 breakdown

Mysql 8.0 was not started on cpanel all of sudden without issue

After googling the issue was found to be with MySQL 8.0.38 release

Run the below 3 commands

yum downgrade mysql-community-* # to downgrade mysql to previous version

/scripts/restartsrv_mysql # Restart mysql

dnf install python3-dnf-plugin-versionlock #install version lock on amla linux

yum versionlock mysql* #lock the mysql version so cpanel wont overwrite it

Mysql should be up and online and version lock will stop cpanel overwritting it on nightly updates until lock is removed