Building the Linux-ATM software on Fedora Core 3 on a VIA C3 Processor

Recently I built the linux-atm software, which is an atm utility which allows me to use my pci ADSL card on linux.

The latest release is version 2.4.1 which I pulled down off of sourceforge, and I then tried to compile it.  This is what I fell fowl of..

1. The source has four compilation errors which are at lines with default: in the case statements these need ; after them, you can either edit the four bits of source code yourself or get a patched version of the code from here.

2. Then I kept getting the error ‘storage size of req is not know’ and ‘invalid application of sizeof to incomplete type atmif_soic’ which I realised that I had the paths to my kernel source incorrect.  Now I put in a symbolic link to the source so /usr/src/linux pointed to /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/include [ which is where the source really was ].  So to correct this error I typed this before running the configure of linux-atm.

CFLAGS=-I/usr/src/linux ./configure

and that got me over that problem.

3.  Then I got the error ‘config.h:6:2 error including kernel header in userspace use the glibc headers instead’ in atmdev.h to get around this I changed the line config.h to autoconf.h

Then it all worked and everything was installed into /usr/local/bin and /usr/local/sbin.

Hope that has helped someone.  The linux-atm package has been around for sometime but I didnt think the documentation or notes about how to change the path to pick up your distributions source code was that clear.

Terminal Services and Licensing: No Terminal Server License Servers

Had to add some new terminal server licenses today for a client of mine and had a whale of  a time.  Installed the licenses which seemed to work no problem, then when I tried to connect to the remote machine kept getting the error that it couldnt connect due to “No Terminal Server License Servers”.

Then tried to ring Microsoft to see what they would say about it, firstly normal thing, ring a number that my license reseller gave me and go through to India or somewhere similar, and they were license activation rather than license help, the guy couldnt even understand me saying “can you give me a techinial support number”.  Then when he did understand me the other number was also somewhere else in India who said yes they could help me but I would have to purchase some technical support, now I know you dont get nothing for nothing but I have just purchased licenses surely I should be eligable for some help installing them oh no !!  So basically decided to try to fix the problem myself with the aid of google. 

Any way back to the problem, it would seem that the terminal services manager on the box couldnt resolve where the terminal services license server was in the domain so I had to tell it specifically by adding a registry key to that effect.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

\TermService\Parameters\LicenseServers\

in my instance I put the ip address of the license server rather than the netbios name and rebooted and worked a treet.

PHP5, MySQL, IIS and WINDOWS 2003 Server

Had some bother with the extensions of php5, php_mysql.dll and libmysql.dll under my latest installation on windows 2003 server.  When using the mysql_connect function to connect to a mysql database kept getting the error message

“mysql_drop_db could not be located in the dynamic link library libmysql.dll”

Now I had moved the libmysql.dll into the c:\windows\system32 directory, uncommented the extension in php.ini but was still getting this message, eventually realised that the new libmysql that comes with versions 4 & 5 of mysqlsql dont have these functions in them any more.  Therefore when you use php5 you must put libmysql.dll from the php5 zip file into the windows directory otherwise you get the above error.

I am not sure if you will lose functionality or not by doing this as the mysql engine will still use what ever version is in mysql/bin (from installation) but the current version php5 is compiled against mysql version 3 and still needs the function defs of that version.

CRUD why you cant afford it

Looking for details on asp.net 2.0 and its official release date I stumbled upon the article on MSDN about “CRUD why you cant afford it”,  this article talks about everything that I have disliked about CRUD for a long time. 

I have never really talked up about it though as most people rave or say “you must have CRUD”, when having written systems with and without CRUD, I dont believe it works that well for the reasons the author of the article mentions. 

The components at Tesco.com were built around exactly what we were doing rather than having generic CRUD methods and this seemed to work very well.

The MSDN article can be found here

http://msdn.microsoft.com/architecture/default.aspx?pull=/library/en-us/dnbda/html/CRUD-afford.asp

