Multi-Search3
Showing posts with label Errors. Show all posts
Showing posts with label Errors. Show all posts

Are Your Image Tweets Erroring Out? Stop The Fast Finger Syndrome!

Image Credit: Ocal-clker.com

PROBLEM

You managed to get that lucky, hard-to-get, once-in-a-blue-moon image captured on your cell phone. Or you just found a really funny or interesting image somewhere on the web and can't wait to share it with the world.

So you start your twitter session, press the image button from the tweet window to select the image from the hard disk and press the tweet button and are  greeted by the "Error creating status" or the "tweeting a photo timed out" errors!

Not just once or twice, you have been trying a number of times always ending up with those darn errors!

Here is the fact: Text tweets almost always get tweeted at once except during severe server load periods. But image or media tweets add extra burden to the tweet with their size. A small image with a few KB size may get by easily whereas huge images and videos are sure to take a few seconds to a few minutes for the upload to server to complete! So, what now?

SOLUTION

Curb your enthusiasm, dude! Stop your fast fingers and try this first!

If your image tweets error out with the above errors, first select the image from the hard disk, WAIT A FEW MINUTES till the data transfer icon in the system tray stops blinking if you have one, which means that the image has fully been uploaded, and then press the TWEET button for a successful tweet! This applies to most image uploads on slow internet but may also apply to bigger image or video uploads even on faster bandwidth!



"Got slow internet and image tweets erroring out? Go slow, wait till the image has fully been uploaded, and then press the TWEET button!"



Why You Should Always Grep Carefully If Your Search String Has ">" In It.





It's Better "Quoted" Than "Naught"ed!


Behold the mighty little ">" symbol in a Unix/Linux grep command. If not quoted, it will empty the file being searched.

EASY EMPTY

If you've been on the Unix/Linux platforms for a while, I am sure that you'll remember this good old technique to empty files.
>test.log
This command nulls out the test.log file and is usually used to empty fat old error files and log files.

THE DANGER OF UNQUOTED ">" WITHIN A GREP COMMAND

While the command above is perfectly fine, accidents do happen especially if and when we are dumb, careless or in a big hurry! That's why we better watch out for the greater than symbol [">"]  used carelessly in a grep command. If it is not quoted, it empties the file. Makes it 0 bytes. Zero. Zilch. Nada. Naught. Nothing! What a nightmare! There's no way out except with a backup. It doesn't matter it is a 1KB file or 1GB. There is nothing left in the file so you can try the "string" command or similar. How dangerous!





EXAMPLE

Let us prove this with an example. Look at the image above. We have a test file called hworld1.log and we are going to search for a string "echo hello >" within the file. First look at the file itself.

$cat hworld1.log 
#!/bin/sh
#Beware the greater than symbol in a grep command. Always quote it!
touch hello.log
echo hello>hello.log
echo world>>hello.log
ls -l hello.log
exit

CORRECT USAGE OF THE GREP COMMAND

To search for the string "echo hello >" within the hworld1.log file, type
$grep "echo hello >" hworld1.log
and everything is fine. Check the image above.

DANGER! INCORRECT USAGE


Suppose you are in a hurry to go out and you accidentally forget to quote your > symbol in your grep command. Now it is not part of the search string you intend it to be anymore. The grep command looks for part of the search string [echo] in the wrong place [non-existent hello file] and the input file [hworld1.log] is overwritten  with null instead!  Never try

$grep echo hello > hworld1.log
or else the hworld1.log file is nulled out! Check the image above.

BACKUPS ARE NOT LUXURY-THEY ARE AN ABSOLUTE NECESSITY

It's always top priority to back up anything worthwhile on the pc/laptop regularly. Even with backups, it's never safe to use ">" in a grep command without quotes carelessly! Remember the tiny, little ">" can make a tiny 1KB file or a 1GB monster file empty in a second!

REQUIREMENTS

Tested on Puppy Lucid 510. Puppy Linux allows both single and double quotes within the grep command. Check with your Unix/Linux platform for details on how things work with regard to single or double quotes.

Suppress "The Flash Plug-in Was Blocked Because It Is Out Of Date" Error




PROBLEM

I am using Chromium 12.0.742.112 (90304) on Puppy Lucid510 Linux and I used to get the annoying "The flash plug-in blocked because it is out of date" error [see image above] when I encountered flash content while browsing flash-enabled websites. 

SOLUTION

Since I just wanted to suppress the error, [The proper solution obviously is to upgrade the plugin but I am trying live cds so I just want to live with as few installs/upgrades as required] I used a tip from Google Chrome support and started Chromium with the "--allow-outdated-plugins" option like this: 

chromium-browser --allow-outdated-plugins "http://my-error-throwing-site.com"

