Installing xhprof and XHGui on a Dreamhost Ubuntu 12.04 VPS to diagnose Drupal 6 performance

One of my websites has been running very slow for years - every so often I try to figure out why it's slow, and recently it had been suggested to install xhprof to gather some data. The website is a Drupal 6 site that gets 1000+ visits a day, and is an active forum website with lots of people chatting away about electric vehicles. The server is a VPS rented from Dreamhost. The latest iteration of Dreamhost VPS's uses SSD disks, and a customized version of Ubuntu 12.04.

Fixing Drush when it says a "higher level bootstrap" is required, even though you're inside a Drupal website's working directory

I'm trying to get ready for a Drupal 8 port, and one of the steps is to get Drush set up. Nowadays that means setting up Composer and running some magic commands with Composer that supposedly sets up Drush. The problem then came when I cd'd into the root of my Drupal 6 site, and tried to run "drush pm-list --core" to generate a list of installed modules to prepare a readiness spreadsheet. The error message that came up gave me a big WTF feeling:

Oath Keepers, unlicensed security services amid the civil rights protests of Ferguson MO

Since August 2014 the St. Louis suburb of Ferguson MO has been in the news, not because it's a nice town (which it is) but because a Ferguson Police Officer shot and killed an unarmed black teenager. Purportedly the shooting was because the teenager had just committed a "strong arm robbery" by stealing a package of cheap cigars from a convenience store.

Blast from the past - There WERE chemical weapons in Iraq, from the 1980's, built under US cooperation

Remember why it was so important for "us" to go into Iraq to topple Saddam Hussain's sovereign government? I'm not talking about the real reason - access to Iraq's oil fields - but the reason we were told. Remember warnings of mushroom clouds, and Saddam's chemical and biological weapons research programs? The programs for which zero evidence was found once Western forces entered the country and toppled the government?

Silicon Valley housing costs are insane, verified by real data

Housing costs in Silicon Valley are insane. Both rental and purchased housing has always have been outrageous, compared to the rest of the country, but the last two years has seen an absolutely insane rise in property values and rental rates. I haven't looked for data on this, but obviously those at the lower end of the pay scale are being priced out of the market.

Fixing broken images when Drupal adds _0 to uploaded file names; filename and filepath differs

druplicon.large_.pngOccasionally on Drupal sites (perhaps only Drupal 6), uploading a file to a file field, or the file uploads area on a node, results in the "filepath" indicating a different name than the "filename". That is, in the data model for a Node, you can attach files in the "uploads" or in a CCK field (in Drupal 7 this is slightly different) and each attached file is an object (or array) containing attributes named "filename" and "filepath".

Eliminating duplicates in Views 3 Drupal 6 when the "distinct" and "group by" features don't work

Yes, Drupal 6 is water under the stream except for those of us still maintaining Drupal 6 websites. On one of my sites I'm trying to bring the module status into 2014, because they'd last been updated in 2012 and Views hadn't even been upgraded to Views 3. It was pretty straightforward to generate a Drush Make file to generate updated code for the site. A couple of the Views didn't get properly upgraded to Views 3, and in most cases minor tweaks were all that was needed. But one View had a major flaw - it generated lots of duplicated content.

First world problems in the hotel lobby, do they mean we're unprepared for real problems?

This typical scene in a hotel lobby gives me little hope for humanity if we really have to face a significant problem:

MAN1: ... I explained to you, the price shown by the app for a room at this very hotel is $50 a night, why do you say the price ...

CLERK: Sir, as I explained to you earlier, I don't know how the app determines those prices. All I can tell you is what the booking computer tells me, and those rates are set by the hotel chain management. If you want a room let me know, or else I'll give it to one of these people waiting.

Apple claims environmentally moral high ground with new recycling program

Environmentally conscious owners of Apple's fine products should rejoice with today's announcement by Apple of an improved product recycling program. Apple will give out Apple Gift Card's when you turn in old Apple devices, from any era, and will recycle it in nearby recycling centers. The exact value appears to vary on the device, and such as whether the device works or not.

Stopping server overload, cleaning up the site front page, disabling comments, and general goodness

The last few days the server hosting this site was overloaded, and I finally took a look at the access log, saw a continuous stream of requests that shouldn't be occurring, and realized the "links" row of teasers on the front page needed to go away. The default links row includes one reading "Log in to post comments" but this blog doesn't allow anybody else to register for an account, and in any case comments are handled by Disqus rather than Drupal's commenting system. The link didn't need to be there at all, and the more I looked at the links row the more useless it looked.


Subscribe to Front page feed