Mysql

Running MySQL Without a Password on the Command Line

When you run a webserver there's always things that could be set up better, for reasons of security, reliability or speed. One of my undone tasks for an embarrassingly long time has been to stop backing up MySQL databases by passing along the username and password to a script at the command line. I was regularly using the mysqldump program to make a backup of each database via a script that contained these commands: OF=/home/[username]/backup/$3-$(date +%Y%m%d).gz mysqldump --user=$1 ... (read more)

Programming a Confidence Pool for the World Cup

I did some coding yesterday to run a 2014 World Cup confidence pool on SportsFilter. The way a confidence pool works is you assign points to teams based on how confident you are they will win. In this contest, you get point values from 32 down to 1 and assign them to the 32 World Cup teams. The more points you assign a team, the more you are awarded when that team wins or ties a match. Anyone can sign up for a SportsFilter account and play. A prize will be awarded to the winner: the Adidas ... (read more)

Fixing a 'Recompile with -fPIC' Error in MySQL

I run my web servers by compiling the most important components from source code, which makes it possible for me to add security fixes more quickly and fine-tune my installations of Apache, MySQL and PHP. While compiling the new release PHP 5.2.8 this weekend, the make process failed with this error: /usr/bin/ld: /usr/mysql/lib/mysql/libz.a(compress.o): relocation R_X86_64_32 against 'a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/mysql/lib/mysql/libz.a: ... (read more)

Weblog Pinger Extended with MySQL Database

I've added a MySQL database to Weblog-Pinger, my weblog update notification class library for PHP, so that it can track ping attempts and keep from hitting the same server too often. Some notification services reject pings sent too frequently. When I was the king of pings for six months in 2005, Weblogs.Com rejected pings sent more frequently than once per half-hour. If you try to ping Ping-O-Matic too often today, you get the error message "Pinging too fast. Slow down cowboy. Please ping no ... (read more)

Exporting a Manila Site Using OPML

The RSS Advisory Board site now includes all of the articles, weblog entries, and comments from the group's old Manila site, dating back to the group's founding in 2004. I never got a copy of the old site's root file from Harvard, so I collected the content using an obscure but cool feature of Manila: All site content is saved in the discussion board as individual messages, each of which can be downloaded as an OPML file. For example, open this weblog entry from Craig Burton's Manila blog in ... (read more)

Adding Atom 1.0 Support to RSS Sites

I switched to Atom 1.0 on Workbench two months ago, a move that hasn't been as smooth as I'd like because of one popular aggregator that doesn't support the format. This site is created using Wordzilla, a LAMP-based weblog publishing tool that I've developed over the last year. Writing code to generate Atom feeds in PHP was extremely simple, since most of the code used to generate RSS feeds could be applied to the task. Atom uses a different format for date-time values than RSS, so I had to ... (read more)

Tracking Click Pings with PHP/MySQL

Earlier this week, Mozilla Firefox developer Darin Fisher announced that test builds of the browser include support for click pings, an experimental new HTML feature that makes it easier for web sites to track clicks on outgoing links: I'm sure this may raise some eye-brows among privacy conscious folks, but please know that this change is being considered with the utmost regard for user privacy. The point of this feature is to enable link tracking mechanisms commonly employed on the web to get ... (read more)

UserLand Frees Up Manila Servers

UserLand Software is discontinuing free Manila hosting, as I discovered last week when one of their users sought refuge on Buzzword.Com. Edit This Page shut free service on Dec. 1 and ManilaSites will do the same Dec. 31. I can offer free hosting on Buzzword, but webloggers who are committed to publishing with Manila should be advised that I'm migrating the server to new software by May 1, 2006. A better long-term option for those folks is to subscribe to Weblogger.Com or UserLand. (As an ... (read more)

My Reign as the King of Pings

I've been running Weblogs.Com since June for Dave Winer, who wanted to see if service performance could be improved as he began to receive seven-digit inquiries about selling it. Weblogs.Com ran on Frontier for six years from its founding in 1999, handling the load reasonably well until the number of pings topped one million per day within the last year. In a frenzied weekend, I recoded the site as an Apache/MySQL/PHP web application running on a Linux server, writing all of the code from ... (read more)

The Joy of MySQL

While deleting some comment spam in the Drudge Retort database, I just had to use the following MySQL query: delete from feedback where author like '%sperm%'; ... (read more)