I needed something that can do the following: – automatically reboot if another server goes missing/offline – reboot if instructed by another server – it must be failproof and work in all conditions (bad hardware, bad memory, lots of errors) Why? Because I want more control, more automation and don’t want to depend on datacenter […]
There always come a time where you need to temporarily stop a site for some required maintenance. The simplest quick&dirty method would be to stop the web server, but it’s not pretty for the users and also it brings down all the sites you are hosting. Another method (which I’ve used in the past) was […]
Mysqldump must be one of the most frequently used MySQL utiliies. It’s very easy to use to peform backups with it and it’s reliable. And since its output is a set of SQL statements it’s easy to understand what’s happening and how to use it. For smallish databases mysqldump it’s perfect, but once you’re getting […]
Basically it seems that you can’t use the following combination: https + jQuery CDN (code.jquery.com) + Internet Explorer / Windows XP. Altough jQuery 1.x officialy supports Internet Explorer 6+, this doesn’t work. Why? It seems that the official jQuery CDN can’t handle https connections coming from Internet Explorer running under Windows XP.
There are a few different ways of accessing MySQL from PHP. Historically the mysql extension was the only way until PHP 5.0 (circa 2004). After that mysqli appeared, which is an improved version of the older mysql driver. And also PDO, which gives you an abstraction layer for different databases. Unfortunately there’s still a lot […]
I wasn’t able to find any tutorial or guide on how to programmatically verify a site for Google, server-side from PHP. What follows is my attempt at doing it. You have to install “Google APIs Client Library for PHP”, available at https://github.com/google/google-api-php-client. I recommend reading the Google documentation on Google Site Verification API from https://developers.google.com/site-verification/v1/getting_started […]
Woke up one morning with an awesome message in the server logs: smartd: Device: /dev/sdd [SAT], 1 Currently unreadable (pending) sectors Any hard disk error is a nightmare. It’s even more interesting when you have no ideea what happened.
Why? The purpose of this article is to show you some tips that may help you reduce the conversion time of MySQL tables when switching to InnoDB. Although this is not going to be a problem anymore since MySQL is using InnoDB by default in newer versions, there are still people out there using MyISAM […]
gettext is the GNU internationalization and localization (i18n) library, which can be used in almost any programming language. And, of course, it can be used under PHP too, to internationalize your web applications. I will not go into gettext usage details, there are enough resources available for that. Official PHP gettext documentation: http://www.php.net/manual/en/book.gettext.php A nice […]