To sort a table results randomly use the ORDER by RAND(); option. eg. Select * from table_name ORDER by RAND();
Add Custom PHP handler for PLESK
https://support.plesk.com/hc/en-us/articles/115000497853–How-to-add-a-custom-PHP-version-in-Plesk-for-Linux- Sample command : plesk bin php_handler –add -displayname 5.6.4 -path /usr/local/php564/bin/php-cgi -phpini /usr/local/lib/php.ini -type fastcgi -id 5.6.4-custom -clipath /usr/local/php564/bin/php
Add Gzip Compression to Nginx
use the following directives on Nginx config to enable Gzip compresssion. gzip on;gzip_disable “MSIE [1-6]\\.(?!.*SV1)”;gzip_proxied any;gzip_comp_level 5;gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/rss+xml text/javascript image/x-icon image/bmp image/svg+xml;gzip_vary on;
Disable Right Click on Web Site
MariaDB Upgrade from 5.5 to 10.5 breaks Sites with SQL error – Column No Default Value.
Added the below to my.ini sql-mode=”NO_ENGINE_SUBSTITUTION” Source of fix: https://www.farbeyondcode.com/Solution-for-MariaDB-Field–xxx–doesn-t-have-a-default-value-5-2720.html
Enable Antivirus on All Mailboxes on Plesk Server
To enable antivirus scanning for all mailboxes on a Plesk server run the following command as root.
Repair AD DNS
So I just installed a clients new AD DC Server and then tried to add a machine to the domain with no success. DNS SRV records were missing. After searching I found this command to repair an re-add the DNS records to the server. dcdiag /fix I then reloaded the DNS Zone and restarted the […]
Search and Remove/Delete File by Pattern/ Name or Wildcard on Linux
find . -name ‘\*_log’ -type f -delete
Repair / FIX MAC HFS+ Partition on Ubuntu
Check partition label using disk -l make sure hfstools / hfsutils installed on Ubuntu run command as root: fsck.hfsplus /dev/sdab2
Repair Plesk Mailboxes
~# /usr/local/psa/admin/sbin/mchk –help Restore settings for all mailboxes. Usage: /usr/local/psa/admin/sbin/mchk [OPTION] OPTIONS: –without-spam restore all settings except for SpamAssassin configuration –with-spam restore all settings –spam-only restore only SpamAssassin settings Usage example: ~# /usr/local/psa/admin/sbin/mchk –with-spam