centos

XDebug your IDE

With most languages, when you develop you get the (wonderfully helpful) option of setting breakpoints, stepping through your code, adding watches and inspecting the overall state at any specific point in time. PHP differs in that, being a scripted language hosted in another process (eg Apache) it normally doesn't offer that. Here's how to enable your IDE to do get all the nifty features.

CentOS 7 server installation

CentOS 7 is out, and it brings some much needed features for web developers! For starters, MySQL is replaced by MariaDB (much better performance for InnoDB, and a better client), and PHP is 5.4 out of the box. In addition, multitudes of tweaks have been made to the system, making it more responsive.

The following is a guide (with screenshots) for installing a basic LAMP stack with the new OS, on an empty machine (in this case, a virtual machine), using the NetInstall image (Minimal is not yet available, but being worked on).

Recovering InnoDB tables from ibd and frm files

First day of the year in the office, and a call came up "site isn't working". Browsing to the site, I noticed it couln't connect to the database. Thinking it was probably some glitch, I logged in remotely to the server, to find that the filesystem was readonly. After trying to figure out why me, being root, could not do anything to the filesystem... it rebooted. My first filesystem crash.

Protecting your cache folders

I spent the past few days in the VERY unpleasant situation where I had to remove tons of spam-sending scripts from a couple of websites I host. These were in relation to unsecured, unmaintained Joomla! installations, and exploited the cache folder. I won't bother you with the why or how, just know that the vulnerability existed, and has been fixed for versions 2.x and up -- NOT 1.x. Here's the simple way to secure yourself without changing the Joomla site code.