Such error happens in 1.7.x branch (I saw it in 1.7.2), when entering database parameters you’re seeing “PHP Extensions “0” must be loaded” instead of next step. This […]
Cannot find autoconf when using phpize on Mavericks
running: phpize command can cause such sample output: Configuring for: PHP Api Version: 20100412 Zend Module Api No: 20100525 Zend Extension Api No: 220100525 Cannot find autoconf. Please […]
How to use MySQL to search in php serialized fields
Well, first rule – you should not do this. But if there is good reason, consider using such query for searching in index-based arrays: SELECT * FROM table […]
Quick tip – working with dates with ADODb and MSSQL 2000
Yes, it can be really painfull – MSSQL (at least instance I’m using) is saving date in format “d/m/Y H:i:s” but in every part of code I had […]
Quick tip – how to get specific posts/page by their ID?
At first look it was simple, just: $args = array(“post__in” => array(1,2,3)); $posts = new WP_Query(); $posts -> query($args); while ($posts -> have_posts()){ $posts -> the_post(); echo the_title().'<br/>’; […]
How to get payment method in Magento?
Just call: $payment = $order->getPayment()->getMethodInstance()->getTitle();
How to get country name from country ID in Magento?
This one is quite simple: $countryName = Mage::getModel(’directory/country’)->load($country_id)->getName();
How to fix broken serialized string in php?
From time to time previously serialized array will get broken. The most common problem occurs when string length is invalid so instead of a:2:{i:758;s:4:”test”;i:759;s:4:”test”;} you have a:2:{i:758;s:4:”test”;i:759;s:9:”test”;} becouse […]