How to fix FPDF error: Undefined font

If you get this error, this could have one of the following causes 1. You forgot to set the font Before you set the font, its necessary to add the font! $pdf->AddFont(‘DejaVuSansCondensed’, ‘B’, ‘DejaVuSansCondensed-Bold.ttf’, true); $pdf->SetFont(‘DejaVuSansCondensed’, ‘B’, 11); 2. You forgot to set the fontpath Imagine you have specified some custom fonts then you need […]

How to download single database from PLESK backup manager

If you want to download a single database from backup, its not possible through the PLESK GUI. You can only download the full webspace which may be multiple GB large. But there is a trick. The content of every webspace is stored in /var/lib/psa/dumps/domains/ Every webspace has a databases subfolder: /var/lib/psa/dumps/domains/**webspacename**/databases/ Visit the folder with […]

Load does not work for dynamical relationships?

Imagine you have the following two relations: /** * Relation working/holiday/.. hours * @return [type] [description] */ public function relatedHours($type = null) { $type = $type ?? $this->type; return $this->hours()->where(‘type’, ‘=’, $type); } public function workingHours() { return $this->relatedHours(Type::WORK); }

Imap Basics

I explain how to delete or move mails from a mail account through a script. First you should setup a connection. This should look like this: /* connect to server */ $hostname = ‘{}’; $username = ‘’; $password = ‘top_secreted_69’; /* try to connect */ $inbox = imap_open($hostname,$username,$password) or die(‘Cannot connect to mailbox: ‘ . […]