Solution PHP Notice: Use of undefined constant x — assumed ‘x’

I once noticed the following notification when writing a PHP script:

PHP Notice:  Use of undefined constant uid - assumed 'uid' in /scripts/file.php on line 31
PHP Notice:  Use of undefined constant value - assumed 'value' in /scripts/file.php on line 32

Continue reading “Solution PHP Notice: Use of undefined constant x — assumed ‘x’”

Fn function keys on a laptop work the other way around

Usually, to extend the functionality, there is a special Fn key on laptop keyboards.
If you hold it and press keys, for example, from F1 to F12, then they will perform completely different functions, change the screen brightness, volume level, put the system into sleep mode, turn off/on the Wi-Fi adapter, etc.

But in my case, everything was the opposite, when I needed the F1-F12 keys, instead of them, functional ones worked, which usually work with the Fn clamped, and to press F4 for example, I had to clamp the Fn key as well.

As it turned out, the BIOS had an option Action Keys Mode (in Lenovo laptops – HotKey Mode), the default value of which was Enable, which resulted in the function keys working without pressing Fn.
To make the F1-F12 keys work as usual, set the value to Disable.

By the way, if your function keys do not work at all, then rather the driver is not installed in the system.

See also my article:
Why do Mac function keys work without fn and instead of F1-F12

Why do Mac function keys work without fn and instead of F1-F12

I noticed that on many laptops, including the MacBook, function keys (brightness level of the display, volume, etc.) can be used as standard without the fn (function) key. And the keys themselves from F1 to F12 have to be used with the fn key (it is located in the lower left corner of the keyboard).

So that the keys from F1 to F12 work as usual, and the functional only with the fn key – open “System settings” – “Keyboard“, then in the tab “Keyboard” select “Use the F1, F2 and other function keys as standard“.

Is done.

See also my article:
Fn function keys on a laptop work the other way around

Automatic installation ABillS

On the test, I install the ABillS billing system in Ubuntu Server 16.04 using an installer.
I note that the installer can install older versions of components such as Accel-ppp, so I recommend installing everything manually.
See also my article – Installing and configuring the billing system ABillS

Let’s start the automatic installation, download and unpack the archive with the installation script:

sudo apt-get install unzip wget
wget https://github.com/nabat/AInstall/archive/master.zip
unzip master.zip

Continue reading “Automatic installation ABillS”