user-avatar
Today is Thursday
November 28, 2024

October 30, 2009

Interesting tweets.

by viggy — Categories: Uncategorized — Tags: Leave a comment

A surprise awaits if you tweet with #treat or #trick from Twitter.com. C’mon, try! :)

October 30, 2009

How fast the news follows in the Internet era?

by viggy — Categories: twitter — Tags: , Leave a comment

First a tweet from @ShashiTharoor about his speech on UN’s relevance in a changing world. Then a tweet from @the_hindu about the speech and a link about the complete article. All this in just a span of half an hour. And I get to know about it sitting in my room in front of my computer. It is as if I can monitor the world just by sitting here. Twitter rocks.

October 29, 2009

Fatal error : Call to undefined function: ldap_connect()

by viggy — Categories: drupal, tech, web — Tags: , , , , Leave a comment

I got this error when I was trying to get my drupal installation authenticate using the local ldap directory. Initially, I had thought that I was getting error because of my ldap settings. Then I enabled error reporting on my site, that is when this error was displayed to me.

This error is caused, I suppose due to the missing package php5-ldap in the system. After I installed this package using apt-get and restarted apache2, LDAP authentication wroked fine.

October 29, 2009

The White Screen of Death (Completely Blank Page) in drupal

by viggy — Categories: drupal, tech, web — Tags: , , , , Leave a comment

Occasionally a site user or developer will navigate to a page and suddenly the page content disappears, and is completely blank. No content. No errors. Nothing. This often, but not always, happens after updating a module, theme, or Drupal core. This is what is referred to by most members of the Drupal community as the White Screen of Death or WSOD. There are several reasons why this might occur, and therefore several possible solutions to the issue.

For how to solve this problem, look here.

October 29, 2009

How to enable error reporting in drupal

by viggy — Categories: drupal, tech, web — Tags: , , , 2 Comments

Courtsey: http://drupal.org/node/158043
Enable Error Reporting

Although it may be turned off on commercial hosts and production sites (for good reason, so that users do not see the errors), these errors are one of your best tools for troubleshooting. To enable error reporting, temporarily edit your index.php file (normally located in your root directory) directly after the first opening PHP tag (do not edit the actual file info!) to add the following:

<?php

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

// $Id: index.php,v 1.94 2007/12/26...

You will now be able to see any errors that are occurring directly on the screen. Memory problems may still not be displayed, but it’s the first step in a process of elimination.

If you are using a multi-site setup and only want errors to appear for one site, then check the name of the host first as in:

October 26, 2009

Significance of Lost+found directory in Linux filesystem

by viggy — Categories: linux, tech, ubuntu — Tags: , , , Leave a comment

Courtsey: http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/lostfound.html
As was explained earlier during the overview of the FSSTND, Linux should always go through a proper shutdown. Sometimes your system might crash or a power failure might take the machine down. Either way, at the next boot, a lengthy filesystem check (the speed of this check is dependent on the type of filesystem that you actually use. ie. ext3 is faster than ext2 because it is a journalled filesystem) using fsck will be done. Fsck will go through the system and try to recover any corrupt files that it finds. The result of this recovery operation will be placed in this directory. The files recovered are not likely to be complete or make much sense but there always is a chance that something worthwhile is recovered. Each partition has its own lost+found directory. If you find files in there, try to move them back to their original location. If you find something like a broken symbolic link to ‘file’, you have to reinstall the file/s from the corresponding RPM, since your file system got damaged so badly that the files were mutilated beyond recognition. Below is an example of a /lost+found directory. As you can see, the vast majority of files contained here are in actual fact sockets. As for the rest of the other files they were found to be damaged system files and personal files. These files were not able to be recovered.

total 368
-rw-r–r– 1 root root 110891 Oct 5 14:14 #388200
-rw-r–r– 1 root root 215 Oct 5 14:14 #388201
-rw-r–r– 1 root root 110303 Oct 6 23:09 #388813
-rw-r–r– 1 root root 141 Oct 6 23:09 #388814
-rw-r–r– 1 root root 110604 Oct 6 23:09 #388815a
-rw-r–r– 1 root root 194 Oct 6 23:09 #388816
srwxr-xr-x 1 root root 0 Oct 6 13:00 #51430
srwxr-xr-x 1 root root 0 Oct 6 00:23 #51433
-rw——- 1 root root 63 Oct 6 00:23 #51434
srwxr-xr-x 1 root root 0 Oct 6 13:00 #51436
srwxrwxrwx 1 root root 0 Oct 6 00:23 #51437
srwx—— 1 root root 0 Oct 6 00:23 #51438
-rw——- 1 root root 63 Oct 6 13:00 #51439
srwxrwxrwx 1 root root 0 Oct 6 13:00 #51440
srwx—— 1 root root 0 Oct 6 13:00 #51442
-rw——- 1 root root 63 Oct 6 23:09 #51443
srwx—— 1 root root 0 Oct 6 10:40 #51445
srwxrwxrwx 1 root root 0 Oct 6 23:09 #51446
srwx—— 1 root root 0 Oct 6 23:09 #51448

