Posts

Showing posts from July, 2008

bad blocks on my hard drive

Not a good day for science. One hard drive from my data server is not working right.Sometimes the system stops responding. Well, to check for badblocks just use smartctl , ofcourse your hdd must know about smartctl.To check use hdparm [...] hdparm -I /dev/hda [...] Commands/features: Enabled Supported: * SMART feature set [...] To see if Checking blocks 0 to 78150744 Checking for bad blocks (read-only test): 23267840/ 78150744 23489984/ 78150744 done Pass completed, 0 bad blocks foundthe hdd is ok run: smartctl -t long /dev/hda In order to check for badblocks run: badblocks -sv /dev/hda If you get something link this: Checking blocks 0 to 78150744 Checking for bad blocks (read-only test): 23267840/ 78150744 23489984/ 78150744 done Pass completed, 0 bad blocks found. ...you are lucky, if not, well...bad day for you :(

When your favorite wireless app is not working

Nowdays, all laptops have wifi cards, and if you have an old laptop you can buy a pcmpcia card,or you can try a USB wifi card ( TL-WN321G ) In linux, you have a lot of wifi manager apps.You can read more about them here But sometimes none of them are working and it's impossible to connect to a free public AP.So, back to the console :) 1- Free AP - to scan for wireless AP in my case, ath0 is the wifi card (i'm using a smc card with atheros chipset, Atheros Communications, Inc. AR5212 802.11abg NIC) iwlist ath0 scanning the result of wifi scanning myust be something like this : ath0 Scan completed : Cell 01 - Address: 00:00:00:00:00:00 ESSID:"free host spot" Mode:Master Frequency:2.437 GHz (Channel 6) Quality=45/70 Signal level=-50 dBm Noise level=-95 dBm to connect to this hot spot type : iwconfig ethX essid "free hot spot" In order to check if you are connected

How to compile php5 with oracle instant client 11

Well, this is very easy. First you need to download apache web server ,the latest php 5.2.6 from www.php.net and the instantclient11 from oracle download (you need an accont for this one) Unpack your apache archive in your work dir and then type ./configure --enable-so --with-mpm=prefork --enable-ssl=static --with-ssl=/usr/include/openssl/ If all is ok, type make , and after this make install This will install the http server in /usr/local/apache2 dir If you want to have php with oracle instantclient11, unpack the php archive on your disk and type: './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-pgsql' '--with-gd' '--with-zlib' '--with-oci8=instantclient,/opt/instantclient_11' '--enable-bcmath' '--with-sqlite' '--with-mysql' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--enable-mbstring' '--with-mcrypt' Offcourse, you must unpack the oracle instantclient11 zip file i