and the error message simply vanished! If you have a similar error, remember this error could be generic so give this solution a try first on your other Linux distros before trying other solutions!

FOR MORE INFO


Check out this Google Chrome Support Link for more information.
https://support.google.com/chrome/bin/answer.py?hl=en&answer=1181003

Return To Sender - "Bad Address" Error

LucidPuppy
"Bad Address" Error
Lucid Puppy 51 - Pupdial

Internet working, everything seems to be fine.

Then suddenly, something comes up, you try something different and then it happens - you can't connect to the web! Trying to debug, you open a terminal and type ping www.yahoo.com and your terminal spits out a "bad address" error. Same with google or any site on the web.

Has this happened to you? Ready to give up and start from the live-cd again? Well,
hold on, don't give up, not just yet. Read on, and you could be back online in a matter of minutes!

Let me explain how I ended up in la la land. I use the Nokia N73 phone which also doubles as my modem. I plug the data cable, select the [PC Suite] option from among 5 options. I used to do this every single time I connected to the web.

Then somehow I discovered the [Data Cable] icon from the [Tools] folder of my  N73 which does a one-time configuration of how I want to connect permanently once I choose it. This suppresses the prompt so I can just plug my phone and start the pupdial program.

Overcome with excitement, I wanted to jump a step further and explore a way to
configure pupdial so I would start dialing in as soon as I plug in without having
to open pupdial. This didn't look as easy as I thought so I was trying the other
connectivity tools and somehow messed up the Internet connectivity. So now, pupdial connects successfully as before, but I cannot go online however hard I try!

Back to where we started, I type www.yahoo.com and get the "BAD ADDRESS" error thrown at me.

Embarking on a wild goose chase for solving this problem, I first downloaded and installed an older version of pupdial, which did not have the
[Access Point] input box but everything else the same as the one in Lucid 510 but for this, and this one did exactly the same. Pupdial connected but I could not browse the web. When I tried to uninstall, there was no entry in the PPM for this older pupdial pet. I finally ended up copying a good pupdial script from a good /usr/sbin and copied it to my current /usr/sbin. I remembered to verify the other dependencies  and made sure it was okay.

Dismayed and discouraged after some more testing, I finally found that /etc/resolv.conf somehow got messed up. Actually a link to this file from /etc/ppp  was also broken, so I deleted these, created a  new /etc/resolv.conf file with 2 lines for the nameservers that I copied from backup that look like this.
nameserver nnn.nnn.nn.nn
nameserver nnn.nnn.nn.nn

