Aww, look! Little Bobby Tables is all grown up and in a CAPTCHA now. (via Reddit) Relevant xkcd comic. (Oh look, it’s almost 10 years old!)
PHP Notice: Undefined variable: _SERVER in ..
I upgraded Linux on this server a while back and in the course of that upgrade PHP was upgraded too, to version 5.5.9. Since I had a modified php.ini it asked me to check over any new options. There were a few but I fixed anything that looked like it […]
PHP is_numeric() vs is_int()
Some lessons you don’t forget, but this one I did because it doesn’t come up very often. Don’t use is_int() because, as Jeremy says, it’ll lie to you. Use is_numeric() instead. Copy the following chunk of code into a php file and run it. You’ll be surprised at the outcome: […]
No activity within 1800 seconds; please log in again
1800 seconds is such a long time, right? It’s 30 minutes. It’s 0.5 hours. It’s 0.0208333333 days. It’s also 5.70397764 × 10-5 years. And it’s not long enough for me. phpMyAdmin logs you out after 1800 seconds, obviously for security reasons. That’s fine if there are other people about, if […]
Is your eAccelerator cache dir still there?
While looking through this WordPress performance post I realised that eAccelerator might not be running properly on this blog. For some time I’ve noticed this site hasn’t been as quick off the mark as it used to be. Dare I say it, but it was even a little sluggish! If […]
Notes when upgrading to PHP5
I upgraded one of my servers to PHP5 this morning. Two things to watch out for: The location of your php.ini may have changed. It’s probably now in /etc/php5/apache2/. You need to copy over any changes from your old one. Update your libraries too such as the mysql client and […]
Cannot load mysql extension. Please check your PHP configuration.
A friend recently had a problem configuring a new server. He installed PHP, Apache, MySQL and phpMyAdmin but when he launched it he got the following error: phpMyAdmin – Error Cannot load mysql extension. Please check your PHP configuration. If you’ve installed all of the above more than once you’ll […]
Killing off PHP
Do you know why Apache processes get stuck and stop responding when serving pages on a WordPress site? I’ve seen this happen here and on my previous host on a regular basis. I don’t know what happens. It can’t be a PHP script gone into an infinite loop because the […]
Gzip Compression or No?
mod_gzip, zlib.output_compression or whatever way you compress your web pages is a great way of reducing your network traffic costs but comes at the cost of increased CPU usage. Despite what you might think, it can be more expensive to send data over the network, especially to slow clients than […]
Five common PHP design patterns
Over at IBM Developer Works there's an interesting article on PHP patterns. If you've never come across patterns before it's a good introduction. Just remember that these methods of solving software problems are most useful when you've got lots of code. Using the MVC pattern to print "Hello World!" is […]