Constantly challenging ourselves to deliver more to our clients

Scripting

Error: Terminating since out of inotify watches. Consider increasing /proc/sys/fs/inotify/max_user_watches

Error: The error means that the system has reached the maximum number of "inotify watches," which limits the ability to monitor files and directories. This typically happens when there are many applications or processes trying to observe file and directory changes. Solution: To increase the inotify watches limit, follow these steps: Open a terminal and [...]

By |2024-11-03T17:42:56+00:00November 3rd, 2024|Centos, Dedicated servers, Scripting, System Administration, Ubuntu|0 Comments

A PHP session was created by a session_start() function call. This interferes with REST API and loopback requests. The session should be closed by session_write_close() before making any HTTP requests.

This error occurs because the session_start() function is creating a PHP session, which interferes with REST API and loopback requests in WordPress. To resolve this: Locate the session_start() code Search your theme or active plugins for the session_start() function. It may be in the theme’s functions.php file or in a custom plugin. Add session_write_close() after [...]

Traffic Bot in Python

There is a Traffic Bot written in Python that can be used to generate automated web traffic. This type of bot can be useful for performance testing, user simulation, or web development experiments. Below is an example of code and a small usage guide. Python Code Example: This script uses the requests library to simulate [...]

By |2024-10-02T16:32:25+00:00October 2nd, 2024|Python, Scripting, SEO, System Administration|0 Comments

How to Detect Duplicate Links on a Website

Detecting duplicate links on a website is important for SEO optimization and improving user experience. Here are several ways to achieve it: Using online tools: Tools like Screaming Frog or Ahrefs allow you to crawl all the links on a website and show you if there are any duplicates. Screaming Frog has a specific feature [...]

By |2024-10-02T16:01:30+00:00October 2nd, 2024|Python, Scripting, SEO, System Administration|0 Comments

Usage and Examples of the grep

The grep command is widely used in Unix/Linux systems to search for patterns in text files. It’s useful for filtering lines that match a specific text or regular expression. Basic syntax grep [options] "pattern" file pattern: The text or regular expression you want to search for. file: The file where you want to perform the [...]

By |2024-09-28T16:08:48+00:00September 28th, 2024|Centos, Dedicated servers, Scripting, System Administration, Ubuntu|0 Comments

Python script logging and posting in a Discuz forum

#!/usr/bin/python3 # -*- coding: utf-8 -*- import logging import re import requests class AutoDiscuz: LOGIN_URL = "/member.php?mod=logging&action=login&loginsubmit=yes" LOGIN_POST = {"username": "", "password": ""} def __init__(self, forum_url, user_name, password): """初始化论坛 url、用户名、密码和代理服务器.""" self.forum_url = forum_url self.user_name = user_name self.password = password self.formhash = None self.is_login = False self.session = requests.Session() logging.basicConfig(level=logging.INFO, format="[%(levelname)1.1s %(asctime)s] %(message)s") def login(self): """登录论坛.""" [...]

By |2024-09-28T15:46:12+00:00September 28th, 2024|Python, Scripting, System Administration|5 Comments

Base-admin.class.php PHP Fatal error: Uncaught Error: [] operator not supported for strings

The error you're encountering, "PHP Fatal error: Uncaught Error: [] operator not supported for strings", indicates that in the file base-admin.class.php of the Revolution Slider (or RevSlider) plugin, you are trying to use the [] operator to add a value to a variable that has been declared as a string. The [] operator is used [...]

How to Create a Script to Automate Backups on a Dedicated Server with Multiple Vhosts

Automating backups on a dedicated server hosting multiple websites via vhosts is essential to ensure data security and availability. In this article, you'll learn how to create a Bash script to automate the backup process for different websites hosted on a server with vhosts. I'll include code examples so you can implement it easily. Step [...]

By |2024-08-23T20:59:51+00:00August 23rd, 2024|Scripting, System Administration|0 Comments

Creating a script for monitoring the free space in the disk and sending an email in case of need

Monitoring disk space is crucial to ensure that servers and systems do not run out of space, which could lead to data loss or system failures. In this article, you will learn how to create a Bash script that monitors disk space and sends an email notification when the available space falls below a specific [...]

By |2024-08-22T22:23:43+00:00August 22nd, 2024|Scripting, System Administration|0 Comments
Go to Top