Fedora Core 2 installation patch for Epia Mini-ITX

As you may be aware the original Fedora Core 2 installation will just keep rebooting on an Epia Mini-ITX machine.  There are many newsgroups articles about this subject but I believe that they are all a little confusing so here is what I had to do to install Fedora Core 2 on to my Epia Mini-ITX CL600 machine.

First download the patch from http://people.redhat.com/arjanv/c3boot-2.iso and burn it on to a cd, then boot off of the new burnt cd.

The next set of instructions assume the text version of the installation

  • Go into the text installation by typing linux text at the prompt
  • Keep going through the installation until you get a warning message that the fedora disc is not in the drive, swap the original Fedora Core 2 disc 1 back into the drive.
  • Go through the normal installation steps for Fedora Core 2 until it says the installation is complete, then remove the CD then type Ctrl-Alt-F2 to get a console window.
  • The original Fedora Core 2 disc had already ejected so replace that with the patched CD that you burnt before starting the installation.
  • I then made a directory in /mnt/sysimage called source.
  • I then mounted the patched cd onto that directory [Note: the cdrom device is in tmp on my installation not /dev like other instructions say]  mount /tmp/cdrom /mnt/sysimage/source -t iso9660
  • Then chroot /mnt/sysimage
  • rpm -Uvf /mnt/sysimage/source/kernel*
  • once that has finished type Ctrl-Alt-F1 to go back to the original installation
  • Reboot as per original installation and it should boot into a working kernel

Got TWiki working on IIS6.0 under Windows Server 2003

At the weekend I had a go at installing TWiki running on IIS6 under windows server 2003.  Eventually with my old Perl book in one hand and a mixture of these articles below I got it going…

http://twiki.org/cgi-bin/view/Codev/CookbookWindowsIISSetup
http://twiki.org/cgi-bin/view/Codev/TWikiOnWindows2003

I didnt use cygwin in the end I used the following…

ActiveState Perl 5.8

Windows Binaries of RCS (can be found on the GNU RCS site)

I wanted to authenticate users so I have used windows authentication which works fine but it does mean that users cant register themselves and then start using it without the user being added to windows box manually by the Administrator.  If any one has any ideas how to get around this I would be most obliged.

The tool itself is great and one of the best wiki tools around, as it is very mature now.

If you want to ask me any questions, please do..

POP3: unable to scan $HOME/Maildir?

Ok I run qmail here and funny thing was outlook wasnt logging into it. Thought I had been hacked or something. To see what the problem was I telnetted into my qmail box using

telnet mail.farrowcomputing.com 110

port 110 is the port designated to pop3, then put in your username

user  “username”

then password

pass “password”

and on my system was then seeing “Unable to scan $HOME/Maildir” looked into it and had 6000 spam messages, now the limit I have for mails is quite low so you either need to up it or delete some of the messages from the linux box running qmail or you will need to put the softlimit up, ie.

Try to increase the softlimit for pop3d which is found in your pop3d run script such as /var/qmail/service/pop3d/run (for e.g.): 

blah blah… softlimit -m 2000000 to higher value.

 

Using WinCVS and Integrating Visual Studio .NET with CVS over SSH

Recently I have had to use CVS rather than source safe as the repository for my latest project.  I have used CVS with visual studio 6 using the  igloo toolset, now I cant remember if that was over SSH but it did work very well and CVS is far superior than source safe.

The project that I am now on is a visual studio .net one with the cvs repository having access over ssh.  Firstly I wanted to set up wincvs as this tool is rather good, now to use ssh on windows you either go down the putty route or the cgywin route.  I personally quite like putty and that is what I did.  I used the latest beta version of wincvs 1.3.17.2.  I then followed this doc to get the basics going. 

