• Project HoneyPot – A honey trap for spammers

    Project Honey Pot – is a service that allows you to track and help catch spammers who harvest email addresses from your web pages. Better still it helps you to keep out comment spammers. I even thought to write a wordpress plugin for it but as happens with many a good idea; someone else has thought of it first! (checkout http:BL ) In order to use the WP plugin or to benefit from the Honey Pot you need an access key. They will provide you with one if you install a spam trap on your website. The trap is a just a simple script. One that doesn’t impact your site and doesn’t place any undue load on your server so it doesn’t cost you anything.

    I have installed the ‘honeytrap’ at http://www.raditha.com/specimenfederation.php (yep it looks like a terms of use page but the bots will see it differently).

    Getting back to the http:BL plugin; what it does is prevent known spammers and email address harvesters from seeing your page. But this is not ideal, sometimes there may be rare cases of mistaken identity (after all Most ISPs asign dynamic IPs), It would perhaps be better to allow everyone (even IP addresses that are listed in project honey pot) to visit the site and read the comments but to prevent them from posting new comments. Maybe there is room for another plugin ….

    I always talk of writing WP plugins but so far, I have written only one….

    Friday, July 3rd, 2009 at 19:51
  • JavaFX or JavaWTF

    If developers are expected to embrace JavaFX, at least the compiler should be stable. Unfortunately it isn’t.

    Note: An internal error has occurred in the OpenJFX compiler. Please file a bug at the
    Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues)
    after checking for duplicates. Include in your report:
    - the following diagnostics
    - file /tmp/javafx_err_532302993941075447.txt
    - and if possible, the source file which triggered this problem.
    Thank you.
    /home/raditha/jbproject/FX/f1/src/FileTest.fx:19: VFLGS$0 is not public in FileTest.PGNGame; cannot be accessed from outside package
    class PGNGame {
    1 error
    ERROR: javafxc execution failed, exit code: 1
    /home/raditha/jbproject/FX/f1/nbproject/build-impl.xml:143: exec returned: 255
    BUILD FAILED (total time: 3 seconds)

    Well, I am going to file a bug report as they suggest? Most definitely not. For one thing, I don’t have the time to search for duplicates and file a report with hundreds of gory details including steps to reproduce the bug only to hear an idiotic developer say, it’s not a bug report but something we have done wrong. Then 23 other people have to file the same report and 7 of them have to argue with the said developer before they finally agree to look into it and then release an update four months down the line.

    I hate M$ but I will be delighted to see SilverLight just bury JavaFX.

    Thursday, July 2nd, 2009 at 09:55
  • Wordpress 404 error on comment submission

    For more than six months whenever a visitor submitted a comment on this blog, he would be greeted with a 404 error. I blamed this on the advanced permalinks migration plugin and never got around to fixing it. It turns out that this may not be a fault of that plugin after all. It’s something else that’s broken; paginated comments (or at least this is the impression I got from reading several posts on different blogs on the topic).

    The solution it turns out is trivial (I am kicking myself for not fixing this earlier). I found it on http://wordpress.org/support/topic/254939; all you need to do is to turn off paginated comments!

    Wednesday, July 1st, 2009 at 17:10
  • Wordpress Auto Upgrade and SFTP

    Wordpress added a nice feature a while back – the ability to upgrade your installation while logged into the admin console. If you make use of this feature you no longer need to mess around with downloading zip file, deleting the old stuff, loading the upgrade.php script etc etc. The same system can be used to upgrade plugins too.

    I never made use of this feature for two reasons, the first being that my wordpress installation is subversioned (revision control with subversion) and the second being that only FTP and FTP+SSL were supported by it. FTP+SSL isn’t so bad but FTP is totally insecure. Eventually I decided to use this update system for the plugins at least and thought I should add support for SFTP. The plan was to create a plugin that would add an SSH option to the upgrader. It was then that I found that SFTP support is already there but hasn’t been enabled!

    no SSH

    On my desktop computer (Fedora 11), where I keep a copy of all my websites, I had the SFTP option enabled in a less than a minute but on my production server it took a while longer. That was because because libssh2, which is the key requirement for the PHP SSH extension could not be installed with YUM. (This is a Centos server). While attempting to use YUM, I had to run a load of updates and worst of all reboot the server (something which hasn’t been done for more than an year).

    libssh2/php ssh extention had to be installed manually and I followed the instructions in the /wp-admin/includes/class-wp-filesystem-ssh2.php file – the same set of instructions are found at http://kevin.vanzonneveld.net/techblog/article/make_ssh_connections_with_php/. Unfortunately they both contain an error.

    cd /usr/src
    wget http://surfnet.dl.sourceforge.net/sourceforge/libssh2/libssh2-0.14.tar.gz
    tar -zxvf libssh2-0.14.tar.gz
    cd libssh2-0.14/
    ./configure
    make all install

    The libssh2 download is really ancient – it wouldn’t even compile on my Centos box – worse gcc even segfaulted while trying to compile it. I kid you not. I have never seen gcc segfault before.

    make[1]: Entering directory `/root/libssh2-0.14/src’
    gcc -o channel.o channel.c -c -g -O2 /usr/include -I/usr/include -Wall -I../include/ -fPIC
    gcc: /usr/include: linker input file unused because linking not done
    channel.c:1253:10: /usr/include: No such file or directory
    channel.c:71: internal compiler error: Segmentation fault
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See for instructions.
    make[1]: *** [channel.o] Error 1
    make[1]: Leaving directory `/root/libssh2-0.14/src’
    make: *** [all] Error 1

    The correct way to go about it is to visit the libssh2 project page on sourceforge and download the latest version (happens to be 1.1 at the time of writing).  The latest version could be compiled without any problems. After that you can do the pecl installation followed by editing the php.ini file

    pecl install -f ssh2

    wordpress and ssh

    wordpress and ssh

    In my case, I had to give the full path to the ssh2.so file because the engine couldn’t find the extension when only a relative path was given. That’s because pear seems to have installed the shared object at a wierd location. Well in the end after the apachectl restart I now have the PHP SSH extension enabled and wordpress update page does show the ssh2 extension.

    Tuesday, June 30th, 2009 at 11:10
TOP