Moodle installation problem

I just installed moodle on my server and got into a big mysql error complaining about binlog and other stuffs…

Cannot execute statement: impossible to write to binary log since 
BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine 
limited to row-based logging. InnoDB is limited to row-logging when 
transaction isolation level is READ COMMITTED or READ UNCOMMITTED

After a bit of googling and understand what this was about I figured I should add the following in my my.cnf file and then restart mysql.

How to download a youtube video under linux command line

Here is a great python script very useful to download an HD video from Youtube using the command line in Linux.

It’s very simple, download and run. The result is an mp4 file that you can watch offline with VLC or Media Player Classsic under Windows or any other mp4 player under Linux.

Fix a ubuntu upgrade problem with Grub2

With Ubuntu 10.04 came a new version of Grub. During an upgrade from a previous version to 10.04 or higher there will be a time when the system will ask you if you want to keep your own version of the configuration or get the package maintener version.

If I am not mistaken, you should say you want the maintener one.

But then something strange may happen depending on your upgrade path.

How to connect to someone out of your network on Linkedin

These days I am looking for a web developer in Lithuania. It is not very easy because it’s a small country… but on Linkedin you can find quite many profiles.

The problem is, sometimes you can’t connect to these people because they are too far out of your network.

Usually you would get the first name of the person and some skills in his profile.

How to get the value of the latest auto-incremented value on a mysql table with concurrent connections

When building a web application it can seem a bit tricky to get the value of the id (primary key) of the latest row inserted in a mysql table.

It is not that complicated.

The function LAST_INSERT_ID() can help you finding that. This function will return the latest auto-incremented value. No need to specify the table, it just takes the latest one.


The next question is: what happens when I have many concurrent sessions on the same server? Will I get the latest inserted id from another user?

Modify the session timeout in phpmyadmin

Login and re-login and re-re-login in phpmyadmin is a huge pain.

Here is the way to extend sessions duration.

Open the file in /usr/share/phpmyadmin or in /etc/phpmyadmin

Add the following line:


And in php.ini, modify the following line:

session.gc_maxlifetime = 86400

Restart apache.

apache2ctl restart

You now have 24h sessions.

Assign a fix MAC address to a vmware network interface

MAC addresses are assigned at the bootup of a virtual machine. But there is a way to assign a fix hardware address to a vmware network interface by editing the virtual machine with Vi.

Simply connect with SSH to your ESXi and go to /vnfs/datastore1 or anywhere you put your vm.

If your virtual machine is called vm1, go to /vmfs/datastore1/vm1

Open the file vm1.vmx using Vi.

Around the end of the file there will be the configuration of the network interfaces.

You should see things like: