Drupal Technical
|
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.
Technical Solution
|
2
min read
On a WHM/cpanel VPS server the httpd.conf is automatically generated from cpanel scripts based on templates and you are not supposed to change this file directly. Any changes that you make in the httpd.conf file will be lost when cpanel re-generates the file or when cpanel is updated. This is an inconvenience especially when your application requires you to make virtualhost modifications in the configuration. However cpanel provides an alternative way to edit the httpd.conf file.
Technical Solution
|
3
min read
When you untar large tar files even as the root user on your VPS you might run into the error "Cannot change ownership to uid NNN, gid NNN: Disk quota exceeded". This is because the extracted files from the tar archive is being attempted to be created with the original UID and GID as on the system where the tar archive was created. Now if the UID is not already present on the new VPS or if the UID corresponds to a user without a lot of disc quota available the above error will be triggered preventing extraction of the tar.gz archive.
Technical Solution
|
6
min read
OpenOffice Calc is surprisingly an excellent tool for creating wireframes. Wireframes can be created very easily in OpenOffice Calc using the standard shapes available from the drawing toolbar and also by merging cells in the sheet. Each sheet can be used to define a single wireframe and then a single spreadsheet document can contain all the wireframes for a given project. OpenOffice Calc also allows you to export the full set of wireframes as a pdf document with one page corresponding to each sheet in the document. Here are some tips to create good wireframes using OpenOffice Calc.
Drupal Technical
|
3
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.
Technical Solution
|
5
min read
The find command available in GNU/Linux shells is a versatile tool for finding files matching the given conditions in a folder and performing a specific action on the files found. The following command will find all files greater than 1M size in your current folder and ask you if you would like to delete the file
find . -size +1M -exec rm -i {} \;
Technical Solution
|
2
min read
Boost is a module that allows for static caching on a Drupal site for improving performance for anonymous users. You can read more about how to install and configure boost here. Boost comes with a boost crawler that can crawl your site and refresh the boost cache. Here is a simple script that can be used to refresh the boost cache without enabling the boost crawler.
Drupal Technical
|
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.
Technical Solution
|
2
min read
Apache allows you to protect contents of specific directories in your website or the whole website from unauthorized access using a mechanism called httpd password protection. During development of new sites the partially built sites are protected from unauthorized access using httpd authentication. This could sometimes interfere with testing of integration with third party services that might expect some of your URLs to be accessible without authentication. Here is how you can exclude a given file or directory from httpd authentication
Drupal Technical
|
2
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.