Posts or Comments 11 May 2008

Plesk & Server Architecture & ColdFusion Matt | 19 Oct 2007

ColdFusion 8 and Plesk 8 on RedHat 5 via mod_jrun22

After installing Plesk 8 on a RedHat 4 box I’ve needed to install Plesk 8 on Redhat 5.  RedHat 5 uses mod_jrun22.  Well it’s Apache 2.2 that uses mod_jrun22, so any version of Linux running Apache 2.2 will use this connector.

Since Plesk doesn’t support CF8 yet, it still writes out its apache directives looking for mod_jrun20.  This needs to be modified to get per domain support for CF8 and Apache 2.2

Warning this will void your warranty!

I grepped the plesk install directory looking for mentions of jrun.  I found a binary file that matched: /usr/local/psa/admin/sbin/websrvmng

Looking at this file, on line 228 there’s a mention of mod_jrun20 in plain text.  This is the part of the websrvmng that writes out the http directives.  After making a backup of this file I took a chance at making an edit.  I simply changed mod_jrun20 to mod_jrun22 and saved the file.

Sure enough, plesk is happy.  Now when checking the ColdFusion box in a domain setup I see <IfModule mod_jrun22.c> in the httpd.include file for that domain rather than <IfModule mod_jrun20.c>.

Be careful here, I’m sure this change would not survive a plesk update to websrvmng.  After each plesk update double check this file to make sure it still points to mod_jrun22.

Plesk & Server Architecture Matt | 18 Oct 2007

Backup all mysql databases as seperate sql files

When backing up mysql databases via mysqldump you can either specify a database name to backup or use the –all-databases switch to dump all databases in one big file. I’d like to backup all my databases but I’d like them in separate files so they’re easier to manage and I can do a quick restore of a single db if needed.

I wrote the following bash script to help out.


#!/bin/sh
for customerdb in `mysql -uroot -pROOTUSERPASS -e "show databases" -B -N`
do
mysqldump -uroot -pROOTUSERPASS $customerdb > /home/matt/backup/$customerdb.sql
done

Or on my plesk server, I’ve got a table in plesk’s psa database that lists out all the databases created within plesk. A modification to this script reads the table names in the psa database table and makes backups of all those.


#!/bin/sh
for customerdb in `mysql -uadmin -pADMINUSERPASS -e "select name from data_bases" -B -N psa`
do
mysqldump -uadmin -pADMINUSERPASS $customerdb > /home/matt/backup/$customerdb.sql
done

OS X / Unix Matt | 18 Oct 2007

Leopard Time

Been under a rock this week? Just woke up from that month long coma? Don’t go back to sleep just yet, OS X Leopard arrives Oct. 26th.

Mac OS X v10.5 Leopard Family Pack $189 only! Order today for delivery on Oct. 26

Plesk & Server Architecture & ColdFusion & Misc Matt | 29 Aug 2007

ColdFusion 8 and Plesk 8 on Red Hat ES 4

By default the Plesk control panel does not work with ColdFusion 8 yet. It sounds like official support will be available in Q1 of ‘08. I couldn’t wait that long. I’ve been able to get Plesk 8 to work with ColdFusion 8 to a degree.

I assume you’re familiar with how to install both separately so I’ll just be going over how to get both to play together.

In my world the Plesk control panel is just used simply used so that staff in our small software company can manage websites and not need to use a shell. No one else even has access to Plesk. Because of this, separation and security are not primary concerns. Also, I have no need to let anyone or myself manage CF DSN’s from within Plesk, being able to do this in CF Admin is fine.

So what I’ve done is enable the ColdFusion checkbox used when setting up a website so that CF code can be used on a particular website. Any ColdFusion management capabilities of Plesk are not enabled.

[root@yadda]# /usr/local/psa/bin/cfsetting -s /opt/coldfusion8
I/O warning : failed to load external entity "/opt/coldfusion8/runtime/servers/default/SERVER-INF/jrun.xml"
Config not parsed successfully.

Running that cfsetting command with the -s switch and the cf root from the commandline showed me an error plesk was running into. I found jrun.xml in a different place.

/opt/coldfusion8/runtime/servers/coldfusion/SERVER-INF/jrun.xml

Since I think jrun.xml should be pretty much the same from CF7 to CF8, I’m going to just try pointing Plesk to the right place with a simlink.

cd /opt/coldfusion8/runtime/servers/ && ln -s coldfusion default

Now I run the cfsetting command again.

/usr/local/psa/bin/cfsetting -s /opt/coldfusion8

Now I notice when starting up Apache that it’s trying to startup mod_jrun twice. In my ColdFusion install I selected to build a mod_jrun connector to hook into Apache during the install. Turns out that this conflicts with Plesk. It’s a simple fix. Just fire up your httpd.conf file and look for all instances of cfm or jrun. You should see these entries toward the bottom of the file. Just comment out the whole block of stuff by putting a hash sign in from of the lines. Or you could always delete this stuff if you want.

For each website that you enable ColdFusion support for you should see this code in the httpd.include file for the site.

JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore /opt/coldfusion8/runtime/lib/wsconfig/psa/jrunserver.store
JRunConfig Bootstrap 127.0.0.1:51800
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc

If you need to do a little troubleshooting, just make sure that you don’t see code like this in any of the global config files for apache. As well make sure your jrunserver.store file exists. And make sure you’re loading the mod_jrun module somewhere. Plesk should drop this into zz010_psa_httpd.conf in the conf.d folder. Make sure that exists: LoadModule jrun_module /opt/coldfusion8/runtime/lib/wsconfig/psa/mod_jrun20.so. And lastly, double check your jrun.xml file you should see a mention of jrun broadcasting on port 51800 … you should see that in the jrun.servlet.jrpp.JRunProxyService block of the jrun.xml file. It’s possible that jrun is running on a different port, if that’s the case you’ll need to change it to 51800. Or somehow find out how to change the Plesk default.

