This error can occur after upgrading PHP to a newer version.
Actually, the split() function is deprecated with PHP 5.3.x and must be replaced in the code with preg_split()
Done.
Vyacheslav Gapon – personal blog, manuals, articles, notes, development
This error can occur after upgrading PHP to a newer version.
Actually, the split() function is deprecated with PHP 5.3.x and must be replaced in the code with preg_split()
Done.
You can disable the update of a particular or all WordPress plug-ins in several ways, I’ll describe several of them:
Continue reading “How to Disable Plugin Updates in WordPress”I will describe a few simple steps to perform a hard reset on the Lenovo A390t:
1) Turn off the device if it is turned on.
2) Press the volume button up and the power button simultaneously, wait for the Recovery menu to appear.
3) In the recovery menu, press the volume down/up button to highlight “Wipe data/factory reset” and select it by pressing the power button, then select “Wipe cache partion” in the same way.
4) When cleaning is complete, the recovery menu will appear again, in which we select “reboot system now“, after which the device will reboot.
Done.
SED (Stream EDitor) — streaming text editor and programming language.
An excellent tool to convert outgoing text data in any convenient form.
For example, several times wrote a table of online mac-addresses, which were taken from the switch, were checked with billing and were output with such data as address, ID, login, etc ..
For example, a script that receives SNMP macros from the L3 of the HP 5800 switch and saves them in a text document in a column, thanks to the SED, unnecessary data is deleted, and spaces are replaced with a colon:
#!/bin/bash rm /var/www/mac.txt snmpwalk -v 2c -c community 192.168.1.50 .1.3.6.1.2.1.17.4.3 -O v|sed -e "s/.*Hex-STRING: //g" -e "s/ /:/g" -e "s/.$//" -e "/INTEGER/d" > /var/www/mac.txt
Here are a few more examples of using SED.
Output only values after Hex-STRING:
sed -e 's/.*Hex-STRING: //g'
Colon whitespace replacement:
sed -e 's/ /:/g'
Delete the last line:
sed -e sed 's/.$//'
Delete the last character:
sed -e 's/.$//'
Removing a string containing INTEGER:
sed -e '/INTEGER/d'
Removing lines in file.txt where ABCD occurs:
sed -i '/^ABCD/ d' file.txt
Example of deleting the third line in the file file.txt and deleting 4 lines starting from line 7:
sed -i '3,1d' file.txt sed -i '7,4d' file.txt
Enumerate the lines in file.txt:
sed = file.txt | sed 'N;s/\n/\t/'
Outputting only rows from 5-10:
sed -n 5,10p file.txt
The built-in help can be obtained by the command:
man sed
Installed somehow Visual C++ for Visual Studio 2013 (vcredist_x86, vcredist_x64) and noticed the error “0x80070005 – Access is denied”.
In my case, this error occurred because the ESET NOD32 Smart Security antivirus blocked access to some files and directories in the system.
Its disconnection did not give a result, so a quick solution to the problem was the removal of the antivirus, after which the error ceased to be displayed.
Done.
Config Server Firewall (CSF) – a software product created for automatic server protection.
Continue reading “Installing and Configuring Config Server Firewall (CSF) in Ubuntu”TFTP (Trivial File Transfer Protocol) It is mainly used for initial loading of diskless workstations. TFTP, unlike FTP, does not contain authentication capabilities (although it is possible to filter on the IP address) and is based on the transport protocol UDP.
atftpd server
atftp client
Install:
sudo apt-get install atftpd atftp
The server uses the port: 69/udp
The default directory is /srv/tftp if it does not exist, create:
sudo mkdir -p /srv/tftp
sudo chown nobody /srv/tftp
To start automatically, you need to comment out (put # at the beginning of the line) the start line in /etc/inetd.conf:
#tftp dgram udp4 wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd –tftpd-timeout 300 –retry-timeout 5 –mcast-port 1758 –mcast-addr 239.239.239.0-255 –mcast-ttl 1 –maxthread 100 –verbose=5 /srv/tftpd
And change the value of the variable USE_INETD in the file /etc/default/atftpd from true to false.
This can be done in any editor, for example using nano:
sudo nano /etc/default/atftpd
(in the editor the key combination Ctrl+O is used to save the changes, and Ctrl+X to exit).
To apply the changes and run atftpd, run the following command:
sudo /etc/init.d/atftpd restart
Done, TFTP server should work, accept and return files from the /srv/tftp directory.
See also my articles:
IPTables rules for TFTP
Starting a TFTP server in Windows
Configuring DHCP + TFTP for DOCSIS
Install and configure tftpd-hpa
The higher the resolution of the recording, the clearer and better the video quality.
– 16CIF – (1.6 Mp, 1408 × 1152)
– 4CIF (D1) – (0.4 Mp, 704х576 – PAL and 704×480 – NTSC)
– 2CIF (HD1 or Half D1) – (0.2 Mp, 704×288 – PAL and 704×240 – NTSC)
– CIF (Common Intermediate Format) – (0.1 Mp, 352×288 – PAL and 352×240 – NTSC)
– QCIF – (0.03 Mp, 176×144 for PAL and 176×120 – NTSC)
– SQCIF – (0.01 Mp, 128 × 96)
On the test, I will use the HP LaserJet P2055dn printer.
Here is a list of tested OIDs for obtaining various SNMP information:
1.3.6.1.2.1.43.11.1.1.8.1.1 (Maximum number of copies of toner)
1.3.6.1.2.1.43.11.1.1.9.1.1 (Remaining number of copies of toner)
1.3.6.1.2.1.43.12.1.1.4.1.1 (Toner color)
1.3.6.1.2.1.43.10.2.1.4.1.1 (Number of pages printed)
1.3.6.1.2.1.43.5.1.1.17.1 (Serial number of the printer)
To see a list of all possible oid’s, you can run the command in Linux:
snmpwalk -v 1 -c public 192.168.24.112
You can check the specific oid with the command:
snmpget -v 2c -c public 192.168.24.112 1.3.6.1.2.1.43.11.1.1.9.1.1
I will use the Mikrotik RB951G-2HnD router as an example.
Connect the media to the USB router.
Let’s look at the status:
store disk print
Format it:
store disk format-drive 1
Reboot the router:
reboot
Add storage:
store add name=share disk=usb1 type=user-manager activate=yes comment="test"
Add share:
ip smb share add name=test max-sessions=15 directory=/test disabled=no comment="test share"
Example of disabling share:
ip smb share disable
Enabling smb:
enable smb
I will give examples of some commands:
ip smb print (view parameters)
ip smb set allow-guests yes/no (allows connection to guest users without entering a password, standard yes)
ip smb set comment TEXT (comment, standard MikrotikSMB)
ip smb set domain NAME (setting the name of the workgroup, standard MSHOME)
ip smb set enabled yes/no (SMB on/off, standard no)
ip smb set interfaces all/wlan1/bridge-local/… (installation of interfaces on which SMB will be started, standard all)
ip smb users add read-only=no name=LOGIN password=PASSWORD disabled=no (user creation)
ip smb users disable (disabling the user)
ip smb users enable (user activation)
ip smb users print (view the list of users)
ip smb users remove (deletion of the user)
ip smb users set read-only=no name=LOGIN password=PASSWORD (user change)
ip smb share enable
ip smb share print (view share list)
ip smb share remove
ip smb share set (changing the parameters of the share)
To get help, use the “?” character on the command line.
To go to the level above – “..”.
Example of configuring the firewall for smb:
add action=accept chain=input disabled=no dst-port=137-138 protocol=udp src-address-list=smb-allow add action=accept chain=input disabled=no dst-port=137,139 protocol=tcp src-address-list=smb-allow ip firewall address-list add address=1.1.1.1 disabled=no list=smb-allow
Official documentation:
wiki.mikrotik.com/wiki/Manual:IP/SMB
wiki.mikrotik.com/wiki/Manual:Store
You can also connect a hard drive to the router via the USB-SATA adapter.