Twig errors with custom template on Chamilo upgrade

If you use Chamilo and decided to develop your own template, you might be faced with an issue while upgrading from Chamilo 1.11.2 (or below) to 1.11.4 (or above). The issue will usually be reflected by either of these: a…

More Details
Chart of execution time between dirname(__FILE__) and __DIR__ in PHP, showing 4 to 10 times efficiency improvement using __DIR__
dirname(__FILE__) vs __DIR__, which is faster?

If you’re developing PHP software today but studied PHP based on old-ish manuals or manuals written by people who did, you might find a mix of calls to dirname(__FILE__) and __DIR__ and wonder what the difference is… Past the fact…

More Details
Raspberry Pi 3 Model B picture
Chamilo 1.11 on Raspberry Pi 3 for off-the-grid situations

This article can be considered an update of our first article on installing Chamilo (on a Raspberry Pi B+). This time, we are testing it with Raspberry 3, as of the 1st of April 2017 (no joke intended). Last time,…

More Details
Versions of PHP in Ubuntu

If you have to maintain an open source project written in PHP, like we do with Chamilo at BeezNest, you’ll have to test your software on multiple versions of PHP to make sure of how well your code is supported…

More Details
Benchmark: dirname(__FILE__) vs __DIR__ in PHP

dirname(__FILE__) and __DIR__ give exactly the same result in PHP, although one (__DIR__) is evaluated at compile-time, while the other (dirname(__FILE__)) has at least part of it (the function) evaluated at execution time. Ever wondered what the difference is, in…

More Details
Prevent WordPress MailmanWidget widget to hide after registering your address

If you use the Mailman Widget as an important design element, you might be annoyed by the fact it disappears once you registered your e-mail. A quick hack to this behaviour is to modify ns_widget_mailman.class.php (see comments): public function widget…

More Details
Can’t use function return value in write context

Did you ever develop some nice code, then simply wanted to check if a string was only composed of white spaces or tabs, and used something like this: if (!empty(trim($string))) { … } …only to get a bad error appear…

More Details
Creating new tasks in chamilo course-sessions

In the category of little scripts that can make your life easier when managing huge Chamilo portals, this is a little one that creates one tasks-folder called “ALP” for the “Assignments” (work) tool in each active course for a portal…

More Details
On PHP and cache slams and solutions

While reading about Doctrine’s cache mechanism (which applies to other stuff than database queries, by the way), my eye was caught by a little message at the end (last section) about cache slams. I have used cache mechanisms extensively over…

More Details
PHP’s call_user_func_array() is slow

I just solved an issue that had me waking up in the middle of the night for weeks (just pushing it a bit) and I have to thank PHP’s community and in particular a guy named Brad Proctor for writing…

More Details

Quick Contact Form