[Just remember that for dynamically ISP assigned IPs, the /etc/resolv.conf and a link to it from /etc/ppp get modified by pupdial upon a successful connection and for static IPs, you can create it with the appropriate IPs manually.

Note1: Many thanks to Barry and the great puppy community, especially the forums. From BK's readme's:
".../etc/resolv.conf
This has your ISP's domain name servers (DNSs). Normally, these will be supplied automatically by the ISP and this file will be written to during the connection ..."

Note2: Also from Bk's readme's:
"...When you make a connection to the ISP, by typing "ppp -c" the file "resolv.conf" will get automatically updated with the DNSs (assuming IP addresses are dynamically assigned by the ISP) -- otherwise you will have to edit this file...".

I restarted pupdial, and pressed the connect button and wonder of wonders, pupdial took over, created the other required files and links and this time there was no "bad address" error when I tried to ping www.yahoo.com. Trust pupdial to get you to the net!

Steps I followed: [These are unique to my Lucid 510 puppy, yours may be different!]

1.ifconfig -a [check ppp0 here if you're using dialup/ppp]

2.ifconfig eth0 down [bring down eth0]

3.ifconfig eth0 up [restart eth0. Steps 2 and 3 may not be necessary, I think.]

4.ls -lstr `find / -iname "*resolv.conf*"` [That's a backtick before the find command and also at eol. Get a time-sorted, latest-at-bottom display of all resolv.conf files in your system. Just for information-optional]

5.rm /etc/resolv.conf
   rm /etc/ppp/resolv.conf [Removed /etc/resolv.conf and the link to it from /etc/ppp. Save this file if you can before deleting anyway]

6.vi /etc/resolv.conf [created resolv.conf and put the 2 nameserver entries here from backup with the vi editor, you could use geany or others if you like. [You don't have to, if the nameservers from your ISP are dynamic;  actually, in the live-cd, the /etc/resolv.conf file is empty and there is a link to this from /etc/ppp. Pupdial populates the /etc/resolv.conf from ISPs when it makes a successful connection]

7.pupdial [connect as usual, pupdial recreates all ppp-related dependencies,
and lets you connect to the web]


Lost your Internet connectivity all of a sudden? Resolve the resolv.conf issue first!


Hit The Jackpot - With Xampp On Linux Puppy Lucid!


The 777 magic


Let us create a fresh new install of the Xampp environment on Linux Puppy Lucid 5.1 with the Apache web server running a MySQL database in the back end and also make a successful implementation of a Php sample application. This is a terrific way to create the environment from scratch and also start developing apps on the Linux platform with the Apache-Php-MySQL combo!




This Xampp install even has the webalizer tool to monitor the statistics of your local web server, really cool!


What jackpot? What has the title to do with this?

You see, when I first started this ambitious endeavor of building a web server on a pretty new [to me!] Puppy Lucid Linux environment, I thought I really had a monster of a task ahead, and it really did prove so, despite the fact that I already had a successful implementation of the Xampp on Windows XP before for my TpqcPhp Script Library app.  [By the way, if you wish to download a one-of-a-kind point-and-click real-time Oracle-Php Script Library Generator that lets you create a html script library from any of your (tuning) Oracle script directories on your drive, view the script and also run it at once with side-by-side links, try this now HERE. This tool helps you configure and use either Xampp or the regular LAMP stack for the web server on Windows XP]

Let us get back to our jackpot, What has the title to do with this?

Okay, so, even though Xampp makes such a small deal of this huge task on Windows or Linux, manually configuring it is not for the faint-of-heart.
And that's exactly why, after toiling for a while with a manual LAMPP stack, I
happened to get back to Xampp again, this time on the Puppy Lucid Linux platform.
And the only snag was the permission problem that wouldn't let MySQL start up properly but went away with the 777 magic and hence the title. Once you chmod 777 /tmp  and start Xampp, you've hit the jackpot! Looks like a known issue but thank the folks at various places on the net who offer this solution for this problem. Don't forget to verify your win with a look at
http://localhost/xampp/splash.php or just http://localhost.

I must mention something here. While the web server on Chrome[Chromium - chrome 6.0.428.0] did work successfully while connected to the internet, it wouldn't work when I went offline! I later found that this and earlier versions of Chrome have this behaviour but got fixed in later versions so for offline development work I had to find another browser, Opera worked perfectly.

Here is a puzzle for you, where has Opera kept a landmine hidden?

In the restart button of the download window. Absent-mindedly pressing the
Restart button when a 3-hour download on my speed-of-light dial up connection
was nearing completion reset it and made me start all over! Oh what pain!


Steps to install Xampp on Puppy Lucid Linux

1.Download Xampp for Linux
http://www.apachefriends.org/en/xampp-linux.html

2.Install Xampp with this command
tar xvfz xampp-linux-1.7.7.tar.gz -C /opt


3.Change the permissions on the /tmp folder
chmod 777 /tmp


4.Start Xampp
/opt/lampp/lampp start


5.Create passwords for the webroot folder, PhyMyAdmin, MySql root user and ftp user nobody. Keep the password same for simplicity.
/opt/lampp/lampp security

6.Configure /opt/lampp/etc/php.ini to disregard warning messages by commenting the following line
;ERROR_REPORTING = E_ALL | E_STRICT

7.Restart Xampp
/opt/lampp/lampp restart






8.Verify a successful Xampp install. You will have to login to your web server first with lampp/your-password  account you created in step 5.

http://localhost/xampp/splash.php or just http://localhost.


9.Install a sample Php application[code library from Roman Diaz]



This is an extremely useful and absolutely snappy app from http://www.romandiaz.me/codelib.
I really like this tiny but useful application with current techniques! Follow the instructions in the zip file or check out what I did to install this  code library on my laptop.


a.Create a new database[codelib] from PhpMyAdmin
   http://localhost/phpmyadmin
   Login as [root]. 
   Click [localhost] on RHS. 

   Click [Sql] from the topmenu on RHS. 
   Type [create database codelib;]    without the square brackets in the box and press the [GO] button.
    

b.Create user [codelib] with password [codelib] or your password and grant all
   privileges to this user
   Click [Reload navigation frame] icon at the end of row of icons on top of the LHS
   and select [codelib] database. 
   Click [Privileges] on RHS topmenu, click [Add new user]. 
   Under [Login Information] fill in the username[codelib],  hostname[localhost], 
   password[codelib]  and retype password. 
   Under [Database for user] select [
   Under [Global privileges] check all  and press [GO].

c.Download code library and unzip it to codelib folder
   http://www.romandiaz.me/codelib/download.php

d.Copy the codelib folder to webroot(/opt/lampp/htdocs). Usually you may get away
   with creating a soft link to the codelib folder from the webroot
   (ln -s /yourpath/codelib /opt/lampp/htdocs) but in the Puppy world you cannot
   use chmod command on files in your usb or even NT file systems! So you have to
   physically copy the whole folder to the webroot of the xampp install.
   cp -r /yourpath/codelib /opt/lampp/htdocs

e.Copy config_SAMPLE.php file to config.php and change dbname, dbuser,
   dbuserpwd, hostname in /opt/lampp/htdocs/codelib/config.php
   cd /opt/lampp/htdocs/codelib
   cp config_SAMPLE.php config.php 
   and change the dbname,dbuser,dbuserpwd and hostname in this file


e.Change permissions 
   chmod 777 install.php
   chmod 777 config.php


f.Run create.sql
  Click [codelib] on LHS.
  Click [import] on RHS. 
  Click [choose file] under [file to import]. 
  Select  /opt/lampp/htdocs/codelib/create.sql. 
  Click [go].
  Import should have run 17 queries.

g.Enter the following in your browser to get to the [create your account] screen.   
   http://localhost/codelib/install.php

h.Enter [codelib] for username and [codelib] for password to create account and press [submit].

i. Enter [codelib] for username and [codelib] for password and press [submit] to login to the code library! From now on you can go to
http://localhost/codelib
to login to your code library!

You don't have to gamble to hit the jackpot! Do it with Xampp on Puppy Lucid Linux!

Requirements

1.Pc or laptop with or without a hard disk(I'm running without a hard disk, I've been for a while. Life on a live-cd is unbearable now since I don't save the config on USB or cd which means it's like you reinstall your OS every day - nothing is remembered. But it should be normal once I start saving it.)
2.Puppy Lucid 5.1.0[Kernel 2.6.33.2]
3.Xampp for Linux 1.7.7 with
      a)Apache/2.2.21 (Unix) DAV/2 mod_ssl/2.2.21 OpenSSL/1.0.0c  PHP/5.3.8 mod_apreq2-20090110/
          2.7.1 mod_perl/2.0.5 Perl/v5.10.1
      b)Mysql Server version: 5.5.16
      c)MySQL client version: mysqlnd 5.0.8-dev
      d)PhpMyAdmin Version information: 3.4.5
      e)Php 5.3.8
4.Chrome Browser(6.0.428.0) works only with internet connection so use Opera(11.60) for offline development or get a newer version of chrome.


Disc Gone Crazy - Puppy To The Rescue!

Puppy Logo
[My first take on seeking redemption in puppy-land, but curb your canine queries. I'm not a goo.roo!]
With more than a decade of experience in IT and computers, I've had my share of adware, malware and virus-related agony and pain. I've camped at the safe boot for weeks-on-end recovering from unrelenting BSDs. And I have tried one solution after another to get things going.
Regardless of what my suffering was, my hard disks were always quietly gentle, even to the point of OEM restores. This is the first time my laptop died with a whirring, squeaky and noisy hard disk. Everything seemed be nice and calm, there were no warning signs but suddenly a month ago it crashed one night.
Anyway past is past, what do I do?
I now had a dead laptop and a live Nokia n73 cellphone with Internet but no way to get online from my laptop.
Well yes, my n73 did help me download loads of ISO's of live cds, some good, some dud. I could  burn cds and boot up to a mini-xp shell and also to an excellent tiny Linux distro, but in both cases, my n73 wouldn't let me dial the Internet through the phone modem to get the Internet connectivity which I desperately need for my digital survival. The windows live cd I tried, which is probably the only one of its kind, with its absolutely indispensable recovery tools just won't run the Nokia PC Suite so I could go online. The Linux live cd,  a tiny little Linux powerhouse had everything I needed except Internet connectivity. I wrestled with PPP, PPPOE and Wvdial day after vexing day, night after desperate night, downloading ISOs on my cellphone, burning cds and attempting to boot and connect  but always failing.
Anyway, after hundreds of hours and my patience nearing its limits, I found the Puppy route to laptop revival. What an awesome puppy!
I burned the Puppy Wary 5.3 ISO,  started the boot process not completely devoid of a lurking cynicism and couldn't believe my eyes when the screen came alive and carried the boot process through to completion, just seven clicks from start to the two "woof"s. I saw the welcome screen, the connect button on top-right, followed instructions mechanically and was online within a minute or two!
YES, it's true!
The amazing pupdial probed and discovered my modem, configured it, dialled and dropped me on the www like clockwork. My relief was so huge because my earlier attempts to configure ppp and wvdial were so pointless. I only had to enter the phone number of my dial up connection and the access point to get connected, so unbelievable!
This puppy, Wary 5.3 is the name, is a true hero, it's like a miracle to me.
So, is your hard disk dead, can't boot up and get online?
Take the puppy Linux route to online survival. Download and try Puppy Wary 5.3.
But be warned, it worked for me, your mileage may "WARY"!


BlogCollage


Blog Collage - Top Random Posts In No Particular Order

Mouseover the images for title and comments