Zend Exam 5.5 impressions

The information is rather scarce regarding the updated 5.5 PHP exam.  I will not attempt to write a full guide as there is plenty of those online. Neither can I reveal any actual questions from the exam. Instead I will post a few tips, that I think could help preparing for the exam. 1. Set […]

Read More Zend Exam 5.5 impressions

MySQL performance testing

Might be a silly thing to mention, but I have seen similar topics incorrectly replied on Stackexchange. So here it goes: Why does MySQL client (SQLYog, phpmyadmin) produce results quickly when testing query performance, but running from PHP or mysql cli is slow and takes much longer?   The reason behind this is that MySQL […]

Read More MySQL performance testing

Iptables firewall script

There are plenty good firewall scripts online. Some of them are too strict for using on servers, however. Also I highly recommend shorewall  for more complex rules. This is my implementation of iptables, which I am using on multiple Debian servers. The nice thing about it, is that nagios monitoring is supported by executing status command (might only […]

Read More Iptables firewall script

Bash backup rotation script

A while ago I was looking for a good backup script, and there were none. It had to be fast, to cope with big data sizes, and configurable so I could set how many days to keep backups. This folder structure has to be created manually. Rotation script will take anything in incomming folder and move it […]

Read More Bash backup rotation script

IE6 Invalid pointer

It’s time for JavaScript errors 🙂 I am getting an error in some prehistoric code on Internet Explorer 6: Line xx Invalid pointer Not really self explanatory. The code on that line is: frame.location = encodeURI(location_url); Turns out location_url was too long for IE6 to handle, thus limiting the length solved the problem.

Read More IE6 Invalid pointer

Too many connections

Had this error today mysql_connect() Too many connections Currently used connections can be seen by executing SQL statement: SHOW STATUS LIKE ‘%onn%’ Apparently caused by persistent connections not reused correctly. Fixed by editing php.ini variable mysql.allow_persistent Tip: persistent connection are (usually) bad. Don’t use them, unless you know what you’re doing. References: http://stackoverflow.com/questions/1620662/mysql-see-all-open-connections-to-a-given-database http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.allow-persistent

Read More Too many connections