Scala, Java, Unix, MacOS tutorials (page 343)

While installing the PHP APC opcode cache, I just ran into the following error:

PHP Warning:  PHP Startup: Unable to load dynamic library './apc.so' - ./apc.so: 
cannot open shared object file: No such file or directory in Unknown on line 0

I found this error message in my PHP error log, but depending on your configuration I think it may also be in your Apache error log file.

Summary: A CentOS Linux yum command cheat sheet (reference page).

I've been working with the CentOS Linux yum command a lot lately, so I thought I'd create a yum reference page with a lot of examples while it's still fresh in my mind. I've organized the yum commands below by task (i.e., list, install, update, information, remove).

Tired of seeing "junk" in the Google search engine results pages? This week I'm launching a new website named Report Search Spam (ReportSearchSpam.com), where regular, everyday users will be able to report the search engine spam they see.

You know search engine spam when you see it:

After just creating another Drupal 6 website that uses ImageCache, ImageAPI, ImageToolkit, CCK, and ImageField, I thought I'd make some notes here about the problems I ran into when trying to use ImageField with CCK to let users upload images to my website. I encountered several very frustrating errors along the way, and here are my notes related to those errors.

Note: This blog post is about Drupal 6. Things have changed quite a bit in Drupal 7, and these tips are not likely to be helpful there.

Drupal 6 FAQ: How can I change the password of a Drupal user in the database without using the Drupal UI? That is, how can I change a user's password using a database query (such as the need to change the Drupal User 1 password)?

If you ever want/need to change a Drupal 6 user password in your database using the MySQL command line or a tool like PhpMyAdmin, a SQL query like this will do the trick:

As a quick note, I just posted two new videos on YouTube about how to draw circles in Gimp:

These videos are essentially a companion to my How to draw circles in Gimp tutorial here on the devdaily website.

 

It looks like the Mac launchd launchctl StartInterval is broken in Mac OS X 10.6.x, at least the current version (10.6.7). When I run a Mac launchctl script like this, which used to work just fine:

I've been having some problems with a GoDaddy website lately (see my GoDaddy 4GH performance problems page, and in an effort to see if the errors were related to a MySQL database problem, I created the Drupal/PHP script shown below.

I've been having a problem with a GoDaddy website lately (see my GoDaddy 4GH performance problems page, and in an effort to get a better handle on both (a) GoDaddy website downtime and (b) GoDaddy 4GH performance, I wrote a Unix shell script to download a sample web page from my website.

To that end, I created the following shell script, and then ran it from my Mac every two minutes:

As a quick note here today, I just switched some of my domains to fall under a GoDaddy "ultimate hosting" plan, where you pay for one shared server, and then you can put all your domains under that one shared server account. (At this point I can say that this saves money, but the GoDaddy 4GH performance is horrible.)

Last night I spent some time going through my Google Webmaster's account, and found a listing of a large number of links I had broken on this website, largely because I removed the old, stale "directory" I had on this site. That was a Yahoo-style phonebook directory that made sense in 1999, but doesn't make much sense in 2011.

jQuery FAQ: How do you create a textarea using jQuery? Also, how do I insert content (text or HTML) into a textarea with jQuery?

I don't know if this will make any sense without showing my HTML, but I just used the following jQuery code to (a) get contents from a specific div tag, (b) add a textarea just before that div, (c) put the HTML contents into the new textarea, then (d) remove the original div. So, in essence, I created a new textarea with jQuery and inserted HTML into that textarea, but I got the HTML from my original div.

Drupal FAQ: How do I log Drupal errors (error messages)?

The standard way to log Drupal error messages is with the watchdog function. The watchdog function logs your messages to your database, where you can then view them from your Drupal Reports URL.

In Drupal 6 and Drupal 7 the watchdog function has this signature:

Some times you just have to laugh at yourself ... I was just struggling to figure out how to hide the Body field on a new CCK form, and just as I was thinking I might have to resort to some jQuery magic, I finally read the help text under the Body field on the CCK "Submission Form Settings":

To omit the body field for this content type, remove any text and leave this field blank.

As a quick note, I was just about to write a Drupal 6 module to add "rel=canonical" meta tags to Drupal pager pages (pager URLs), so URLs that look like this:

http://www.devdaily.com/blog?page=47

or this:

This is a tutorial on how to create a view using the Drupal Views module. In this example I'll be creating a simple view of the Drupal 'comments' database table. I'll demonstrate how to create this viewas a Drupal node with an associated URL and menu item, so when you're done you'll be able to access it at a URL like:

Mac Java WebStart FAQ: Where are Java WebStart files (Jar files) kept on Mac OS X systems? And how can I delete WebStart apps on a Mac?

Java WebStart Jar files are kept below this directory on Mac OS X 10.6:

/Users/al/Library/Caches/Java/cache

More than likely you're asking because you want to delete these Java WebStart files on your Mac. The easiest way to delete them is:

I recently reorganized the devdaily.com website, and as part of that, I deleted an entire directory at the root level that was named "/Dir". This was the "directory", where I had a Yahoo-like directory of links to applets, tutorials, CGI scripts, and so on, so I had thousands of web pages with URLs like these:

Just a quick note today that if you're interested in a source for over 30,000 free eBooks, there's a website named Project Gutenberg that specializes in making "free ebooks to read on your PC, iPhone, Kindle, Sony Reader or other portable device". I keep forgetting about them, and was reminded of them this morning, so I thought I'd share this link here today.

Here's my GoDaddy 4GH hosting review: It sucks. A friend on Twitter warned me about it, but sadly, I didn't listen.

As a backup to that "review", here's the downtime on just one of my websites for the last several days: