Tuesday, March 15, 2011

transferring files to a Nokia phone

N wanted me to transfer some mp3s to a Nokia music phone. First try with the data card directly inserted into the card reader did not work - probably because the card reader can't read high density SD cards or something like that. Then tried by connecting the phone via usb and using Nokia Phone browser. That opened up Windows Media Player, and asked it to transfer files. But when we attempted to transfer, it would say "An error occurred". Finally got the job done by transferring to my SD card, then transferring from my phone to the Nokia via bluetooth. One future possibility is attempting through Nokia PC suite.

Thursday, March 10, 2011

phplist attachment size limit

There were issues with the shared internet connection being swamped by the Sai Inspires emails, especially when they were sent late. P wanted me to set an attachment size limit in phplist, so that the email attachment would be 20 kB instead of 100 kB as was done recently. Went through the docs, did not find any such parameter in phplist except setting file upload limit for php itself, as given at this post.

Since the upload_max_filesize attribute is of php itself, not of phplist, I was afraid of breaking things if I set it in php.ini, so did not do so. Instead, the current solution is to not embed images at all inline, and to just link them instead as in Sai Spiritual Showers. A link to the online version makes it easier for the 'linked image challenged' email clients.

changing virtual postfix hosts and testing SMTP with telnet

As given in my earlier post, the only change required was to change the line
virtual_alias_domains = whateverdomain.com
in /etc/postfix/main.cf and accordingly make changes in /etc/postfix/virtual running
sudo postfix reload
sudo postmap virtual
afterwards. Actually I ran the postfix reload after the postmap also, just to be sure. For testing, using telnet as given in this technet article, telnet on port 25 to our machine failed from dreamhost. Tried restarting the network, firewall box, etc, but probably dreamhost has blocked port 25 for spam-blocking. Restarting network was
sudo /etc/init.d/networking restart
by the way. Finally tried it from our colinux machine, there it was working fine.

telnet our.mail.server.radiosai.org 25
Trying 111.111.111.111...
Connected to our.mail.server.radiosai.org.
Escape character is '^]'.
220 our.mail.server.radiosai.org ESMTP Postfix
MAIL FROM:whatever@yahoo.co.in
250 2.1.0 Ok
RCPT TO:whoever@whatever.in
250 2.1.5 Ok
DATA
354 End data with .
Subject:2nd test
One more test email.
.
250 2.0.0 Ok: queued as 491ID14E8EC
^]
telnet> quit

Wednesday, March 09, 2011

backing up phone contacts

I've not tried them myself, but A at the Studio said these were good:

1. Google Sync for your phone
2. www.mobical.net
(this one seems to have moved to
https://www.everdroid.com/
)

deleting a gateway in Cyberoam

Our ISP changed, and suddenly I had to delete a gateway on the Cyberoam which was no longer active. With the gateway still existing, the device was unstable and not allowing incoming connections. First took a backup as P advised, System -> Manage Data -> Backup Data. Then, going directly to System -> Gateway -> Manage Gateways and trying to delete it gave the error message
Gateway used for pool(s) or Acting as Effective Gatway or assigned to firewall
rule cannot be deleted
(sic)
So I went to Firewall -> Manage Firewall and removed all the firewall rules relating to virtual hosts which mentioned that gateway. Still no dice. Then removed those virtual hosts too. Still no. Then removed the relevant host names from Firewall -> Host -> Manage. Still no. Then, during a support chat with Tech support, thought about other firewall rules, outgoing rules for eg. Lan to Wan and so on. Went through those, in a couple of them the old gateway was the Primary. Modified the rules suitably, then the gateway could be deleted.

Friday, March 04, 2011

ip address change and cyberoam changes needed

After getting a new IP address and a new ISP, did the following changes to cyberoam.

1. Delete firewall rules using the relevant virtual host(s) which reference the old ISP ip addresses etc. For this, you have to go through all the firewall rules - even things like DMZ-DMZ etc.
2. Delete the relevant virtual host.
3. Create the corrected virtual host - basically only the External ip address changes.
4. Make the firewall rules again! Here, things like DMZ-DMZ rules are made automatically, when the WAN-DMZ rules are made.
5. Modify host group (if any) to add the new ips. We had the group of machines which were allowed to ssh. For this, first create a relevant host name, and add it to the group while creating it.

All these changes took around half an hour.

Later I had to change the ip addresses pointing to the web server and so on.

