Author Archives: Geneva Sibanda

About Geneva Sibanda

I assist companies in the Areas of Network Infrastructure Design and Implementation: (from Windows Active Directory Security, networking, etc.).

Class “MySQLi” not found: in

Class “MySQLi” not found: in /web/system/library/db/mysqli.php on line 29

How to solve “Fatal error: Class ‘MySQLi’ not found”: in?

Solution:

root@en-03:~# apt install php8.2-mysql

How to upgrade debian 11 to 12

Step-by-Step Guide to Upgrade to Debian 12 from Debian 11

Copy & Paste as below:

sed -i ‘s/bullseye/bookworm/g’ /etc/apt/sources.list
sed -i ‘s/bullseye/bookworm/g’ /etc/apt/sources.list.d/*.list

apt-get update -y && apt-get upgrade –without-new-pkgs -y && apt-get full-upgrade -y

reboot
lsb_release -a

Whoops! We seem to have hit a snag. Please try again later

After installing CodeIgniter 4 when you run the app then you will get an error like this:

Whoops! We seem to have hit a snag. Please try again later

And in cmd line when run composer update you see something similar to this output below:
Problem 1
– codeigniter4/framework[4.0.0, …, v4.4.4] require ext-intl * -> it is missing from your system. Install or enable PHP’s intl extension.
– Root composer.json requires codeigniter4/framework ^4.0 -> satisfiable by codeigniter4/framework[4.0.0, …, v4.4.4].

To enable extensions, verify that they are enabled in your .ini files:
– /etc/php/8.2/cli/php.ini
– /etc/php/8.2/cli/conf.d/10-mysqlnd.ini
– /etc/php/8.2/cli/conf.d/10-opcache.ini
– /etc/php/8.2/cli/conf.d/10-pdo.ini
– /etc/php/8.2/cli/conf.d/15-xml.ini
– /etc/php/8.2/cli/conf.d/20-calendar.ini
– /etc/php/8.2/cli/conf.d/20-ctype.ini
– /etc/php/8.2/cli/conf.d/20-curl.ini
– /etc/php/8.2/cli/conf.d/20-dom.ini
– /etc/php/8.2/cli/conf.d/20-exif.ini
– /etc/php/8.2/cli/conf.d/20-ffi.ini
– /etc/php/8.2/cli/conf.d/20-fileinfo.ini
– /etc/php/8.2/cli/conf.d/20-ftp.ini
– /etc/php/8.2/cli/conf.d/20-gd.ini
– /etc/php/8.2/cli/conf.d/20-gettext.ini
– /etc/php/8.2/cli/conf.d/20-iconv.ini
– /etc/php/8.2/cli/conf.d/20-mbstring.ini
– /etc/php/8.2/cli/conf.d/20-mysqli.ini
– /etc/php/8.2/cli/conf.d/20-pdo_mysql.ini
– /etc/php/8.2/cli/conf.d/20-phar.ini
– /etc/php/8.2/cli/conf.d/20-posix.ini
– /etc/php/8.2/cli/conf.d/20-readline.ini
– /etc/php/8.2/cli/conf.d/20-shmop.ini
– /etc/php/8.2/cli/conf.d/20-simplexml.ini
– /etc/php/8.2/cli/conf.d/20-sockets.ini
– /etc/php/8.2/cli/conf.d/20-sysvmsg.ini
– /etc/php/8.2/cli/conf.d/20-sysvsem.ini
– /etc/php/8.2/cli/conf.d/20-sysvshm.ini
– /etc/php/8.2/cli/conf.d/20-tokenizer.ini
– /etc/php/8.2/cli/conf.d/20-xmlreader.ini
– /etc/php/8.2/cli/conf.d/20-xmlwriter.ini
– /etc/php/8.2/cli/conf.d/20-xsl.ini
You can also run `php –ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `–ignore-platform-req=ext-intl` to temporarily ignore these required extensions.

The solution: This method works better and doesn’t have the message above.

root@en-03:# sudo apt-get install php8.2-mcrypt php8.2-intl php8.2-curl php8.2-xsl php8.2-mbstring php8.2-xsl php8.2-zip php8.2-soap php8.2-gd

root@en-03:# sudo service nginx restart
root@en-03:# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
root@en-03:#

Debian 12 The system will suspend now!

You have just installed Debian 12. However SSH session receive this unexpected message:

Broadcast message from Debian-gdm@en-03 on tty1 (Mon 2024-01-08 09:34:01 SAST):

The system will suspend now!

The solution: This method works better to prevent SSH disconnecting from client side.

Create /etc/systemd/sleep.conf.d/nosuspend.conf as follows:

root@en-03:~# mkdir -p /etc/systemd/sleep.conf.d/

root@en-03:~# vi /etc/systemd/sleep.conf.d/nosuspend.conf

[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no

:wq

How to check codeigniter 4 version

If you don’t know what version of CodeIgniter you are currently running, and assuming that Composer was used to install CodeIgniter: you can get it by running the following command line:

genie@en-03:/var/www/busylines.co.za/web$composer show | grep codeigniter
codeigniter4/framework v4.4.3 The CodeIgniter framework v4

The current version is v4.4.3.

All the best of luck.

Dell Laptop Airplane Mode Stuck on

Suddenly my laptop kept disconnecting my wireless connection and turning to off airplane mode. Finally it got stuck in airplane mode off.

Resolution:

If the Airplane Mode is permanently off …. that means you would have accidentally pushed the on and off switch button on the side of your laptop. To enabled the mode on, just push the Wifi switch button back and forth to on position.

All the best of luck.

Couldn’t agree on host key algorithm

You’re suddenly receiving a “FATAL ERROR: Couldn’t agree a host key algorithm (available: rsa-sha2-512,rsa-sha2-256)” when trying to ssh into your Ubuntu Linx Server

Resolution:

The Couldn’t agree a key exchange algorithm is expected behavior with older versions of PuTTy or WinSCP.

To resolve this issue, upgrade PuTTy to the latest version via the below links. https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html . Try using PuTTy or WinSCP from a different computer/laptop if applicable.

All the best of luck. My problem was solved by actioning the above.

How do I use PHP to get the current year?

PHP Frameworks and WordPress Community,

It’s the new year.

Here is the footer code you’re looking for:

Last year (2022), it was saying:

© 2022 Community Hands, Inc.

This year, it will say:

© 2022-2023 Community Hands, Inc.

and forever stay updated with the current year.

If you know, you know.

“The operation failed for an undetermined reason”

“The operation failed for an undetermined reason” transferring files through vSphere Client (2147256)

Initiating a file upload to datastore, and resulting in the operation failing with an error:

The operation failed for an undetermined reason. Typically this problem occurs due to certificates that the browser does not trust. If you are using self-signed or custom certificates, open the URL below in a new browser tab and accept the certificate, then retry the operation.

https://target-ip

Solution

To resolve this issue follow the solutions below as per the scenario.

Solution 1:

From a client system Web browser, go to the base URL of the vCenter Server system or the vCenter Server Virtual Appliance without appending port numbers or ‘vsphere-client’ extension.
For example:
https://vc.gs-01.esgnet.lan/ Enter your vCenter FQDN details on a Web browser
Click the Download trusted root CA certificates link at the bottom of the grey box on the right and download the file.