Often, I search for a function, most likely a wordpress function, within the PHP files. It is usually done within wordpress themes that contains a few other files too, particularly minified CSS file that results in seeing the entire minified CSS file in the output of the search result. This is pretty annoying to say … Continue reading Find in PHP files
References: Ensure systemd services restart on failure by Jon Archer php-fpm systemd unit with auto-restart by Juan Luis Boya García systemd Project Web Page systemd is a system and service manager that runs as PID 1 and starts the rest of the system and services. The main command used to introspect and control systemd is systemctl. Basically … Continue reading systemctl automatically restart service
How to disable the warning message in PhpMyAdmin that says "Your PHP MySQL library version differs from your MySQL server version - This may cause unpredictable behavior"?
After analyzing all the possible options, the following works great for me. I hope it works for you too... find /path/ -type d -print0 | xargs -0 chmod 0775 # For directories find /path/ -type f -print0 | xargs -0 chmod 0664 # For files
Ref: http://unix.stackexchange.com/a/13263/20241 At times, apt may try IPv6 to resolve a domain name. In which case, it may not be desirable and sometimes, it just doesn't work for that particular server. So, to let apt to use only ipv4 for DNS resolution... Edit /etc/gai.conf uncomment the following line... precedence ::ffff:0:0/96 100 If the above line … Continue reading IPv4 for APT
UFW, Uncomplicated Firewall, was created for Ubuntu, then ported to other distributions as well, primarily to Debian. So, it's no wonder, there are some incompatibilities when running UFW under Debian, at times. Those incompatibilities or errors are usually fixed in the stable releases. However, due to the difference between how things work and how we … Continue reading UFW error in Debian
Recently, had a look at MySQL slow log to see what's happening in a particular site. MySQL logged the unix timestamps that is good for many reasons. In order to convert this, here's a one-liner... date -d @1382734106 # output - Fri Oct 25 20:48:26 UTC 2013
Some people try to test out an application, a site, a contact form and may use an email like firstname.lastname@example.org that would never be delivered by the local email delivery system and would be in the queue forever, or until it is deleted. Here's a trick to delete such emails from postfix. Similar commands may … Continue reading Postfix Flush Deferred Email Queue
Fedora 19 seems to have changed the way one can setup the hostname and fully qualified domain name. By making this change, it streamlined the setup similar to how things work in Debian derivatives, including Ubuntu. Here's how it's done... In Amazon Linux AMI, one still has to set it up only in .