MySQL World Cities database installation

MaxMind offers a free cities database, the database contains more than 2.7 mil. locations, you can download it at MaxMind’s website. Once you have downloaded the compressed database, extract the file worldcitiespop.txt and invoke the MySQL client (preferably from the same directory where the worldcitiespop.txt file resides). Create the world database and the cities table… Continue reading MySQL World Cities database installation

WordPress page navigation without using a plugin

Here is a small… yes, a small function for displaying a paged navigation in your WordPress powered blog without using any plugin. The function is self-explaining, it accepts one optional parameter, the number of links to show without counting the previous and next buttons. It accepts your language The first, previous, next and last buttons… Continue reading WordPress page navigation without using a plugin

HowTo: Connect to Hostmonster’s SSH with a private key

Note: I use Hostmonster, I can’t test elsewhere, but I think these steps will work for Bluehost too. I don’t understand why most tutorials on hostmonster and bluehost are incomplete, they have one of the best shared hosting service, one of the best support teams… but there knowledge base is not that shiny. Well, this… Continue reading HowTo: Connect to Hostmonster’s SSH with a private key

WordPress LTR/RTL

Hello, I found your website on a WordPress forum. Currently I am rebuilding a website in wordpress that is in English and Farsi. I am using the Qtranslate and a theme called suffusion which supports RTL. The theme does come a rtl.css which moves everything to the right which is great. The problem I am… Continue reading WordPress LTR/RTL

PHP with IMAP on CentOS

I was playing with Drupal 6 and some UberCart ticket module when I came across an error message where Drupal told me that it needed the IMAP PHP extension to be installed. Because I’m a nice guy I will share this command with you: [me@it ~]# yum install php-imap Now it’s installed, proof: [me@it ~]#… Continue reading PHP with IMAP on CentOS

Error writing the value’s new contents (Windows Registry Editor)

I got this error when trying to change some configuration settings for my anti-virus (TrendMicro WFBS on Windows Server 2003) ‘Cannot edit LocalServerPort: Error writing the value’s new contents’ As usual, when something I don’t like happens on my computer or on other parts of my life, I ask my friend Google about it, the… Continue reading Error writing the value’s new contents (Windows Registry Editor)

Get current URL in PHP

Here is a function for getting the URL of the page being processed in PHP, the function accepts one optional parameter $ignore_port_80 (boolean) to tell it whether it should ignore the port part of the url if the port used is 80: # Function function get_current_url($ignore_port_80 = true) { $is_https = $_SERVER[‘HTTPS’] === ‘on’; $show_port… Continue reading Get current URL in PHP

vsftpd: 500 OOPS: unrecognised variable in config file

Question When I start vsftpd on my CentOs machine I get this error: Starting vsftpd for vsftpd: 500 OOPS: unrecognised variable in config file:¬†¬†anonymous_enable How can I fix it? Answer The option “anonymous_enable” is a valid vsftpd option, but as you can see on the error message, there is an extra white space before the… Continue reading vsftpd: 500 OOPS: unrecognised variable in config file