October 22, 2009

This blog is from Gscribble.

by viggy — Categories: linux, tech, ubuntu — Tags: Leave a comment

The initial version of gscribble looks great. Looking forward many more features added to it. I hope someday I will also contribute to it greatly.

October 19, 2009

Shifted from #twitter to #identi.ca

by viggy — Categories: Misc, tech — Tags: , , , Leave a comment

I was trying to add a twibbon on my gravatar to support 5 years of Mozilla and I got the following error from the server. It made me realize that twibbon and twitter must be running on windows server. Hence thought of shifting immediately to identi.ca. The error is following. Hope it will be useful to crack into the server. ;).
[ArgumentException: You must specify a token]
Twibbon.Services.TwitterService.GetUserByToken(OAuthToken access, Int32 attempt, String ipAddress) in D:DevelopmentTwibbontrunkTwibbon.ServicesTwitterTwitterService.cs:870
Twibbon.Services.TwitterService.GetUserByToken(OAuthToken access, Int32 attempt, String ipAddress) in D:DevelopmentTwibbontrunkTwibbon.ServicesTwitterTwitterService.cs:868
Twibbon.Web.Controllers.AuthenticateController.Index(String returnUrl) in D:DevelopmentTwibbontrunkTwibbon.WebControllersAuthenticateController.cs:49
lambda_method(ExecutionScope , ControllerBase , Object[] ) +85
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +178
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +24
System.Web.Mvc.c__DisplayClassa.b__7() +52
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +254
System.Web.Mvc.c__DisplayClassc.b__9() +19
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +192
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +399
System.Web.Mvc.Controller.ExecuteCore() +126
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +27
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +7
System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +151
System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +57
System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +7
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

October 19, 2009

Ganapathi blessed the South India with a great river

by viggy — Categories: Uncategorized — Tags: , , , Leave a comment

Coutsey: http://www.celextel.org/storiesandanecdotes/ganapathi.html

The marriage of Shiva and Parvathi was to be celebrated on mount Kailasa. All the people all over the world started traveling towards mount Kailasa. Due to the heavy burden on the northern side, the world started tilting towards the north. To correct this Lord Shiva requested sage Agsthya to go and live in the South of India. Agasthya obeyed the orders of Lord Shiva and reached the south. The entire south India was extremely dry at that time. Lord Shiva had sent some sacred waters of Ganga along with Agasthya, which Sage Agasthya was preserving very carefully in his pot. One day when was asleep, Ganapathi took the form of a crow and toppled Agasthya’s pot. From the Ganga started spreading in to a river. This river was called kaveri – She who was spread by a crow.

October 18, 2009

bash script to telnet

by viggy — Categories: programming, shell, tech — Tags: , Leave a comment

It is sad that I have found this solution after so many days. It is more sad that I never tried to look for this solution earlier. I must have found it atleast 3 months ago. Anyways now that I have found it, let me tell you what exactly I want to do and how the simple script helps me do it.

I have been playing with qmail and qpsmtpd from last 3-4 months. Now to test my set-up, I used to telnet to the port and then used to enter different telnet commands and used to watch the logs simultaneously to get errors.
Now everytime I used to enter the commands manually and that too I couldnt just go to history and execute it as telnet does not support storing commands in history.
Anyway finally today I got fed up of it and I thought let me see if there is a solution so that I dont have to enter commands manually. I didnt expect a solution. But when I searched for it, I found that it was so easy to do it. You just need to execute the following command.
./smtp.sh | telnet

and the contents of smtp.sh is given below:
#!/bin/sh
host=127.0.0.1
port=25
echo open $host $port
sleep 10
echo helo deeproot.co.in
sleep 10
echo mail from:test2@domain
sleep 10
echo rcpt to:test3@domain
sleep 50
echo data
sleep 10
echo checking
echo .
sleep 10
echo quit
#end

You can customize the script to anything that will make your life easier with telnet. I found this solution here, http://www.linuxforums.org/forum/linux-programming-scripting/92466-telnet-script.html