You Are Here Home > Annoying Stuff

Annoying Stuff

Problems with Google AdSense

I use AdSense on 1 of my websites and a while back I discovered some things about this service from Google.

One thing that I think is awful and shows how big corporates ONLY care about money was that I knew a website that was banned (black listed) by Google because they were “violating Google’s terms of services” by helping people buy and sell text link ads ;) and now when I search for the name of the site, it doesn’t show up in normal search results. The messed up part is that this particular website bought AdWords ads and their name shows up in sponsored links section right on the top of the search results.

This means 2 things: 1 – Google doesn’t care much about what you do when you pay, 2 – You can BUY the first spot on Google SERPs!!!

What they could do is to check the URLs against their banned list but…

The other thing about AdSense is this: Have you ever clicked on an AdSense link with confidence? have you ever seen anything valuable in those links?
Many of them are links that take you to irrelevant pages and many of the people who buy these keywords have so much money that they want the traffic in anyway they can, by bidding on keywords that have nothing to do with their pages.

This could be very bad, you are sending your visitors away with AdSense in the first place, but sadly you are sending them to pages that are not good.

It’s unfortunate but it’s what it is for now.

Problems with Google AdSense
Comments (0)   Filed under: Annoying Stuff,General,Search Engines   Posted by: Codehead

How to fix transparent PNGs in Internet Explorer

You might know already that there are some issues with transparent GIFs but PNGs don’t have those issues.
The problem with transparent PNGs is that Internet Explorer doesn’t like them so much and gives them a funny background.

So here is the solution that works great:
http://homepage.ntlworld.com/bobosola/index.htm

How to fix transparent PNGs in Internet Explorer

My problem with Microsoft and their products

A while back, I wrote two posts about Microsoft and I wrote them when I was upset so it might have offended people.

To be honest with you, I was a fan of Microsoft and their products up until Internet Explorer 7 came along.
I installed it on two computers and I had to disable all the addons other than the essentials in order to make them run smoothly and without so much issues.

Right now, my Internet Explorer process grows until it’s 1GB in size!!! and it then gets so slow or crashes and I loose all my open tabs and what ever I was doing.
It also crashed every once in a while for some reason and it’s still not standard compliant.

About Windows Vista; we also bought four computers with Vista and every single one, without an exception had issues right out of the box, big issues that I think Microsoft should have known about but shipped the product anyway.

Honestly, this is disappointing for me, because I liked Windows and it’s openness and the ability for everyone to write great applications for it and it’s huge documentation on Microsoft website.

I also think that Microsoft contributed a lot to the industry and I hope that this is not the end of it.

I’m a software developer and I don’t consider myself to be the best one but I know one thing, we don’t EVER ship until we fix all the obvious bugs, if we did, we wouldn’t have any clients right now.

Good Luck :)

My problem with Microsoft and their products
Comments (0)   Filed under: Annoying Stuff,General,Programming,Web Browsers   Posted by: Codehead

Python as CGI and Error 500, Internal Server Error

If you have this problem on *nix systems, these are the things to look for:

1 – Make sure your line breaks are \n not \r\n you can set this in almost all editors, you will have to either select *nix like line breaks or \n somewhere in your editor preferences.

2 – After the first step you will have to make sure that your FTP client uploads the files in ASCII format and this will insure that \n will stay \n.

3 – If it still doesn’t work, make sure your Python script’s permissions are 755. You can try:
chmod 755 your_python_script.py

Or use your FTP client to fix this. (Refer to it’s documentation but usually you can right click on the file, on your server and click properties)

4 – If you still have the problem, you will have to have the right shebang line in the beginning of your script, the most common one is:
#!/usr/bin/env python
If this doesn’t work try:
#!/usr/bin/python
Or:
#!/usr/local/bin/python
Note that, this must be the first line

5 – If none of these worked and you have root access to your server, try:
tail -f /usr/local/apache/logs/error_log (Note that, the path to Apache error log might be different on your server)
And look for the error message associated with your request.

6 – If you still can’t figure it out, write to your hosting company and ask them.

I hope this helps :)

Python as CGI and Error 500, Internal Server Error
Comments (6)   Filed under: Annoying Stuff,Python   Posted by: Codehead

Fixing libxml, php bug and issues with HTML entities; libexpat

There is another way to fix this issue and I didn’t write about it because I couldn’t make it work at first.
Apparently I was missing one line :)

First you will need to find out where libexpat is located on your server, it’s probably here:
/usr/lib

To find out for sure, open this folder (/usr/lib) and look for the file:
libexpat.so

If you can’t find it, log in as root via SSH and enter:
whereis libexpat.so

This should list the folder in which libexpat is located.

After all this you will need to compile PHP to use libexpat instead of libxml, so go to:
/var/cpanel/easy/apache/rawopts/

And create a file and name it “all_php5″ (no quotes), if there is a file with this name edit it and add these lines to the end of it:
–with-expat=builtin
–with-libexpat-dir=/usr/lib

(lines start with two dashes “-” that are not showing up here for some reason)
Remember that depending on where libexpat is located on your server you might need to edit the second line.

Now compile Apache and everything should work fine!

Fixing libxml, php bug and issues with HTML entities; libexpat
Comments (0)   Filed under: Annoying Stuff,Programming,Server,Web Development   Posted by: Codehead