Things I fell fowl of :

  • Wincvs always gave “Putty Internal Error” – “invalid port number” error when trying to connect.  I had the ssh client in preferences, ssh as putty.exe rather than plink.exe once changed, no more errors.
  • I couldnt get wincvs to prompt for a password and then it always gave a password error as it was prefilling it with empty string.  I then moved to set up a private public key so I didnt have to put in the password.
  • Couldnt recognise the public key, I wasnt sure if I had to have a file called authorization_keys2 or not with ssh2, or whether I had to have a .ssh2 directory.  On the clients box in the end I just saved the public key in the file authorization_keys in .ssh under the home directory of the account I was trying to login as and resolved the keys no problem.
  • Under the options controlling ssh authentication I had to uncheck attempt keyboard-interactive auth (SSH2) for it all to work as it would always fail to authenticate if this was checked.
  • Plus when I copied and pasted the public key from putty’s key gen I noticed in vi it didnt always paste the full key, just check that you have the full key when pasting it into your authorization_keys file. 
  • The key in authorization_keys must NOT have returns / line breaks in it, some editors may attempt to put line breaks in it.

One other thing when setting up your putty preferences in wincvs make sure you reference the saved session rather than the actual box / ip address your going to, the preferences do ask for this but you should use a saved session ie: paulfarrow@cvssavedsession:/home/cvs

Also you should run pageant.exe in the putty suite of programs, this will save you typing in the private key phrase each time you login.

Once all these things are in place, wincvs worked a treat for me and its a great program.

Secondly integration with Visual Studio .Net and CVS, well as I said before I used to use the igloo program but in this instance couldnt get ssh or ext protocol working with it, reading along the lines I dont think it can.  I then stumbled over this program which I have been using under evaluation.  It is created by pushok and seems to work no problem with ssh or ext.  It took me a little time to get it working, infact I went away from it but then I stumbled on what I have to do to get it going which wasnt that clear.

For ssh/ext protocol you must add the following environment variable CVS_RSH=plink.exe, once I had done this it worked fine.

The full faq about how to do that for proxyok can be read here.   The product appears to integrate with visual studio no problem, the only thing you must do is get into the right mind set to use CVS (as you probably are aware), as with CVS you take a snapshot of the whole module rather than just checkout what you want to work on.

 

Fixed Subtext View Picture Size Problem

Right I have fixed the view picture size problem in subtext as it was really bugging me.  I have removed the width and height settings so that it either defaults to the size of the picture, or you can override the settings using css now.

The new binaries with the change in are located here 

 http://www.paulfarrow.com/download/dottextpicupdate.zip.

You will then need to override the css in your options css override as follows:

.imageFrame img { width: 505px; height: 480px }

It does make the picture look a bit squashed but its in the correct place, play around with the sizes until you have what you want…..

Let me know of any problems that I have overlooked.  Take a look at the viewer here http://www.paulfarrow.com/gallery/2.aspx

 

javascript error in postback on ASP.net 1.1

Normal story, deploy code and what you think is live isnt actually live.  In this case I am talking about the ASP.net 1.1 Service pack 1.

And low and behold get a lovely javascript error when you have added controls to pages etc etc.

So after much digging around I found a solution to the problem (that is rather than deploying the service pack due to restrictions on the live server), which works lovely.  The solution …

You can override the render method in your pages or base classes depending on what your doing, like so

// Override the render method for all those machines
// without ASP.net 1.1 service pack 1

protected override voidRender(HtmlTextWriter writer)
{
StringBuilder stringBuilder = new StringBuilder();
StringWriter stringWriter = new
StringWriter(stringBuilder);
HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);
base.Render(htmlWriter);
string html = stringBuilder.ToString();
int start = html.IndexOf(”

int end = html.IndexOf(“\””, start);
string formID = html.Substring(start, end – start);
string replace = formID.Replace(“:”, “_”);
html = html.Replace(“document.” + formID, “document.” + replace);
writer.Write(html);
}  

This will only work if you have a form tag in your page, I guess we could adapt it so if the page doesnt have a form then dont do the replace, ie no postback needed.