Vivotek PT7137 network camera connection problems
/0 Comments/in Hardware/by Stefan Helander
At the time my accesspoint was a DLINK DI-624+ broadband router and before I had time to dig into the problem any further, the DLINK passed away permanently and I got myself a Linksys WRT54GL which I pimped with Tomato. Now I had much better control over the wireless environment. I could boost the output on my Linksys to 80 mW (from the original 42) and the wireless survey helped me select a good channel with as little interference with my neighbours as possible. This helped a bit – the loss of connection occured more seldom. But they did still occur.

I still haven’t found the reason to the loss of connection. 7 meters should be no problem in a wifi/wlan environment. All other gadgets I connect through the same wireless network works without any problems. Possibly my Vivoteks wireless is broken or something in Vivoteks implementation makes it really sensetive to interference? I don’t know and honestly, I will not spend more time on it unless it causes me a problem again.
PHP htmlspecialchars_decode doesn’t handle nordic/german characters like å, ä and ö
/3 Comments/in Linux/FreeBSD/by Stefan HelanderThe PHP functions htmlspecialchars and it’s reverse htmlspecialchars_decode only handles the following characters:
- ‘&’ (ampersand) becomes ‘&’
- ‘”‘ (double quote) becomes ‘"’ when ENT_NOQUOTES is not set.
- ”’ (single quote) becomes ‘'’ only when ENT_QUOTES is set.
- ‘<‘ (less than) becomes ‘<’
- ‘>’ (greater than) becomes ‘>’
If you want to output html text containing nordic/german characters like Å, Ä, Ö and Ü in dialog boxes (popups) these characters also needs to be converted. The following PHP function does this for you:
function unhtml( $string ) {
$string = str_replace ( '&', '&', $string );
$string = str_replace ( ''', '\'', $string );
$string = str_replace ( '"', '"', $string );
$string = str_replace ( '<', '<', $string );
$string = str_replace ( '>', '>', $string );
$string = str_replace ( 'ü', 'ü', $string );
$string = str_replace ( 'Ü', 'Ü', $string );
$string = str_replace ( 'ä', 'ä', $string );
$string = str_replace ( 'Ä', 'Ä', $string );
$string = str_replace ( 'ö', 'ö', $string );
$string = str_replace ( 'Ö', 'Ö', $string );
$string = str_replace ( 'å', 'å', $string );
$string = str_replace ( 'Å', 'Å', $string );
return $string;
}
It is important that the code is saved in UTF-8 encoding (or the format your web page is using). Edit the code in for example Windows notedpad and use Save as. Now you can select UTF-8 encoding when saving the file.
Or if you are using UNIX / Linux you can use iconv to convert the file if it is not already in the correct format. First, to find out the current encoding for your file, use the file command:
$ file --mime-encoding unhtml.php unhtml.php: iso-8859-1
Now, to convert it to UTF-8 using the iconv command:
iconv -f iso-8859-1 -t utf-8 unhtml.php > unhtml-utf-8.php
The reverse of unhtml is of course the html function:
/* Encodes specific characters for display as html */
function html($string) {
$string = str_replace ( '&', '&', $string );
$string = str_replace ( '\'', ''', $string );
$string = str_replace ( '"', '"', $string );
$string = str_replace ( '<', '<', $string );
$string = str_replace ( '>', '>', $string );
$string = str_replace ( 'ü', 'ü', $string );
$string = str_replace ( 'Ü', 'Ü', $string );
$string = str_replace ( 'ä', 'ä', $string );
$string = str_replace ( 'Ä', 'Ä', $string );
$string = str_replace ( 'ö', 'ö', $string );
$string = str_replace ( 'Ö', 'Ö', $string );
$string = str_replace ( 'å', 'å', $string );
$string = str_replace ( 'Å', 'Å', $string );
return $string;
}
?>
TYPO3 cms installation fails in step 2
/0 Comments/in Linux/FreeBSD/by Stefan HelanderIf you are installing the TYPO3 content management system (CMS), after uploading the files to your web server and setting some directory permissions, you are supposed to point your browser to your web server’s root where you just have installed TYPO3 in order to continue the installation. A screen similar to this is displayed:
Enter database username, password and server (normally “localhost”) and click continue. If the following screen (as step 2) is displayed, you are in trouble:
This screen is supposed to show you the availible databases for selection. But as you can see it ends just below the word “Database”. No error message is displayed.
The reason for this is that PHP is running in Safe mode. By configuring your webserver/PHP to run with Safe mode off the installation will work.
This situation is actually described in the TYPO3 Wiki under troubleshooting saying “This could cause the Install Tool to display an error message”. In my case it didn’t and it took some time of head scratching to figure it out.
How to find out what Debian version a system is running
/0 Comments/in Linux/FreeBSD/by Stefan HelanderJust issue the command:
# cat /etc/debian_version
squeeze/sid
How to find out what Ubuntu version a system is running
/0 Comments/in Linux/FreeBSD/by Stefan HelanderThere are two ways:
# cat /etc/issue Ubuntu 9.10 \n \l
or
# lsb_release -a Distributor ID: Ubuntu Description: Ubuntu 9.10 Release: 9.10 Codename: karmic
The latter is slower but gives more information.
Google streets – now in Sweden and Denmark
/0 Comments/in Tools/by Stefan HelanderUntil recently Google streets has not been availible for Sweden and Denmark. There has been local sites with a similar function, like http://hitta.se/gatubild. But now you can also use Google streets for your virtual tour to Sweden and Denmark. Not only the large cities but also smaller villages and country roads can be seen in Google streets.
To use Google streets go to maps.google.com, find your place of interest, click and hold the little orange man that stands just above the zoom handle and put him down on the street you want to visit. Streets with photos will get blue borders when you lift the little man and you can of course only put him down on such streets.
Minolta Dimage Scan Dual III AF-2840 in Windows Vista
/0 Comments/in Hardware, Windows/by Stefan HelanderSo, did you also try to get this negitive/slide scanner to work in Windows Vista? No success? Thought so. Unfortunately I have found that Minolta scanners seems to have kind of a short life cycle in the eyes of the manufacturer. Like many other computer accessories that are not professional grade, drivers are availible for the current operating systems but when new arrives there just isn’t being any drivers developed. For this scanner I believe it was Windows 2000 and possibly Windows XP it had drivers for. But the arrival of Windows Vista was the death for this otherwise perfectly good scanner.

Pimp my router! Linksys WRT54GL on steroids… or at least on Tomato
/2 Comments/in Hardware, Linux/FreeBSD/by Stefan HelanderI while ago I got my hands on a Linksys WRT54GL broadband router. This little fellow runs on Linux. Nice, I thought. After fiddling around with it for a while I found that the firmware had bugs.

MySQL community protests against acquisition by Oracle
/0 Comments/in Linux/FreeBSD/by Stefan HelanderThe MySQL community around the world are getting worried about the possible acquistion of Sun Micosystems by Oracle. MySQL is community driven and often competes head to head with Sun Microsyftems commercial Oracle products. More than 14.000 MySQL users, developers and enthiusasts have signed a petition sent to regulators at the European Commission, Russia, China and other countries as a protest against the aqcuisition. According to eWeek it might be to late as the European Commission is expected to approve the deal within the next month.
You can sign the petition here to support the protest.



