Viewing 11 to 20 of 82 items
Archive | Experience RSS feed for this section

Mysql – Grant a user permission to only show a view

Here are some SQL queries that you need to execute to grant the permission for existing user to a specific view. The first command: GRANT SELECT ON <database_name>.<view_name> TO <user>@<host>   The second command: GRANT SHOW VIEW ON <database_name>.<view_name> TO <user>@<host>


Centos 7 – Add swap partition

Introduction One of the easiest ways to make your server more responsive, and guard against out-of-memory errors in your application, is to add some swap space. Swap is an area on a storage drive where the operating system can temporarily store data that it can no longer hold in memory. This gives you the ability to increase  Full Article…


Magento – Set default value to custom attribute for all products

I have created the custom attribute (test) for products as a text field with default value('test') from admin panel And assign that attribute to default attribute set. Now I can able to see the new custom attribute in product edit page. When I try to filter with the product collection Mage::getModel('catalog/product')->getCollection() ->addAttributeToSelect('*') ->addAttributeToFilter('test', array('like' => 'test'))->getData(); It returns the  Full Article…


Magento – Filter product collection by special price

To create a new page with products have special price only, you need to create a new block that filters discounted products.  Let’s create this file, Special.php in local/Mage/Catalog/Product/Block/ directory. You will have to create this directory path if it’s not already there. Using below code to create new block  <?php class Mage_Catalog_Block_Product_Special extends Mage_Catalog_Block_Product_List  Full Article…


ErrorException: proc_open(): fork failed – Cannot allocate memory in phar

If you see the errors like that ErrorException: proc_open(): fork failed – Cannot allocate memory in phar:///var/www/workspace/MyProject/build/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php on line 943 Call Stack: 0.0523 765208 1. {main}() /var/www/workspace/MyProject/build/composer/composer.phar:0 0.0528 763216 2.  It means your server doesn't have enough memory for composer executes their commands. You can solve it by upgrading your server or you can create  Full Article…