Disable SQL strict mode in Mysql 5.7
Add this to /etc/mysql/mysqld.conf/mysqld.conf [mysqld] sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION Read More →
Sendmail – control who can send relay
Sendmail use “access” database to control who can use this email server to send email out. It’s easy, just edit this file /etc/mail/access , but access is a database file, after you edit it you need to recreate database map makemap hash /etc/mail/access < /etc/mail/access Put your control list in the at the end of the file: [email protected] REJECT cyberspammer.com REJECT TLD REJECT 192.168.0 RELAY 192.168.1 OK REJECT: reject all email from that source RELAY: allow that IP range to use our server as a relay. OK: allow to send any email even though it’s blocked in some other rules.Read More →
Clear DNS cache in Google Chrome
The following url will open the DNS info in Chrome, you can clear dns cache as well. chrome://net-internals/#dns Read More →
good links
### Good Links: Unlocking the Power of Reliable Online Resources In the vast expanse of the internet, we are constantly bombarded with a never-ending flow of information. The challenge, however, is not the abundance of content, but rather finding **good links**—links that lead us to valuable, trustworthy, and relevant resources. These links are the digital pathways that help us explore, learn, solve problems, and entertain ourselves in an increasingly complex online world. But what makes a link “good”? Why does it matter? And how can you ensure that the links you click on lead you to useful, credible information? In this article, we’ll delve intoRead More →
Godaddy: treat html file as php
I used to put this content in my .htaccess to treat .html as php file, but some how it’s no longer working in godaddy. AddType application/x-httpd-php .htm .html AddHandler x-httpd-php .htm .html I found a solution, use the below text: Options +ExecCGI AddHandler x-httpd-php5-cgi .html Read More →
Samba troubleshooting commands
Edit /etc/samba/smb.conf , add log level =3 Run server in debug mode /etc/init.d/smbd -F -S Smb client test smbclient -L //server/sharename -U username Test param testparam -v Read More →
Backup & Restore Firewall Rules with iptables – Ubuntu
Save: iptables-save Backup : iptables-save > firewall_backup.txt Restore iptables-restore -c < firewall_backup.txt View Rules: iptables -L Read More →
Upgrading Osticket from 1.6 to 1.10
In my experience, we need to migrate to 1.7 first in order to move all attachments from file system to database , if you go directly from 1.6 to 1.10 , attachment might be missing. We need to run the following queries before to fix some issues with database: ALTER TABLE `supportedf_help_topic` ADD INDEX(`topic`); ALTER TABLE `supportedf_department` ADD INDEX(`dept_name`); If you have duplicate topic you might need to clear the topic first TRUNCATE supportedf_help_topic;Read More →
Mysql: how to check the maximum connections that the server has handled?
You can run this command to find the maximum connections that the server has served since it starts? it’s useful when we want to know if sometimes we reach our maximum connections limit. The query is: SHOW STATUS WHERE variable_name = ‘Max_used_connections’; Read More →