Search & Replace using rpl

rpl is a very useful command used for bulk string replacement in files. Basic usage is to specify two strings and one or more filenames or directories on the command line. The first string is the string to replace, and the second string is the replacement string. Another Linux command used to replace string is […]

Read More…

common ports used by services

Here are common ports used by various software and services. 21 FTP Server 25 SMTP SERVER, EXIM, MAIL ENABLE, HMAILSERVER, etc 53 DNS SERVER 80 WEB SERVER (iis, apache) 110 POP3 135 Windows RPC, Remote Procedure Calls 139 NetBIOS Session (TCP), Windows File and Printer Sharing 143 IMAP 445 Windows Server Message Block, NetBIOS, File […]

Read More…

Disable open_basedir in plesk server

open_basedir is a PHP security feature. With open_basedir enabled, your web application can only access files within specifically allowed folders. If your application tries to access files from a folder that is not allowed, the application fails with an error message. To disable open_basedir in Plesk do the following. Login to your Plesk Control Panel. […]

Read More…

How to create a WordPress shortcode?

wordpress

WordPress Shortcodes allow you to extend the functionality of WordPress. Shortcodes are text within the square bracket. You can paste this shortcode on any page, post or widget. WordPress executes the PHP function associated with the shortcode and displays the result instead of the actual shortcode text. You can find more about WordPress shortcodes at […]

Read More…

Create Dockerfile From Image

Docker

If you have a docker image and don’t have the Dockerfile used to create the image, dfimage can help you re-create Dockerfile. To find information about an image, you can use the command “docker history IMAGE_ID”. History command will show all actions taken on the image, including the commands used. You can use this information […]

Read More…

Magento 1 Invalid Form Key

magento 1 login error

When login to Magento 1 Admin area, i get an error Invalid Form Key. Please refresh the page. This is because the value of web/cookie/cookie_domain set wrong. This should be the current domain name.

In this case, the domain name was different. To see the value, you can run

You can leave cookie […]

Read More…

Magento 1 Password Reset

To reset the password for the admin user in Magento 1 installation, go to phpMyAdmin, run the following SQL command.

In the above SQL command, replace PASSOWRD_HERE with your new password. If you don’t know Magento backend URL, you can find it in file app/etc/local.xml

In this case, Magento backend URL is yourdomain.com/2XwA5Vb6PW […]

Read More…

Display real time statistics with Logtop

Logtop is a real-time log analysis tool. It can be used to understand log files. The developer describes it as “Display real time statistics of whatever you want.”. You can pass any value to it, logtop aggregate the data and show it by the number of times the data appear. Most repeated items shows on […]

Read More…

MySQL 8 server requested authentication method unknown to the client

MySQL

On a server running MySQL 8 and PHP 7.3, I get the following error [email protected]:~$ php 1.php PHP Warning: mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password] in /var/www/html/1.php on line 6 PHP Warning: mysqli_connect(): (HY000/2054): The server requested authentication method unknown to the client in /var/www/html/1.php on line 6 Failed to […]

Read More…

Install Minikube with docker driver on Ubuntu

minikube docker provider

Minikube is a Kubernetes implementation for development and testing. By default, it uses Virtualbox. The newer version support docker driver, this allows you to use docker to run your minikube Kubernetes cluster. You can find documentation for minikube at https://minikube.sigs.k8s.io/docs/start/ First of all, we need to install Docker, for this, run the command. You must […]

Read More…