Fixing libxml, php bug and issues with HTML entities; downgrading libxml

When you parse XML with PHP and libxml 2.7.0, all HTML entities were stripped out and this annoying bug messed up a lot of things and no one seems to care enough to fix this.

This bug is also reported here:
http://bugs.php.net/bug.php?id=45996
http://bugs.typo3.org/view.php?id=9359&nbn=2

From reading these few resources, I knew I had to downgrade to an older version of libxml but since I’m not very good at Linux I had no idea how to.

But I finally figured this out and here is how to do it with WHM/cPanel:

First you will have to install an older version of libxml, I installed libxml 2.6.30.
You will need an SSH client and you will have to login to your server with root, I use Putty:
http://www.chiark.greenend.org.uk/~sgtatham/putty/
Download it, run it, enter the IP address of your server, enter root and enter your password.
Then do:

cd /opt

mkdir libxml

cd libxml

wget http://xmlsoft.org/sources/libxml2-2.6.30.tar.gz

tar xvzf libxml2-2.6.30.tar.gz

cd libxml2-2.6.30

./configure –bindir=/opt/libxml/ –sbindir=/opt/libxml/ –libexecdir=/opt/libxml/ –datadir=/opt/libxml/ –sysconfdir=/opt/libxml/ –sharedstatedir=/opt/libxml/ –libdir=/opt/libxml/ –includedir=/opt/libxml/ –oldincludedir=/opt/libxml/

make && make install

Now you will need to update yum.conf to prevent it from updating libxml back, so edit:
/etc/yum.conf

And find the line that starts with:
exclude=

And add libxml* to the end of it so this line should look something like this:
exclude=apache* bind-chroot courier* dovecot* exim* httpd* mod_ssl* mysql* nsd* php* proftpd* pure-ftpd* spamassassin* squirrelmail* libxml*

Now we will have to let WHM know that we want to compile PHP with this new libxml path so go to:
/var/cpanel/easy/apache/rawopts/

There might be a file there named: “all_php5″ (no quotes) if there is edit it if there is not create it and add these lines to the end of it:
–with-libxml-dir=/opt/libxml
–with-libxml-dir=/opt/libxml/

Now go ahead and build Apache and PHP using:
WHM >> Main >> Software >> Apache Update

You should be all set.

Please note:
1 – Do this on your own risk.
2 – I’m not very good at Linux so please let me know if there is an easier method.
3 – This worked great on my CentOS.
4 – If you have never used WHM’s Apache Update, go ahead and read about it first.

Fixing libxml, php bug and issues with HTML entities; downgrading libxml
Comments (15)   Filed under: Annoying Stuff,PHP,Server,Web Development   Posted by: Codehead

Flash CS3 is slow on Windows Vista

Here is how to fix it:
1 – Right click on Flash’s desktop (or whatever) icon and then click “Properties”
2 – Go to compatibility tab
3 – Check the box “Run this program in compatibility mode for:”
4 – From the drop down select “Windows XP (Service Pack 2)”
5 – Open Flash

And that’s it, it will run smoothly, or at least it did for me.

Flash CS3 is slow on Windows Vista
Comments (5)   Filed under: Actionscript,Annoying Stuff,Flash   Posted by: Codehead

Red5 flash server problems; impossible to get it working

I worked 2 full days to get Red5 0.7.0 working with custom applications but I had no luck.

I couldn’t even get the tutorials written by Red5 developers working, it doesn’t have proper documentation either so it was a real nightmare.
So many other people have these problems too and there seem to be no answer to these problems.

So here is what I did, I installed Red5 0.6.2 and voila! it worked, all the tutorials worked and all the examples worked too!

I’m not a Java guru and I’m glad I’m not, it looks really huge and complicated, it doesn’t look fun to program in at all. I’m sure so many people like it very much but I really think even C is nicer than Java.
For example, to make an even “Hello World” Red5 application you have to make ~5 folders, 4 XML files, 1 Java class, compile your class, upload it to your server and restart Red5!!!

Update:
Funny, I kind of started liking Java :)

Red5 flash server problems; impossible to get it working
Comments (0)   Filed under: Actionscript,Annoying Stuff,Flash   Posted by: Codehead

Detecting the end of FLV stream in Actionscript 3, part 2

Read this post first:
http://blog.code-head.com/detecting-the-end-of-flv-stream-in-actionscript-3

Funny today, I get the events in reverse order:

NetStream.Buffer.Empty
NetStream.Buffer.Flush

Yesterday it was:

NetStream.Buffer.Flush
NetStream.Buffer.Empty

I will find the solution though ;)

Detecting the end of FLV stream in Actionscript 3, part 2
Comments (4)   Filed under: Actionscript,Annoying Stuff,Flash   Posted by: Codehead

Internet Explorer 7 and viruses

On this page:
http://www.microsoft.com/windows/products/winfamily/ie/default.mspx

It says “See how it helps to protect you from viruses, spyware, and other risks, plus more easily find the information you need.”.

Do you know how? It’s a virus itself!
Just kidding :)

Internet Explorer 7 and viruses
Comments (0)   Filed under: Annoying Stuff,Web Browsers   Posted by: Codehead
« Newer PostsOlder Posts »