Have you ever wanted to enable Magento global messages when you have Full Page Cache (FPC) turned on ? I wanted it, but after several hours of debugging and studying magento caching mechanism, i found it’s hard to punch a hole for Magento global message, i thought about an alternative solution – ignoring FPC when we have global message !
Tag Archives: programming
MySQL – Change data directory (base)
MySQL is a widely used and fast SQL database server. It is a client/server implementation that consists of a server daemon (mysqld) and many different client programs/libraries.
Mysql data directory is important part where all the mysql databases storage location.By default MySQL data default directory located in /var/lib/mysql.If you are running out of space in /var partition you need to move this to some other location.
Note:- This is only for advanced users and before moving default directory make a backup of your mysal databases.
Unix – display a logfile in real time on screen
Q. I’d like to see my php or apache web server log files in real time. How do I see log file in real time including all incoming logs?
A. You need to use tail command which output the last part of files in real time including all incoming logs to a file.
tail -f file-name command
here are some examples
Compiling latest version of PHP on Mac OS X
Mac OSX has a lot of Unix utilities, they’re very useful. You can start using many of your favorite Unix/Linux application out-of-the-box. But when it come to PHP, it’s not as good as PHP on Linux, What you have is an outdated version and you don’t have new features and performance of latest PHP .In this article, i’ll show you how to upgrade php on your Mac to latest version.
Magento – Optimize your webshop
Recently, i have many works that focus on Magento optimzation, that explains why i have many optimization related articles stay close to each other :D.
Today i’ll introduce you another techniques belong to Magento itself, it means you can do it with only source code and admin dashboard. there’re two sections, first one is about configuration, and second one is about frontend. i hope you will enjoy it.
Tips for optimizing LAMP stack & Linux server
1. Get a dedicated server
Advantages– Whole server power for you
– You are very flexible in terms of new versions for webserver, database, php …
– There are not other customers which run “bad” scripts which slow down the shop
– You don’t share the same ip, very important for SEO.
If one customer makes a “bad business”, the ip can be blocked by google which affects your search ranking.
My recommendation:I am a big fan of the Amazon EC2 cloud which gives you everything you need (flexibility, scalability, security).
Continue reading
Magento – creating custom breadcrumbs for CMS pages
I wanted to create a subordinate set of CMS pages in Magento so that the breadcrumb navigation at the top of the page looks like this:
Home > Parent CMS Page > Child CMS Page
Even though I can specify a hierarchical relationship with the URL key field, it seems to be that all CMS pages in Magento are listed in the root directory by default:
Home > Child CMS Page
To override the default, you have 2 options :
The Whens and Whys for Design Patterns
Again, we have another article about Design Patterns. but this time it’s not the same :). There are plenty of articles that explain what design patterns are, and how to implement them; the web doesn’t need yet another one of those articles! Instead, in this article, we will more discuss the when and why, rather than the which and how.
This article covers some of the various Agile Design Patterns, documented in Robert C. Martin’s books. These patterns are modern adaptations of the original design patterns defined and documented by The Gang of Four in 1994. Martin’s patterns present a much more recent take on the GoF’s patterns, and they work better with modern programming techniques and problems. In fact, about 15% of the original patterns were replaced with newer patterns, and the remaining patterns were slightly modernized.
Technical debt in software development
Technical debt (also known as design debt or code debt) is a neologistic metaphor referring to the eventual consequences of poor or evolving software architecture and software development within a codebase. The debt can be thought of as work that needs to be done before a particular job can be considered complete. As a change is started on a codebase, there is often the need to make other coordinated changes at the same time in other parts of the codebase or documentation. The other required, but uncompleted changes, are considered debt that must be paid at some point in the future.
Magento – Fix integrity constraint violation issue
Sometimes, you face database issues like this ‘integrity constraint violation: 1062 Duplicate entry ‘100000001’ for key’ . if you are not familiar with Magento, may be you will feel blind (like i was), debugging won’t go smoothly as usual.
After studying Magento deeper to its core, i found that Magento numbering system depends on a table called ‘eav_entity_store’. this table stores increment ids of many entities from Magento.