MySQL/PHP character encoding errors (e.g. æ,ø,å) – import, connection, table encoding and html meta header

Today I’ve got four hints that usually solves the character encoding errors I encounter with MySQL and PHP (usually triggered by the special Danish vowels æ,ø,å): PhpMyAdmin import: use the official import function rather than executing crude sql inserts – because then you can specify the character encoding instead of using the default one which […]

install and setup LAMP on Ubuntu for development

First install Apache2, PHP5, Mysql, Phpmyadmin in that order. WEBROOT ######################## Then lets setup ~/public_html as webroot rather than /var/www/ (because it requires root privileges to modify there which is a pain!): 1. Copy the existing website configuration (virtual directory): sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mysite 2. Modify the following of mysite: gksudo gedit /etc/apache2/sites-available/mysite /var/www -> […]