Increase size of text:   A  A  A

Monday, March 23, 2009

Correctly redirecting secondary domains to a primary domain

Ok, so say you want everyone who goes to domain.com to be magically redirected (in a search engine-friendly manner) to www.domain.com. Lots of reasons you might want to do this, but most relate to analytics. Google has a handy guide just for you.

In short, though, you’re setting your web server to 301 (permanent redirect) all requests to certain domains over to the preferred domain. Doing it as the server level means you don’t have to do it at the script level (no PHP or ASP scripts doing redirects here). Check out the article for specifics.

posted by Brad Kelley at 2:37 pm  

Monday, March 23, 2009

Tracking Downloads in Google Analytics

The next time someone tells you that you can’t track downloads in Google Analytics (like links to PDFs, movies, or other assets that don’t reside on an actual page) tell them they’re full of crap. =) Provided you’re using the newer ga.js method you are golden. Check it out here.

The one gotcha is that the ga.js code can’t be at the bottom of the page, which is non-typical, and could increase page rendering times. The reason Google’s ga.js code goes at the very bottom is to prevent the latency of connecting to Google from adding to the page’s render time. Since the code is now at the top of the page, there’s no way to avoid the (admittedly only potential) latency problem.

But hey, you can track your document downloads! =)

Update: Also works for offsite links.

posted by Brad Kelley at 11:28 am  

Saturday, March 21, 2009

Upgrading memory on a Mac Mini G4

Well, the day finally came to upgrade the memory on my father-in-law’s Mac Mini. He was running with 512MB and it just wasn’t cutting it any longer, plus I wanted to upgrade him to Leopard so more memory seemed like a good idea. Getting the extra RAM was the easy (cheap!) part, but once confronted with the Mac Mini itself I couldn’t figure out a way to “crack” it open. Thankfully, I wasn’t the first person to run into this problem, and there are many how-to’s online. Two word: putty knife. =)

posted by Brad Kelley at 9:38 am  

Friday, March 20, 2009

Resolution for trouble installing FCK Editor for Joomla 1.5

After installing FCK Editor 2.639b for Joomla 1.5, I was getting this error when attempting to edit an article:

“[path]/plugins/editors/fckstyles_template.xml was not found on this server.”

Naturally, it was a permissions issue related to the hosting environment. Full description of the known issue is here:

http://www.joomlafckeditor.com/forum?func=view&id=1544&catid=8#1544
(registration required)

Crunchy bits follow…

Re:server didn’t send back a proper XML response?
Apache web servers configured to use PHP suEXEC or suPHP will deny the execute permission on all files and folders that are world writable – 0777 and 0666. Which means your PHP scripts won’t run for any user in which the files are Chmod to 0666 or 0777. That is why it is recommended to use the values, 755 and 0644 for folders and files respectively. In most cases this will work; as the user, Apache will be running under will be the owner of the files and folders for your Joomla installation.
If you are not using suPHP or neither running PHP as CGI then Apache will be running under the ‘Nobody’ account or some other equivalent. That means your files will have to be set to 0666(‘rw-rw- rw-‘), and in the case of using PHP to create new files in a directory, the folder will have to be set to 0777(‘rwxrwxrwx’).

I set the following directories to 777:

  • /plugins/editors
  • /plugins/editors/fckeditor

and the following files to 666:

  • /plugins/editors/fckeditor.class.php
  • /plugins/editors/fckeditor.legacy.php
  • /plugins/editors/fckeditor.php
  • /plugins/editors/fckeditor.xml

Voila! =)

posted by Brad Kelley at 2:09 pm  

Friday, March 13, 2009

Joomla Install Afterthoughts

After installing Joomla, remember to:

  1. Set the RSS feed cache directory (/cache) to writable (I used 777, not sure if that’s required, but 666/664 didn’t seem to work), or the RSS feed module will throw up an error in its output.
  2. If adjusting template configuration, make sure and make the template’s params.ini file to writable (666 worked).
posted by Brad Kelley at 5:40 pm  

Thursday, March 12, 2009

Installation of DOCman AutoThumb

Another DOCman issue, this time with a plugin I hadn’t tried before called AutoThumb 1.41. Installing through the normal ZIP upload method returned the following error:

JFTP::mkdir: Bad response
JFTP::chmod: Bad response
JInstaller::install: Failed to create directory. “/[path]/plugins/docman/autothumb/libraries/phpthumb/cache/source”
Install mambot Error

Looks like a permissions issue, and it is. It turns out that initially installing DOCman creates a docman directory in the /plugins folder and then puts a couple of files there. Bu there are a couple of problems:
  1. /plugins/docman is owned by noone/noone (at least on my install) instead of the FTP user
  2. the items installed inside /plugins/docman needed write permissions

So, the solution was to change the ownership of the /plugins/docman directory, and then give 666 permissions to the files inside it. Once this was done, the normal install process worked fine. =)

posted by Brad Kelley at 6:35 pm  

Powered by WordPress