If you have any troubles, post a comment here and I’ll see if I can help.

OS X / Unix Matt | 26 Jul 2007

Reindex message database for Mail.app

If you’ve got a huge mailbox in Apple’s Mail.app program, this line to be used in Terminal may help. It will rebuild the index used by the sqlite database used by the application. There is no need to run this less than every new hundred megs of mail or so … even that’s overkill. And if you don’t have at least 500 megs, I doubt you’d notice any difference. But if you’re one of those folks that Mail.app is just crawling for, this may be the answer:

sqlite3 ~/Library/Mail/Envelope\ Index vacuum;

Misc Matt | 26 Jul 2007

ColorfulTabs for Firefox

A recent episode of dl.tv pointed me to the ColorfulTabs firefox extension. This extension simply colors the background of each new tab you open in a different color. The color palate is chosen from pastels that allow the black title text in the tab to show up well. At first when I installed it yesterday part of me felt like it was a gimmick. After using this for the day, I really enjoy it. When I’ve got a couple dozen tabs open, I’m able to find an older one with an obfuscated title name much quicker. That extra mental association with the color of the tab helps.

Web Architecture Matt | 30 Jun 2007

Adobe Hosts iPhone Developer Camp - Flash or Adobe Air

Adobe Flash is not available on the iPhone yet they will be hosting the first iPhone developer conference of sorts called iPhoneDevCamp.  What does this mean?  There is an FAQ on the site with some corporate speak and this Q and A specifically about Flash:

Q: Does this mean that the iPhone supports Flash?

A: We suggest that folks speak to Apple directly about what technologies the iPhone will support and integrate. Our relationship with Apple continues to be strong. Naturally we believe that support for Flash is essential for any mobile device that wants to deliver a great experience for customers.

The answer about the iPhone supporting Flash, as of the 1.0 launch is no.  I do not have one but have it on good authority.  This FAQ says that Adobe is hosting the event because they believe that CS 3 is a great tool to develop web apps.  And yet they also say that Adobe reps will only be available as participants and will not be there in any official capacity.

It seems to me that Adobe has more plans to getting in good with the early adopters of developing iPhone apps than just schlepping more copies of CS 3.

The iPhone supporting Flash seems like the most obvious want for Adobe but the idea of Adobe Air being ported to the iPhone is really interesting.  At some point, development on the iPhone will need to be opened up a bit more than just allowing web pages if the success of the phone is to continue.  Adobe Air may just be the route.

Web Marketing & Web Architecture Matt | 25 Jun 2007

Auto Play Video with an Audio Track

It seems like there has been a resurgence in a video file with an audio track automatically starting when a website loads.  I see that there are two reasons for this, the first is new video ads, the second is that people think it’s cool.  This is really annoying.  I was checking on a page on the ColdFusion developers journal just to be blasted with some stupid video ad starting up.  I’m listening to a podcast right now!  Sometimes I’m listening to music.  Eitherway, it’s arrogant to think that someone coming to your site isn’t doing anything else but looking at your site.  There should only be one reason that a video file with an audio track or an audio file should start playing right away and that’s when links used to get to the page make it clear that sound is expected.  For adverts, this means NEVER!  Everyone should know by now that marketing on the internet is a conversation because more interesting stuff is just a click away.  When you start to talk at someone without them wanting to talk to you, the best you can hope for is just to be ignored.

OS X / Unix Matt | 13 Jun 2007

Camino 1.5 a fast Mac browser plus full form tabbing

The new version of Camino for OS X came out recently. I’ve been using it for a week and am impressed by the speed, thin RAM usage and relaibility. Plus I just noticed something I’ve sorely missed from Linux.

Linux or Windows users switching to OS X on a Mac will probably notice that when using a web from and the tab key to move from one field to the next, you can’t tab to drop down lists. This drove me nuts for the first few weeks I got serious about using a mac. I ended up just re-learning how I’d fill in forms and begrudgingly put up with the speed bump of having to go to the mouse when I got to a drop down.

Not anymore!

Camino has an option in the web features tab of preferences that allows for tab selection of form buttons, pop-up menus and lists. As well there’s a separate option to turn on selection of links and linked images. This small feature alone makes me switching to Camino full time a compelling choice.

The main drawback to Camino is the lack extensions available for Firefox. This is due to the user interface being written in OS X native Cocoa rather than Firefox’s XUL. The site PimpMyCamino has a few extensions and enhancements available including a link to Camino builds specific to Intel Core Duo and Intel Core2 Duo machines. These versions don’t contain the extra bloat of the code for the PowerPC chips of old.

Web Marketing Matt | 12 Jun 2007

Marketing Minute - Squidoo

Time to give away a secret. Squidoo. This site allows you to create a page on something you’re interested in (a lens). On this page you can include items for sale that you’d get a cut from, books from amazon, itunes tracks, etc. The cut you end up getting is pretty small though. The big benefit of Squidoo is the authority given to page in google results. Search for my daughters name, Georgia MacDougall (search) or how about Learning Adobe Flex (search). You should see my Squidoo Lenses as result #3 at the time of this writing.

I didn’t give any marketing related thought to either of these pages and still ranking is pretty solid.

Think about it a bit and put up something useful on Squidoo … you’ll end up becoming an authority on the subject pretty quickly.

« Previous PageNext Page »