ZD1211 Wireless LAN installation upon Ubuntu

January 31st, 2007 by ltz

Seems like the wireless area in ubuntu lacks some usable guides. I am trying to configure a standard, very cheap piece of USB Wireless stick of the brand Sweex (model: LC100040. based upon the Zydas 1211 chipset) on an old laptop COMPAQ armada M700 series. Found som standard drivers in the ubuntu universe repository and even thou I can find some networks with this driver, I cannot connect to any of them. Not even my own wlan-router, which worked fine in windows. Next step is trying out a zd1211 guide I found at an ubuntu forum (Howto Zydas 1211 with Ubuntu EDGY). Will get back to the result of this one..

Several “Invalid” messages when entering lwconfig
eth1 802.11g zd1211 ESSID:"test" Mode:Ad-Hoc Frequency:2.472 GHz Cell: Invalid Bit Rate=1 Mb/s Encryption key:off Link Quality=93/100 Signal level=93/100 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Posted in *NIX, Comp | No Comments »

Ubuntu PHP5, MySQL, Apache2 installation order..

January 22nd, 2007 by ltz

Installing the Ubuntu Server distribution and perhaps only using the php5-cli module (= php interpreted at the command line..) together with MySQL works fine. However if you want apache2 installed later on, the installation might result in an errormessage not very unlike:

Call to undefined function mysql_pconnect() …..
This is because of php not finding the mysql addon. The installation order in ubuntu messed ut the automatic configuration and the config file will not be able to find the correct mysql.so file. This is of course given that you have installed all the required modules correctly (php5, php5-mysql, apache2, mysql ….+ libs).

Try this for a solution..

Update the database..
sudo slocate -u

Find the mysql.so file.
locate mysql.so

Probably returns /usr/lib/php5/20051025/mysql.so, create and copy this file to a extensions directory to the php5.
sudo mkdir /usr/lib/php5/ext
sudo cp /usr/lib/php5/20051025/mysql.so /usr/lib/php5/ext/

Last, edit the php.ini file.
sudo pico /etc/php5/apache2/php.ini

Look for a mysql.so entry. (Search in pico by using ctrl+w). It should look like:
extension = mysql.so
Save the php.ini file. (ctrl+x then enter y)
Restart the apache2 webbserver:
sudo apache2ctl restart
This should do it..

Edit:
Link: ubuntu forum guide surrounding the same problem.

Posted in *NIX, Comp | No Comments »

Simple XML parsing with CLI PHP, character encoding problems

January 7th, 2007 by ltz

When using PHP for creating html documents intended to be read by a web browser there’s the possibility to set character encoding within the html-heading, getting a extra way to handla the character presentation of the content. However when running PHP code through the CLI-PHP software for internal, server-side purposes handling data the character encoding might require a little bit more work. Reading XML-documents using the PHP “xml_parser” and at the same time trusting the character encoding given in the XML-document header as shown below might not be enough in order to make sure you get the correct character encoding.

...xml version="1.0" encoding="iso-8859-1" ...

Be sure to set the encoding within the creation of the XML-parser.


$xml_parser = xml_parser_create();

xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true);
xml_parser_set_option($xml_parser, XML_OPTION_TARGET_ENCODING, "ISO-8859-1");

Posted in Programming | No Comments »

Pierre Norraeus
Joomla! 1.5 Beta 2 - Red Barchetta