Caching Github login credentials

Thursday, 7. May 2015

If you are new to Github and you are cloning your repository via HTTPs url, you will notice that Git will prompt you to specify login and password everytime you try to pull or push your changes to and from GitHub.

Obviously this is not ideal (especially if you push and pull often). Luckily as of Git 1.7.10 or newer you can use the credential helper feature to cache credentials for a specified time. This means, you only have to specify your login details once and git will cache those for the time duration you specify

To achieve this, all you need it to run the following command on your terminal window and you are done! Time is in seconds incase you want to change to something that works for you!

git config --global credential.helper 'cache --timeout=7200'
# Set the cache to timeout after 1 hour (setting is in seconds)

Hope this helps someone! Comments below if you have something better!

Filter Products By Attribute With NULL values In Magento

Monday, 30. September 2013

One little tip for someone who wants to select a set of items or products in Magento based on attribute with a NULL value.

$collection = Mage::getModel('catalog/product')->getCollection()
    ->addAttributeToFilter('ATTRIBUTE_CODE', array('null' => true)) 

Got error 28 from storage engine – Mysql Database

Friday, 19. July 2013

I came to a surprising problem this morning with one of our client’s site where all of a sudden Magento was throwing error Got error 28 from storage engine on error logs

Had no clue what that means really so looking around the server ended up noting the server is actually run out of space!

Shame, but that happened to be the reason behind this problem and things went back to normal after fixing the space issue.

Oh, well, shift happen! :)

WARNING: Error at offset 761 of 5887 bytes Unserialize PHP string

Friday, 14. June 2013

If you have worked with serialize function in PHP to serialize objects in order to save them in database – and ofcourse if you are reading this post – you have once come across this error

WARNING: Error at offset 761 of 5887 bytes

It’s annoying and always gets me. The main reason for this problem is due to the fact that you have either empty variables in your serialized string or unwanted characters.

The simple solution will be to ensure your encode the string first before you save it to the database.. seems to work well for me (but of course test if for your needs and let us know if it worked for you!)

encode your serialized string with base64

$safeSerializedString = base64_encode(serialize($this->_arrayData));

decode your serialized encoded string with

 $_array_object = unserialize(base64_decode($_row["serialized_column"]));


Qo-Go | Business Culture and Personality Directory for Interesting Businesses

Wednesday, 29. May 2013

Is your business culture and personality interesting and stand out from its competitors?

If you answered yes or no, then you need to check out Qo-Go.

It’s the newly innovated social business directory helping interesting business promote and advocate their values, business culture and personality online like never before.

Unlike many business directories out there, Qo-Go attracts interesting businesses. It provides a platform for people around the world to learn and discover interesting facts about businesses, inner culture and core values of businesses they deal with everyday, easily.

As a business directory people will get to find out about your contact details, a bit of reviews and recommendations – but the platform goes a step further to ensure your businesses promote more than just “about us” text and more about activities that make your business unique, interesting and stand out online

It is also an opportunity for businesses to connect with people (their customers or service users) and other businesses on a personal level.

A chance to share social signals with each other and a place where business people really gets to go social and showcase their true values that makes them — well, them!

Don’t wait much longer – get your business registered on Qo-Go today and show everyone why you are the best and how interesting your business culture and values really are!

unable to complete request error while saving attributes

Monday, 20. May 2013

There is a strange error sometimes happens when you upgrade your Magento install and not being able to assign attributes to attribute sets

If you have have across this error: unable to complete request error then this solution could be what you just need to do to solve it.

1) Flush your Magento cache storage
First point of call, should be flushing your magento cache storage.

System -> Cache Management -> Flush cache storage

Now try to assign the attributes again.

If that fails – disable cache management all together for the duration of the assignment process

System -> Cache Management -> Disable All Cache

You may also want to delete the cache files all together should you still have problems. /var/cache/


Street Address is a required value. street address must be equal to or greater than 2 characters

Thursday, 9. May 2013

Came across this Magento buggy message while going through checkout steps.

Magento installation Strangely enough, the problem only occours on the Mobile theme but the desktop version is just fine!

Anyway, the quick/workaround fix to this problem can be done from Magento admin panel

Simply navigate to:

System > Configuration > Customers > Customer Configuration > Name and Address Options

Then look for a field: Number of Lines in a Street Address

If it is set to 2 – clear it and save your configurations.

Back to the checkout page and hopefully there will be a smile on your face!


Error 501 net::ERR_INSECURE_RESPONSE Unknown error Plesk

Friday, 5. April 2013

I have had this issue while accessing plesk control panel. With a lot of forums about this issue I was still unable to go pass this error until I found out the issue could actually be due to SSO (Single Sign-On)

Jumped to my command terminal and whacked in this commend to disable sso – and whallah! I could now access the Plesk control panel as usual..

/usr/local/psa/bin/sso --disable

Fatal error Declaration of Zend Pdf FileParserDataSource File __construct

Wednesday, 3. April 2013

Had this issue printing Magento invoices on Windows server which was a bit odd.

On Linux development Machine everything thing appears to be working absolutely fine. Moving to live server which is a Windows Server machine, I kept getting this error

Fatal error: Declaration of Zend_Pdf_FileParserDataSource_File::__construct() must be compatible with Zend_Pdf_FileParserDataSource::__construct() in …\lib\Zend\Pdf\FileParserDataSource\File.php on line 41

A bit of browsing on the internet suggests re-installing the OS which was not an option for me! So to work around the issue, I simply accessed this file and function


And commented out the construct function. Not very efficient but solved the issue (atleast for now). If you have a better idea or a moment of Eureka, please drop a line!

# abstract public function __construct();

Category Tree Not Showing In Magento Admin Product Edit Pages After Upgrade

Wednesday, 3. April 2013

I have come across this issue recently after an upgrade and site merging of two Magento stores in version

The issues in the end came to be that the categories migrates from Site B to Site A somehow lost the Child_Count values in the catalog_category_entity table

To solve this particular problem I had to do the following. You will need access to database to implement this solution with IDE like PhPMyAdmin or something similar.

1. Create a temporary table containing count values
This step will depend on the path values on your database. For me, the Root category was of ID 340.. So all you need to do is to replace the 340 with your root category ID or the ID of the category you want to fix.

CREATE TABLE temp_category_child_count (entity_id INT(11), child_count INT(11));
INSERT INTO temp_category_child_count
SELECT parent_id, COUNT(entity_id) total  FROM `catalog_category_entity` WHERE path LIKE '1/340/%' GROUP BY parent_id ORDER BY parent_id;

2. Now move the counts to the entity table
This step will now move the children count values from the temp table back to the main category entity table.

UPDATE `catalog_category_entity` a, temp_category_child_count b 
SET a.children_count = b.child_count
WHERE a.entity_id = b.entity_id;

3. Finally refresh your Magento indexes
This is important step to ensure your Magento database is up to speed with your changes. The important index to refresh is the Category Flat Data

Hopefully now when you go to your Product Edit pages again, you will see your category tree nice and clear!