OSX Install Phalcon Error: undefined method `desc’ for Formulary::Formulae::Zlib:Class

November 5, 2015

Installing PHP Phalcon framework on Mac OS using this command brew install php56 php56-phalcon Home brew may have error like: ==> Installing php56 from homebrew/homebrew-php Error: undefined method `desc’ for Formulary::Formulae::Zlib:Class Please report this bug: http://git.io/brew-troubleshooting /usr/local/Library/Taps/homebrew/homebrew-dupes/zlib.rb:2:in `’ To solve this, run: brew update

Building ‘_imagingft’ extension error command ‘cc’ failed with exit status 1

November 3, 2015

This error is due to freetype header missing. _imagingft.c:73:10: fatal error: ‘freetype/fterrors.h’ file not found #include <freetype/fterrors.h> ^ 1 error generated. error: command ‘cc’ failed with exit status 1  First, verify freetype is installed. With brew: brew install freetype If freetype installed, warning message shows: Warning: freetype-2.5.5 already installed Next to fixed the issue, is […]

Screen Shot 2015-11-03 at 11.33.25 AM

Pip Install error: invalid command ‘bdist_wheel’ Mac Os

November 3, 2015

Install the wheel package first: pip install wheel If requirement already satisfied, you will see: Requirement already satisfied (use –upgrade to upgrade) Then, you should update your setuptools: pip install setuptools –upgrade Run again pip install, it should works now!

python validate string allowed only spaces, alphabet and numbers

September 29, 2015

Using pattern matching, this is not hard to achieve. To check that each character matches your requirements Regular expression “^[a-zA-Z0-9_]*$” With spaces checking: “^[a-zA-Z0-9_ ]*$” Code example: if allow_special_char == False: import re if not re.match(“^[a-zA-Z0-9_ ]*$”, gname): print “Invalid” Regular expression refer from http://stackoverflow.com/a/336220/1903116 reference: http://stackoverflow.com/questions/19970532/how-to-check-a-string-for-a-special-character

Magento migration product image not shows up after upload

August 16, 2015

This is a very common but annoying problem many of us face while working with magento. Sometimes we couldn’t really figure out what exactly is the problem. But don’t panic: Try: *Changing the attributes/Permissions All the FTP clients (fileZilla, cuteFTP etc) give you the option to change the file/folder attributes. Just right click on the […]

Magento debug “cannot add item to cart”

August 14, 2015

When adding a product in shopping cart on your magento installed website, it shows message as below. It does not allows you to add the product to your shopping cart. Cannot add the item to shopping cart. When adding a product to your shopping cart system needs a directory in which the sessions files can […]

Symfony LswMemcacheBundle LoggingMemcache::get() should be compatible

June 16, 2015

When running Symfony application with LeaseWeb/LswMemcacheBundle, below error: Declaration of Lsw\MemcacheBundle\Cache\LoggingMemcache::get() should be compatible with Memcached::get($key, $cache_cb = NULL, &$cas_token = NULL, &$udf_flags = NULL) It is cause by php-memcached 2.2.x gives runtime notices and should be avoided! For those who used php-memcached 2.2.x, may uninstall it and install with php-memcached 2.1.0. Using php pecl, […]

Magento product reviews and ratings not showing in backend

February 1, 2015

This is the problem usually happen. The product reviews enabled but show showing in catalog. To solve this issue first check <pre>System > Configuration > Advanced > Advanced </pre> and see if Mage_Review is enabled there. Once this enabled, you should able to see the review and ratings showing in catalog.  If it’s not there […]

Magento upgrade cannot save the customer, Unknown column ‘ca.sort_order’

January 28, 2015

First find out what cause the error. “CANNOT SAVE THE CUSTOMER” is plain text message mask by magento to avoid it display raw message to system user. By find out raw, you are able to debug the error. First, edit file: app/code/core/Mage/Customer/controllers/AccountController.php In ubuntu, you can do like below: Then, add $e->getMessage() to this line: […]

Ubuntu un-tar/extract tar ball/file to another directory

January 4, 2015

To extract an archive to a directory different from the current, use the -C, or –directory, tar option, as in: tar -xf archive.tar -C /target/directory