Sunday, November 25, 2007

firefox doesn't play nice with tunnels

Created a tunnel over ssh from my remote machine to use the studio server's internal webserver, similar to tunneling TightVNC. Got a firefox error when trying to access the tunnel using http://localhost:6000 -
This address is restricted: This address uses a network port which is normally used for purposes other than Web browsing. Firefox has canceled the request for your protection.
Found the solution at http://www.purple.dropbear.id.au/node/139 by googling.
  • Go to about:config in your Firefox browser.
  • Right click somewhere, and choose "New => String"
  • In the setting Name box type "network.security.ports.banned.override"
  • In the Setting Value box, type "1-65535" or whatever port-range you want to allow.
  • Click OK

Tuesday, November 20, 2007

phplist removal from blacklist, that is, re-subscribe

http://docs.phplist.com/UserInfo gives the info on how to remove a user from phplist's blacklist - usually when someone unsubscribes and now wants to re-subscribe - Go to that user's history and click on the link there.

Sunday, November 18, 2007

more SQL and web programming Gyaan

Don't create tables or records with names like From - SQL keywords - though postgres allows it, the names will cause error grief in SQL queries.

When trying to write to a text file, the most likely cause of errors is permissions, if the file exists. Check permissions of the parent directory and its parent and so on....

Examples for doing file writing in asp from
http://www.eggheadcafe.com/articles/20030627b.asp
http://www.brainjar.com/asp/fileops/default2.asp
got by googling
scripting.filesystemobject

Tuesday, November 13, 2007

Many different topics

Hopefully the search feature on blogger will help me find this post when I need it, because I'm going to post about many different items.

1. New schedule page in public beta - have added a link from the old schedule page on radiosai.org.

2. Asked for a firewall rule change on fs3 to allow only our machines to get shell access.

3. Weird error on a csv import, was due to a newline in a Description.

4. Google customized search being used for H2H, old links to krishna being removed using TexRep find/replace in files tool.

5. Subscription pages which send emails to us instead of directly accessing phplist - to avoid exposure. Also writing to file...

6. Removed asp page dl.asp for saicast downloads, using static addition of the content-disposition header "attachment" instead: In IIS manager, right-clicking on Saicast video downloads, as given in http://support.microsoft.com/kb/260519
"To apply the header statically, right-click the document in the Internet Service Manager, and then select *Properties*. Select the *HTTP Headers* tab and enter the content-disposition header there."
In our case, added it to the entire site.

7. Adobe had nice video workshops for their products.
http://www.adobe.com/designcenter/video_workshop/
But around 500 kbps is needed to see them properly.

8. Have subscribed to Secunia Weekly summary of vulnerabilities.

9. Lots of updates on the "voluntary" side of web work, keeping me busy outside "office hours".

Friday, November 09, 2007

sql snippets

Gave a link to the new php program schedule page from the schedule page 2 days back, so it is in some sort of public beta. Found some bugs, one of which was due to languageid being NULL in our local db. Solution was to make languageid 1 the default value for that field, so that future record inserts will automatically have it set (tested) and also ran
update file_information set languageid=1 where languageid is NULL
Struggled a bit to get the syntax right, with languageid ='', languageid = NULL , NOT (languageid>0 and languageid<9) and so on, till I googled the correct syntax for NULL.

One more snippet of SQL Gyaan is that to insert, update etc for fields with type interval / timestamp , the syntax is
UPDATE "file_information" SET "duration" = interval '00:01:09' where file_id = 2020
and so on. One has to do a sort of typecasting using the keyword interval. One can even say interval '1 hour' and so on. From http://www.linuxjournal.com/article/9618

Friday, November 02, 2007

dir listing taking too long

One of our machines was taking a looong time for ls -l listing. Turned out a mounted smb share had i/o errors - reported by df -h. Umounted it, then all is well....

session_start() caveats in php coding

The new schedule page admin interface had a bug of having to login twice - and momentarily some error messages would appear.
session_start(): Cannot send session cookie - headers already sent 
Reason was the session_start() function being called in the body of the page. It should appear before any output is sent to the browser, as mentioned below:

http://in.php.net/session_start

http://www.koderguru.com/tutorials/phptutorials/headertuto1.php

silent speakers!

DJ did a great job checking mandir speakers on NR's instructions - found 8 not working! Loose contacts and an amp being disconnected.... Fixed now, I believe.

new schedule page

Still working on the new schedule page - still needs streamlined import feature - import from csv file, currently have to copy-paste, and also need to add lots of timezones. Bugfixes pending too - download flag checking, filename gets a space and needs ltrim....

trouble or work ticket systems for windows

http://otrs.org/ - Open source ticketing system - Perl-based, has Windows installer

http://www.netvigilance.com/winrt - - Perl-based, has Windows installer

Google results for NA who had asked for MT office. Passed on the info to V, since he's the one who has to install any sw for MT.