Edit: After 24 hours, learnt from experience :( that I should have updated the spf txt dns records before-hand! All gmail emails went to spam. Anyway, I have done so now...

Tuesday, February 22, 2011

sql injection

Tried out HackBar for firefox to check for SQL injection on our sites. Basically followed this article's walkthrough. Lots of useful links at this stackoverflow post, in the comments. Especially the Oracle tutorial.

Sunday, February 20, 2011

Reviving a Transcend 256 MB pen drive

S wanted me to try and revive a 256 MB Transcend USB flash memory pen-drive. Plugging into an Ubuntu machine and checking fdisk -l showed it was formatted as FAT16. Probably there was also some corruption since he reported pulling it out while Puppy was formatting and/or partitioning it! Anyway, a quick mkfs -t vfat /dev/sdc1 did the trick, working fine now.

Friday, February 11, 2011

new A record

Added a new A record for our alternate ip address, krishna.sssmf.org

adding a mail relay

Re-created a virtual mail server relaying mail to alias addresses on our current server just like in my previous posts

http://hnsws.blogspot.com/2006/03/finishing-postfix-configuration.html
http://hnsws.blogspot.com/2006/03/using-krishna-to-forward-mails-to.html

Just had to do postmap /etc/postfix/virtual after the cf file etc update. This new machine did not start refusing emails for krishna.radiosai.org after adding the virtual domain. Added appropriate firewall rules to the gateway, of course. Just a note: in /etc/postfix/main.cf,
mynetworks = 127.0.0.0/8
does not need to be changed. Changing this is only required if you want the postfix to relay mail (without auth, for third-party domains - an open relay!) from some other ip address also.

Saturday, February 05, 2011

winamp not playing wav files - resolved

For many months, my WinAmp installation was not playing wav files, but was playing mp3 files. Today I finally worked out that the in_wave.dll was missing. And the reason was given in this post - I had installed Winamp Lite at one point of time, and that does not have wav support. Installed WinAmp full now - Lite is no longer available - and now it plays wav files without problems.

Friday, February 04, 2011

problems with Nokia Internet Radio on E63

B had a problem with his Nokia E63 phone not allowing him to open the Internet radio app, and giving
playinit error =-5
on trying to play with s60 internet radio app which was installed later. Googling found that this was most probably due to a failed update. Suggested solution seems to be to hard-reset the phone.

Thursday, February 03, 2011

playlist in The KMplayer

Making a playlist in The KMplayer might be the solution to my issue of playing PAL clip followed by NTSC (or 30 fps HD) clip. To make KMplayer play the next file in the playlist automatically, I had to go into

Options -> Preferences -> General -> Repeat / Playlist -> Choose Play Next Album

under "When Finished (Album has been fully played)..."

Wednesday, February 02, 2011

niggling bugs with Kubuntu

Had installed Kubuntu Ubuntu 10.04.2 LTS as the dual boot on my work machine after the earlier install stopped booting. (Most probably that was due to the mbr file being deleted from c:, or becoming corrupted.) This installation also runs from a loopback device, a file on the Windows filesystem, like my earlier install.

Anyway, came across some niggling bugs. One persistent one was the error message E:Unable to correct problems, you have held broken packages.

This would pop up every time I clicked OK for Amarok to install "extra multimedia functionality" as this dialog box says.

Doing a mouse-over reveals the correct package name. Installing everything else worked fine except for Flash. The package was flashplugin-installer
Googling found this thread, and as suggested, doing
sudo apt-get update
sudo apt-get install flashplugin-installer
seems to have done the trick.

Monday, January 31, 2011

Testing our page loads and optimizing

K pointed out some excellent page-load speed resources for testing and optimizing:
http://googlepagespeed.com/
http://code.google.com/speed/page-speed/
http://modpagespeed.com/
And for testing, http://www.webpagetest.org/

As suggested by webpagetest.org , I have enabled compression on media.radiosai.org as given in this article: basically
cd c:\InetPub\AdminScripts
cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true

cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcFileExtensions "txt" "htm" "html" "js"

cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcFileExtensions "txt" "htm" "html" "js"

cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcDynamicCompressionLevel 7

cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcDynamicCompressionLevel 7

cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcOnDemandCompLevel 7

cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcOnDemandCompLevel 7

I have not enabled the compression for aspx and other dynamic files, I have not disabled for HTTP 1.0 or proxies as given in the last two lines: will do that if problems arise.

Also set in content expiration as 1 day from the IIS Manager. http://www.radiosai.org/ had some difficulty in setting compression, since it is a shared environment under Plesk. Did contact nettigritty team about it anyway.

Thursday, January 27, 2011

ssh-add required for Ubuntu 8.04 after ssh-keygen

On the Macbuntu running Ubuntu 8.04, when I attempted to use ssh with RSA key-based authentication like in my old post, ssh returned an error
Agent admitted failure to sign using the key.
Permission denied (publickey).


Googling found this as the first match.
Verified that running
SSH_AUTH_SOCK=0 ssh myuser@myhost
works fine with key-based auth.

Then ran ssh-add as suggested in that thread. From then on, ssh works fine.

Wednesday, January 26, 2011

keeping Windows and Linux dual-boot times correct

In this old post I had mentioned how to do it with Mandrake 10. In Kubuntu 10, the file to be edited, as per this forum post, is /etc/default/rcS
and by default it is already set to UTC=no

Saturday, January 15, 2011

downmixing to stereo

According to these posts on Hydrogenaudio forums, for downmixing 5.1 to stereo I should go with either
Lo = 1.0 * L + 0.7071 * C + 1.0 * Ls;
Ro = 1.0 * R + 0.7071 * C + 1.0 * Rs;
or
Lo = 1.0 * L + 0.5 * C + 1.0 * Ls;
Ro = 1.0 * R + 0.5 * C + 1.0 * Rs;

But I suppose in my case the C will have to be more since I want the commentary to be a bit louder.

Tuesday, January 11, 2011

direct links to listen to specific radio programs

Explored ways to give direct links to radio programs like the hidden form + javascript like the technique mentioned at this stackoverflow form post. Basically of the type

javascript code for hidden form
but all in one line. Tried making a tinyurl link out of the javascript. It works with preview.tinyurl.com, but not with the direct tinyurl link. Other url shorteners like bit.ly did not work with javascript at all. So finally decided on html forms with javascript to auto-submit.

Tuesday, January 04, 2011

updates on twitter

Started populating the twitter feed by 31 Dec using FutureTweets.com so that a twitter update box could be added to the schedule page by 2 Jan. Maybe it will be added to the home page later. Takes around 10 minutes a day or less to update. The thing to get the hang of is: which timezone to report in the tweet. For AsiaStream programs, IST is the easy choice. Other programs need some thinking.

Earlier, I'd envisaged making some sort of automated twitter posting with code similar to this blog post using php - but the coding is pending with P, and for me spending 5 minutes daily tweeting is easier.