Drush Commands : How to create feature in drupal

I’m going to explain how to create feature in drupal using drush commands. It is easy and recommended way to update codebase for configuration changes.

Here I’ve made example how to create , update or revert feature either from command line

We usually create new configuration, add fields through Drupal Admin UI,

For example:  If you have page content type and you’ll need to add another field for meta description. You can easily go into Admin UI and add new field.

After adding through UI , we can include it in our code base by using drush commands and deploy to live site which will then automatically update without going and change into UI.

Continue reading

PHP Interview Question Answers : How to debug in PHP

We will discuss best practices to troubleshoot and debug PHP script. One of the very common interview questions we have seen is – How to debug in PHP or How would you troubleshoot your PHP code. 

Debugging PHP can often be tricky. Various flavors of PHP e.g. PHP 5.3 vs. PHP 5.4 can throw different warnings or run-time errors depends upon the type of code written. In addition, programmers are not able to change or update PHP code on the fly using tool such as chrome debugger; which makes PHP debugging very tricky and time consuming.

We will discuss best practices as to how you can troubleshoot PHP code.

Continue reading