Handling execution time for PHP (FPM)

The problem: setting max_execution_time / using set_time_limit() I don’t get the wanted results If you are here, you are probably looking for an answer to the question: why set_time_limit() is not working properly and the script is killed before? or why ini_set(‘max_execution_time’, X), is not working properly and the script is killed before? The answer is not exactly […]

Magento2 database transactions: how to save multiple model instances

Sometimes in your logic you have to save different model instances at once. Magento1 already had the concept of transaction, using the classic singleton model: Mage::getModel(‘core/resource_transaction’) Magento2 has its concept of transaction, too, so let’s see with a simple example how to use this feature. Let’s say we have a DB table ‘table’ described as […]

Magento2 Rest APIs: add a bundle to cart

Yeah, with Magento2 it’s hard even to perform some common tasks. Here’s how to add a bundle to an existent cart. Let’s assume that our bundle has bundle01 as its SKU. First of all, we need to get some info that we are going to pass as parameters later. GET /products/bundle01?searchCriteria Here, we need to take […]

Mac OS X, Apache, php, gettext

Da storico utente Linux sto facendo un po’ fatica ad entrare nel mondo della mela (abbracciato per motivi puramente professionali, leggi sviluppo su piattaforma iOS). Dato che ci sarà sicuramente qualcuno come me, abituato a risolvere con un apt-get install <qualcosa>, ho deciso di riportare qualche trick particolare in maniera da (se qualcuno capitasse da […]