Technical Blog

Zyxware default image2
| 2 min read
Keeping the Drupal core and contributed modules up-to-date (at least on the security updates) is one of the essential steps for keeping a Drupal site safe and secure. Running updates of Drupal modules is usually a straightforward mechanism on a Drupal site that is done right. However what will you do if you do not know how things have been built? What will you do if some of the custom modules used are tied down to specific versions of some contributed module? What if there were custom changes on the site. Here is how you can run updates on a Drupal site almost completely safely.
Zyxware default image3
| 3 min read
If you run a reasonably popular site there is a very good chance that you will get crawled by unscrupulous crawlers once in a while. The regular search crawlers from the popular search engines like the Google bot, Yahoo bot, Bing bot themselves are pretty intensive when they crawl sites but they do have limits on the number of pages crawled per visit and the number of simultaneous connections opened to your server. However there are lots of unscrupulous crawlers like spam bots, email harvesting bots and even some search engines who do not set any reasonable limits on the number of simultaneous connections to your server. There are hardware solutions that are available to prevent this but they may not be affordable for everybody. There is however a simple netstat based solution to prevent DDOS.
Zyxware default image2
| 3 min read
One of our clients sent us images they want to put in the website as pdf files. There were 100 files each containing a single image. Opening each of these in gimp and then saving it as pngs was a nightmare. For all such situations, ImageMagick is there for your rescue. With mogrify - a command utility available in the ImageMagick package, bulk converting all these pdf files to png was child's play.
Zyxware default image2
| 2 min read
On one of the maintenance projects we got we came across a page that used to take around 11 seconds to load. The page was a views listing for users. We were able to speed up the page load times from around 11 seconds to under 3 seconds by taking out just the distinct option used in the view. The following was the select query that was originally generated from the view with the time logged by views in the preview panel.
Zyxware default image2
| 4 min read
In every operating system, there are a lot of tasks that need to be scheduled to run at a particular time - some, very often (as in, every 5 minutes), and some, less (like, once every month). For a quick example, you might want to run a temporary files deletion operation at midnight each day - this is where you need to write a cron job.Crontab and Cron jobs are Linux’s version of a complete job scheduling system.Let us see these in detail.
Zyxware default image4
| 4 min read
Boost is a module in Drupal that enables file based static page caching in Drupal. When an anonymous user visits a page for the first time in a Boost-enabled Drupal site, the page will get stored as a static html file in a cache folder. When the next anonymous user visits the same page the htaccess rules created by Boost will serve the static file cached in the cache folder instead of bootstrapping drupal for generating the page. This saves a lot of processor usage and would help even entry level hosting servers serve reasonably good volume of traffic. Here is how you can install and configure Boost in a Drupal 6 site.
Zyxware default image4
| 1 min read
We recently saw this error on a Drupal 6 site that had not been updated for quite a while."warning: call_user_func_array() expects parameter 2 to be array, string given in sites/all/modules/contrib/views/views.module" means what it says. call_user_func_array expects the second parameter to be an array whereas a string was given instead. You can troubleshoot problems like this by writing a bit of debug code before the line where the error is reported.
Zyxware default image3
| 3 min read
As the world of internet grows day to day, the more educated and ever-wanting userbase now needs more data asynchronously. They don’t like to wait or load another page to see their data. In such situations we developers need to use more and more AJAX (Asynchronous JavaScript and XML - http://en.wikipedia.org/wiki/Ajax_(programming)) in the development of websites. Using AJAX in your web-development workflow is not that much difficult as you think. There is already a wide range of famous ajax libraries that make handling asynchronous requests easy for us.
Zyxware default image2
| 3 min read
Drupal’s Nice Menus Module provides a highly customizable and nice-looking dropdown menu for Drupal websites. To allow maximum customizability, it includes a CSS file and a javascript file where you can try out your own recipes. The following steps should help you make nice looking drop down menus for your Drupal website using the Nice Menus module:
Fix Certbot Auto-Renew Error in Ubuntu
| 2 min read
Have you ever wondered how that cool site you saw last day had those cool interfaces and you wished your Drupal site could have the same coolness? jQueryUI is your saviour here. jQueryUI is one of the most popular JavaScript libraries out there in the world of web development. jQueryUI allows you to add very cool user interface elements to your website without much effort.
Fix Certbot Auto-Renew Error in Ubuntu
| 3 min read
Solution for CKEditor not working in a Drupal 6 site. One day, all of a sudden we found out that the CKEditor was not working on our Drupal 6 site. It had literally disappeared from our website taking the whole text area on the edit page with it. This meant that we could not create any articles as long as the CKEditor was not working. On seeing this, the first thoughts that flashed through our head was to either update the module or apply a patch believing that the CKEditor module had crashed. However our fears were unfounded and the solution turned out to be more simple than we expected.
Fix Certbot Auto-Renew Error in Ubuntu
| 4 min read
Developing a Drupal website is a complicated and long process. You have to check whether all the design and functionalities meet with the client specifications. And before the site going to be live you have to check certain criteria.These checklists describes the criteria that should be tested before a site going to be live.
Fix Certbot Auto-Renew Error in Ubuntu
| 2 min read
Sometimes we may require updating several rows of data with different queries and make sure every query execute correctly to keep the database consistency. Here is a simple solution to enable such transactions with Mysql and Python. To do this, we can start a transaction and commit the changes to the table. The data will be written to the table only after the commit statement is executed. If there is an error in between, we can rollback, so that all the inconsistencies are cleared.
Fix Certbot Auto-Renew Error in Ubuntu
| 3 min read
Password-protecting drupal development site with .htaccess file There might be few scenarios when we need to protect our site from the general public and make it accessible to a selected group of users. One of the most common scenarios in the development workflow of a Drupal site is when you want to avoid your half-complete drupal site showing up in Google search results.For such needs, it is advisable to go for password-protecting the site using HTTP authentication. If you have cPanel installed on your hosting server, you can use the ‘Password Protect Directories’ option from the ‘Security’ section on the cPanel home page. Click here to read on How to enable HTTP Authentication using cPanel (link to an article for the same on our site) For those without cPanel, here’s how to get Apache work your way:
Fix Certbot Auto-Renew Error in Ubuntu
| 1 min read
Once in a while you will come across a Drupal site where you have to login to the site without having access to the credentials of user 1. You can easily reset the password of user 1 directly in the database or you can create a small work around to login to the site. Here is how you can login to the Drupal 7 site programmatically as user 1 without knowing user 1 credentials.
Zyxware default image2
| 1 min read
If you have a Drupal 6 site where you have access to the ftp account but not to the user 1 credentials here is how you can login programmatially to the site as user 1 without resetting the user 1 password. Now that you know that this is possible, remember to not give ftp access to users who do not have access to user 1 credentials as well.
Zyxware default image2
| 3 min read
Frequently we come across Drupal sites (live or testing) where the user 1 passwords are not known to the owner of the site. You can retrieve the password by changing the email address of user 1 to your email address and then use the forgot password option to reset your password. But if you don't want to change the user 1 email address but instead just want to change the password of user 1 there is an easier alternative via the database.
Zyxware default image3
| 3 min read
A VPS lies somewhere in between shared hosting and dedicated servers in terms of the features it provides. VPS divides the server’s primary resources and gives you certain amount of diskspace, memory, processing speed and bandwidth, with freedom on the OS configuration. In the case of shared hosting its like a common pool from which you consume bandwidth, diskspace, and processing power until it is exhausted. You dont get much control over the OS config.