Technology, Social Media, Travel
RSS icon Email icon Home icon
  • Sphere.com: Blog Search that Works

    Posted on October 30th, 2005 John Berns 3 comments

    I get some of my best information from blogs. When you have thousands and thousands of brilliant minds blogging their ideas for all to share it’s an amazing thing: great information happens. Unfortunately, a lot of crap happens too.

    I have tried to use blog search engines like Technorati and IceRocket, but to be quite honest, the results I got back were not at all useful.

    Recently tested the beta of a new blog search engine called Sphere. My opinion of blog search engines has changed.

    My Test

    I am in the online travel business, I build travel web sites. I am always interested in travel industry news and affiliate marketing tips. Unfortunately, the terms for the searches in this area tend towards a lot of spam blogs. “Book your vacation on Travelocity here!” “Super-Easy Affiliate Marketing Tips to Make You Rich Overnight!”

    Luckily, these are also good terms to use to see if a search engine is doing a good job seperating the wheat from the chaff. So I used the terms “Travelocity” and “Affiliate Marketing” and searched each phrase on Sphere.com, Technorati and IceRocket.

    Comparing Results: Search Term “Travelocity”

    Sphere.com
    Out of the top 10 results, 4 were good articles, 2 were inane personal musings, 2 were on a site that appeared to slap up travel-related stories to get traffic and 2 were obviously a travel splog (spam blog). Verdict: 4 worthwhile links.

    Technorati
    Of the top 10 results, one was a good article, one was just a link to a good article, two were personal musings, 4 were splogs and 2 were in Chinese or Japanese. Verdict: one worthwhile link.

    IceRocket
    Of the top 10 results, one was just a link to a good article, two were personal musings, 7were splogs. Verdict: nothing worthwhile.

    Comparing Results: Search Term “Affiliate Marketing”

    Sphere.com
    Out of the top 10 results, 4 were good articles, 2 were rather cheesey articles, 2 were RSS splogs and 2 were affiliate marketing get-rich schemes. Verdict: 4 worthwhile links.

    Technorati
    Of the top 10 results, one was a good article, the rest were get rich schemes and other splog. Verdict: one worthwhile link.

    IceRocket
    Of the top 10 results there was nothing but splogs and get rich schemes. Verdict: nothing worthwhile.

    One Feature That Should Be Ubiquitous

    IceRocket has a nice “Exclude” feature that the other sites would do well to emulate. Unfortunately it’s wasted on IceRocket; there is too much junk returned to make it worth the effort to weed out the bad results.

    Conclusion

    Sphere is the first blog search engine that comes close to having enough relevant results to make a blog search useful. Technorati and IceRocket both do a terrible job of determining relevance and, unless they make some major changes quickly, run the risk of becoming irrelevant themselves.

  • Compiling PHP5 with Mysql and Mysqli Database Drivers

    Posted on October 30th, 2005 John Berns 12 comments

    NOTE: This blog post was written in 2005 and worked for PHP 5.0.x versions. Things might have changed–I cannot vouch for this method working on recent versions of PHP. (Hopefully, they have made it easier to support mysql and mysqli simultaneously!)

    For years, the mysql library has been the standard for PHP development and a lot of great apps have been built running PHP and mysql. Now, with PHP5 there is a new database extension called mysqli that stands for “MySQL Improved.”

    So what’s so great about mysqli? Why switch to mysqli?

    The answer is simple: PHP5’s new mysqli database driver kicks ass.

    However, for those of you looking for more solid justifications to present to a boss or a client, let me outline the reasons in a more quantifiable manner:

    • An object-oriented interface.
    • Support for the new MySQL binary protocol that was introduced in MySQL 4.1. (The new protocol is more efficient that the old one and allows for the support of a broader range of features, such as prepared statements.)
    • Support for the full feature set of the MySQL C client library, including the ability to set advanced connection options via mysqli_init() and related functions.
    • Support for additional tracing, debugging, load balancing and replication functionality.
    • Greater speed. Enhancements in both the extension and in MySQL have made most operations faster, with certain operations becoming up to 40 times faster as compared to ext/mysql.
    • Better security. In older versions of the MySQL RDBMS, the possibility existed for an attacker to extract weak password hashes from the network and then recreate a user’s password. The new authentication procedure is much more robust and mirrors the attack-resistant authentication procedure of tools like SSH.

    If mysqli is so great, then why isn’t everybody using it?

    The reality is there is a lot of code out there based on the mysql extension; you might be running blogging software (like WordPress as I am) that does not run under mysqli, you might have legacy code that you don’t want to go through the expense of updating, you might have other apps hosted on the server that require mysql (Mambo, Joomla, MediaWiki, WordPress to name a few).

    Correction: Mambo does work with mysqli, thanks for pointing that out Nikos! Joomla is a fork of Mambo and also supports mysqli.

    The good news is that mysqli and mysql can peacefully co-exist on the same server: you can let the exisitng code run under mysql and start to develop new code with mysqli.

    Here’s how you can set up PHP5 with both mysqli and mysql enabled.

    When you run the configure command (step 10 in the PHP installation instructions if you are reading he guides mentioned above) use the following:

    ./configure --with-mysql=/usr –with-mysqli=/usr/bin/mysql_config

    Notice that the =’some directory’ is different for mysql and mysqli–this is as it should be!

    The locations of the directories might vary on the system you are using, so, from the command line run:

    slocate mysql_config

    On a RedHat / Fedora install the response you will get is:

    /usr/bin/mysql_config

    That the directory for mysql_config and the path that goes after “–with-mysqli=�?, the path that goes after “–with-mysql=�? is /usr (or whatever is two directories above mysql_config).

    Now, here is the trick: this configure command actually generates a bad makefile, so use a text editor and open up the file called “Makefile�? and look for a line that starts with EXTRA_LIBS such as:

    EXTRA_LIBS = -lcrypt -lcrypt -lmysqlclient -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lmysqlclient -lcrypt -lnsl -lm -lz -lnss_files -lnss_dns -lresolv -lnss_files -lnss_dns -lresolv -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lcrypt

    You will notice that the term “-lmysqlclient�? is in there twice. Delete one of them and save the Makefile

    With this little tweak, when you run “make�? it PHP5 should compile just fine–and support both mysql and mysqli.

    That’s it!

    More Info: