WordPress Link / Blogroll error

One day I noted that my blog was showing an SQL-error in the LINKS section. What a surprise? How come? I had no idea what action caused this fault, was it a stupid edit somewhere, a bad internet connection while updating my blog or a half succeeded hacking attempt? SQL-syntax errror The error was this:… Continue reading WordPress Link / Blogroll error

Published
Categorized as MySQL, PHP

How to use Apache to compress (gzip) HTML, CSS and Javascript files

In an earlier post we showed you how to use PHP to compress html files and save valuable bandwidth. Now we will choose a setup where apache will compress the files. This is a more efficient setup for your serverconfiguration. Installing mod-deflate When Apache 2 is installed, mod_deflate is automatically installed, but not always enabled.… Continue reading How to use Apache to compress (gzip) HTML, CSS and Javascript files

Published
Categorized as Apache

Storing IP-numbers in MySQL

Internet standard format (dotted string) At first it doesn’t seem that dificult, most people simply store an IP-number as a string in their database tables. It simple and when you have a rather limited amount of addresses a simple VARCHAR 11 wil suit you rather well. We all understand `192.168.1.10` and we use it everywhere,… Continue reading Storing IP-numbers in MySQL

Published
Categorized as MySQL, PHP

PHP 5 oddity in Strrchr()

Just noticed that my PHP 5 mirrors the behaviour of php 4 in the functioning of strrchr. string strrchr ( string haystack, string needle ) This function returns the portion of haystack which starts at the last occurrence of needle and goes until the end of haystack. Like PHP4, only the first character of the… Continue reading PHP 5 oddity in Strrchr()

Published
Categorized as PHP