Installing phpMyAdmin on Local Machine

Franz| February 15, 2009 8:43 pm

These are the steps I followed to install phpMyAdmin on my local machine, which is a MacBook Pro.  Substitute your own user name for “franz”.

  • Download the zip file from http://www.phpMyAdmin.net .  I downloaded version 2.11. Although there is a later version.
  • After Unzipping the file, I copied the folder to my Sites directory under /users/franz/sites
  • Using the finder, I navigated to those files, and created a folder called config in the phpMyAdmin folder.  I then set the write permission to read/write for that folder
  • I renamed the config.sample.inc.php by adding .bak, since I will be creating a new file with this name.
  • I started the configuration program by opening up a browser and entering:
http://localhost/~franz/phpMyAdmin/scripts/setup.php
  • I clicked under Servers the “Add” button
  • The only item I entered was the root password for the MySQL installation I had done
  • Click Add
  • On the next screen, make sure you click the “Save” under the Configuration section
  • This created a new file in the folder I created called “Config”.  I copied that file up to the parent directory and then deleted the Config folder.
  • I tried to start by entering the browser: http://localhost/~franz/phpmyadmin/
  • I had this error, which can happen on a Mac because it is looking for a file that has been moved to a new location.

phpmyadmin-error

  • To solve this, I openned up the terminal window and after loggin in entered the following commands:
sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
  • I was then able to run phpMyAdmin by entering this into the browser
http://localhost/~franz/phpMyAdmin/
  • I then downloaded version 3 of phpMyAdmin and found the setup is a bit different.  You still have to create the config folder and make it read/write.
  • To configure use this URL instead:
http://localhost/~franz/phpMyAdmin/setup
  • Create a new server as shown above and then be sure to save the configuration.

Mac OS X 10.5 Web Sharing - Forbidden Error

Franz| February 13, 2009 8:22 am

With Leopard, the System Preferences pane is different.  There is now just a single option for web sharing.  Open System Preferences, Sharing and enable Web Sharing.  Apache2 is installed as a default.  You should see your local website using this in the browser (using your own user short name in place of “shortname”.

localhost/~shortname

If you upgrade to Leopard from a previous version of OS X, then you may get a “Forbidden 403″ message” instead of seeing your web page.  To fix go to this solution on the Apple website.

http://support.apple.com/kb/TA25038?viewlocale=en_US

Your web pages are stored in the folder /user/shortname/sites.  A default html page is located there, which should now come up.

Using MySQL with Microsoft Access and Filemaker Pro

Franz| February 10, 2009 9:54 pm

MySQL is an open source database that is used by millions of people each year.  It is very robust and scalable.  But to access it usually requires some type of custom program or a MySQL front end.  There are other good database applications, such as Microsoft Access and FileMaker Pro.  These applications make it easy to design forms to add and edit the data, and to create custom reports such as mailing labels.  By using ODBC you are able to get many of the benefits of these local programs and the benefits of using a MySQL database.  This is how to get start.

OBDC Driver

First you need to install a ODBC driver if you don’t already have one.  A good source for a free driver is the MySQL website.  Look for the MySQL connector for the operating system you have. They have a version for Windows, Mac and Linux you can download for free.  Download one of the packaged drivers that include an installation program.

Setup The Connection

After you have the ODBC driver installed, you need to setup to use it to connect to your MySQL database. How you do that depends on your operating system.

Windows

Open the Control Panel, Administrative Tools, Data Sources (ODBC).  Click on the System DNS Tab and select to Add.  From the drop down select the ODBC driver you just installed.

odbc-connector-setup

Enter the information about your MySQL database, including the server and login information, then press Finish.

Mac

To setup for the Mac, it is similar.  In the Applications/Utilities folder you will find the “ODBC Aministrator” application.  Run that and select the System DNS tab, then click Add.  Select the driver you just added and then enter the login information for your MySQL database.  The form looks just the same as the figure above.

Connecting Microsoft Access to your MySQL database.

After starting Access, either open an existing database or start a new one.  Click on Tables and then click New.  Select the option for a Link Table.   For the File type, select ODBC databases.  Click on the Machine Data Source tab.  You should find the data source you setup in the step above, so select that, then select the table in the MySQL database you want to use.

If you have an existing Microsoft Application setup with a local database, if you export that data to a MySQL database using the same name, delete the table from the Access application, then add the MySQL table, it will use that table for the application in place of the local version you removed.  Your existing reports, queries and forms should work.

Connecting  File Maker Pro to your MySQL database.

Start File Maker Pro and either open an existing database or create a new local one.   Select File, Manage, External Data Sources.  Click on New and then select ODBC.  When you click the Specify button, you should be able to select the connector you setup already.

Conclusion

This tutorial is meant only to get you started  with installing an ODBC driver and making a connection to your MySQL database from either Microsoft Access or File Maker Pro.  Once you make that connection, you can then use the features in your database application with the MySQL table.  It should be noted that once you link the MySQL datbase to Access, it will be treated like a Access table and you would need to use Access SQL statements.  You will also find some limitations with this approach since some functions in Access will not work and some of the features of MySQL will not be available. But for many applications you will be able to work with Access as a front end to your MySQL database.

New Portable Drive

Franz| February 4, 2009 11:04 pm

Previously I did some tests on various internal and external drives.  I just received a brand new Western Digital Passsport Studio drive.  This 500 Gb, 2.5 in, portable drive has three interfaces so I felt it would be a great way to test a comparision between USB2, Firewire 400 and Firewire 800.  I used Drive Genius to do the benchmarking.  It tests four different parameters, but to keep it simple the following charts are only for Random Write.  The green bar is the tested drive and the blue is the standard for a MacBook Pro internal drive.

My tests confirm that the slowest is USB2, followed by Firewire 400.  The Firewire 800 drive was MUCH faster.  Look at the charts to get a feel of how big of a difference the interface makes.  I also include a chart from the prior log entry of the internal 7200 rpm drive.

USB2

USB2 Interface

USB2 Interface

Firewire 400

Firewire 400

Firewire 400

Firewire 800

Firewire 800

Firewire 800

Internal 7200 rpm drive

wd320-internal-randwom-write

Hard Drives Out the Ying Yang

Franz| January 3, 2009 7:49 am

I was lucky to get a new 500 Gb portable hard drive for Christmas.  It was one of the Western Digital Passport series, a very small USB drive.  I already had 4 of these, 2 with 160 Gb, 1 at 250 Gb and 1 at 320 Gb.  One might think it all adds up to a lot of giga-bytes, but with hard drives, the larger capacity are much more useful than multiple drives that add up to that capacity.

Also laying on my desk are 3 different 2.5 in bare drives that have been removed from various notebook computers, 1 at 160 Gb, and 2 at 100 Gb.  I have an external dock I can plug these into, but what do I use them for?  They are too small to hold an image of my current Mac Book Pro hard drive.  It becomes a bother to split backups over multiple drives.  So they just kind of sit there, like paper weights.

I also have a 3.5 in, 500 GB bare drive sitting next to them.  It failed awhile ago.  It is still under warranty so I need to send it back to Maxtor to get a replacement, but I have not got around to it.  I guess I just have drives coming out the Ying Yang.

My new minimum sizes:

2.5 in drive - 500 Gb
3.5 in drive - 1 Tb

External Hard Drive Performance

Franz| December 10, 2008 7:58 am
External Hard Drive Performance

In a prior blog entry I discussed swapping the internal drive on my MacBook Pro and how it’s performance improved.  I decided to run the same benchmark on several different external drives I have.  To keep the comparision simple, I will show graphs for only one parameter, random write.  I used Drive Genius 2 to do the benchmarking.

Internal Drive

First to repeat my internal drive performance.

Western Digital, 2.5 in, 7200 rpm, 16 mb cache, SATA II

Segate 500 Gb in my own FW 800 case

Segate 500 Gb in my own FW 800 case

This provides the overall best performance (green bars).  The blue bars are the stock Macbook Pro hard drive.

Now for the external hard drives, listed with the best performer first.

Firewire 800 Connection

SIIG External Firewire 800 case where I installed my own Segate, 500 Gb, PATA drive

Next is Maxtor One Touch III, 500 Gb, with a Firewire 800 interface.  Note that I have had issues using these drives on a Mac and ended up tearing apart a 750 Gb since the interface no longer worked.

The my latest purchase, a Western Digital Studio Editon, 1 Tb drive, with Firewire 800.

USB 2.0 Connection

Segate 750 Gb, SATA II, 7200 rpm drive inserted in a Thermalake USB 2.0 dock.

And finally a Western Digital, 250 Gb, Passport, 2.5 in. 5400 rpm drive.

When I get a eSATA card for my computer I can do some further testing.  Many of my drives also support Firewire 400 so I could test that, but this is enough for now.

My conclusion is that Firewire 800 is a very good interface for an external drive, much faster than USB 2.0.  The difference is far more significant than one would expect considering the theoretical difference in transfer rate is 800 vs. 480.  For 3.5 in drives on FW800, the random write was more like 4 times faster than when using USB, at least in the dock I have.

Moving my WordPress Blog

Franz| December 1, 2008 9:28 am

Moving Blog to Different Domain

A Wordpress blog is a combination of three parts:

  • Web Hosting Control Panel.  This is only an issue if you wish to use the control panel provided by your web hosting company to install and update your WordPress installation.
  • Files on the domain (Wordpress, configuration, plugins, templates, image uploads, etc.)
  • MySQL database with several tables.  Each starts with a $table_prefix variable (found in wp-config.php), with a default of “wp_”.

I have been keeping a blog dealing with photography. I initially put the blog under subdomain www.photo.franzkelsch.com. I decided to use get a new domain for my photography work and I wanted to move my blog to a subdomain there using www.blog.kelschphoto.com.

Since I was self-hosting using the WordPress blog publishing system on my own web hosting server with my own registered domain name moving the blog was not as simple as just exporting and reimporting the MySQL database. There are some steps that should be done to ensure the proper migration and no breaking links.  I also wanted to have my web hosting company install the new blog so I could upgrade it from their control panel.

Here are the steps I used to move my blog.

Backup Old Blog First

  • I made sure my old blog was running the latest Wordpress software
  • I used FTP to download download all files from my old blog
  • I used the admin panel in my old Wordpress blog to export the database.

Install New Blog

  • I first created a new WordPress blog in the subdomain using a brand new MySQL database table, including setting up user accounts.
  • From the FTP backup, I restored to the new location, the themes and plugins under “\ wp-content”  I has manually added to my old blog.
  • I activated the plugins and changed the theme to match.

Fixing the New Installation

  • Using the Wordpress admin panel in the new blog, I selected to import the Wordpress export from the old blog.  I checked the blog so it would find the uploads on the old blog and include them in the new blog.
  • To fix the links inside the blog I used phpMyAdmin on the newly imported database and issued these commands.

To update WordPress options with the new blog location:

These steps are not needed if you follow the new export/import functions show above
——————————————

UPDATE wp_table_prefix_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';

To fix URLs of the WordPress posts and pages:

UPDATE wp_table_prefix_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');

——————————————

To update any internally links within blog posts or pages with absolute URLs first find the table_prefix in the wp-config.php file so you know the name of you tables.  Then do this SQL querry update

UPDATE wp_table_prefix_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');

  • I then tested the new blog and when I determined all was working, I deleted the old blog.

Changing Database Name

I had started to accumulate so many blogs that the casual type names I had given to the databases got out of hand.  I decided to change the names of the database to be similar to the domain name where I was hosting the Wordpress blog.  So if the blog is at sports.franzkelsch.com I would want to use a database that shows the type of data it contains and the domain it is associated with such as wp_sports_franzkelsch .  That would be enough for me to quickly know it is a WordPress blog that is hosted at sports.franzkelsch.com.  I am currently hosting my sites at Dreamhost and I can not just rename the database since the blog is setup to use a particular database.

Matters are more complicated when I wanted to use the control panel on dreamhost.com (where I host my domains).  If it were not for this, I could simple create a new MySQL database and import to it the contents of the old database, then edit the wp-confg.php file to show the new database name.  But to keep the right settings in my Dreamhost control panel, so I could use it to update the Wordpress files in the future, I had to follow:

  • Backup the MySQL database (Use phpMyAdmin or some other program)
  • Backup all the files in the domain/folder
  • Use the control panel to remove the Wordpress installation.  You must do this before deleting the old MySQL database.
  • Either wait for the hosting company to delete the files or use FTP to delete them from the domain/folder
  • Create a new WordPress blog using the new MySQL database name
  • Manually delete the files that were added to the domain/folder by this installation.
  • Restore your MySQL backup to the new database
  • Edit the wp-config.php file to change the name of the data base in your backup files
  • Restore the files to the domain/folder
  • Check all is working
  • Delete the old MySQL database
  • Do a new WordPress install using your web hosting control panel.
  • Restore the files you backed up since the new install will be missing all your uploads.
  • Restore the MySQL database backup since the new install of WordPress will overwrite this
  • Go to the Site Admin, select Settings, then Permalinks.  Click Save to recreate the permalinks.
  • Remove the old MySQL database

That will get things synced in your webhosting control panel. Not sure it is worth all the effort, however.

Big and Faster Hard Drive for Mac Book Pro

Franz| November 27, 2008 6:55 am
Big and Faster Hard Drive for Mac Book Pro

I just finished replacing the hard drive in my Mac Book Pro.  Unlike most notebook computers, this was not an easy task.  I had to remove 25 screws, remove the keyboard and disconnect two ribbon cables from the mother board before I could remove the old hard drive.  Fortunately there are many good tutorials on the web to follow. I used a video tutorial at Other World Computing.

My model came two years ago with a 160 Gb drive.  It was just plain out of space, especially after taking all the photos in Europe recently.  Although I find the Mac must better in terms of applications using disk space, the documents, music and photos all add up.

I decided to go with a 7200 rpm drive, instead of the traditional 5400 rpm.  That meant I would only get a 320 Gb drive, instead of 500 Gb.  I bought the Western Digital drive online at newegg.com for $99, plus tax. Shipping was free.  I arrived late in the day.

I put the new drive in my external hard drive dock.  This is a cool device that holds either a 3.5 or 2.5 bare SATA hard drive.  I ran SuperDuper to clone the existing drive to the new drive so once installed it would boot right up.  Since this external doc is only USB 2, it took awhile, 5 hours in fact.  It was now 11 pm and I was wonder if I should start this project.  Of course I could not resist.

I put a piece of paper on the desk and wrote down where all the screws were coming from and place the screws there as I removed them.  When I finally was removing the keyboard, the ribbon cable came disconnected before I could look underneath to see where it was attached, which gave me a bit of a startle. But I finally figured it out.

After the old drive was removed and the new on installed, and all the screws put back, I turned the computer on.  It seemed to not start and I was now worried.  But I guess it was just trying to figure out what to boot from since it had a new hard drive and shortly it started up.

I am very happy with the performance.  It seems to be a much faster computing experience.  The increase in performace could be from the faster hear drive, the larger hard drive with high density or the fact that I have much more free disk space.  In any case I am glad I went with a faster hard drive.  Only by testing a 5400 rpm 500 Gb drive compared with what I installed would one really know the best solution.

I did some benchmarking of the new drive compared with the what the database for the MacBook Pro.  The graphs below show how the new drive (in green) compare with what the baseline was for a MacBook Pro.  I included graphs for both random read and random write.  It seems the 7200 rpm does make a significant difference.  Click the graphs to view enlarged.

Internal 320 Gb 7200 RPM - Random Read

Internal 320 Gb 7200 RPM - Random Write

Just looking at the specifications, my new internal 7200 rpm drive takes no more power, has any more vibration or a higher noise level, compared with the Western Digital 5200 rpm drive.

Hard Drive Comparision

Hard Drive
WD

Scorpio Black

WD

Scorpio Blue

WD

Scorpio Blue

Capacity
320 Gb
320 Gb
500 Gb
Rotational
7200 RPM
5400 RPM
5400 RPM
Cache
16 MB
8 MB
8 MB
Interface
SATA 3
SATA 3
SATA 3
Current Requirements (mA)
Read/Write
500
500
500
Idle
400
400
400
Standby
50
50
50
Sleep
30
20
20
Power Dissipation (watts)
Read/Write
2.5
2.50
2.50
Idle
0.85
0.85
0.85
Standby
0.25
0.25
0.25
Sleep
0.15
0.10
0.10
Vibration (g2/Hz)
Operating
0.00459
0.00459
0.00459
Non-Operating
0.05102
0.5102
0.05102
Accustics (dBA average)
Idle Mode
22
24
24
Seek Mode
25
26
26

Flash 10 Breaks WordPress File Upload

Franz| November 2, 2008 2:55 pm
Flash 10 Breaks WordPress File Upload

With the update of WordPress to version 2.6 you are allow you to switch from the flash uploader or Browser uploader (see the above image).  That was working just fine after upgrading WordPress.  At least it was until I came upon a website that said I did not have Adobe Flash installed in my browser.  I knew I had it installed but went ahead and did the update, which installed Flash 10.

That broke the WordPress Flash based file upload so each time I wanted to upload a file, I had to click the link for Browser based, select the file, then click Upload.  Lots of extra clicks.

Later when I was attempting to post a new Word Press blog entry and upload a file, the Choose File button did not work.

I was forced to select the use “Browser Upload” method instead.  That mean everytime I went to use upload a file I had to change the upload method. I found this anoying.  Research showed Flash 10 introduced a new security measure which prohibits the calling of the File Browse dialog from code. This means all flash based file uploader applications need to be radically changed in order to function with Flash 10. This change is affecting all flash based file uploaders across the web including Pixie, Flickr, Wordpress etc.

Okay, so I did not need this headache so I decided to go back to Flash 9.  That was not so simple.  I finally found Flash 9 on the Adobe website.  It was there for developers to use to test software, just assuming everyone would want to use Flash 10.  Then I had to figure out how to uninstall version 10.  If found an unistaller here: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14157 .

Intially the uninstaller stalled when it started to access my Time Machine external drive.  I had to a force quite, take that drive off line, and then start over.  Finally after getting Flash 10 uninstalled, I installed version 9.  Now I can still click to choose the file using the flash uploader, but when when I select a file, it does not seem to upload.  So more trouble shooting is needed.

So the real question, who needs Flash 10 when it crippled things? They should have given a warning before they install.

Personal Websites Make-over

Franz| 6:00 am
Personal Websites Make-over

Long before most people had up a personal website, I started a website at one of my domains, kelsch.com. The problem with websites is trying to keep them current and updated. Eventually the information there was so out of date that I gave up and changed kelsch.com to a family blog. Blogs, such as this one are much easier to keep up and post new information.  I have setup several blogs for different purposes, as have most all of my children.

I still have several websites I do maintain. I decided to do a make over on all of them using some of the techniques I have found including:

  • Flash based slide show that goes through about several images.
  • RSS feeds from the various blogs and photo galleries.
  • Contact form

So with these feeds the website keeps current without any need for me to do anything. I can change the images for the slide shows at any time by using Lightroom, selecting 30 images, and doing an export to the right folder, then FTPing them to the site. It only takes a minute.  I also setup a photo gallery on the website, which is accessed at http://www.kelsch.org/gallery .  This is a gallery created entirely within Lightroom send directly to the webserver.  I am still playing around with this feature.

See the screen shots below.  Click on any of them and visit that website.

Here is a screen shot of what Kelsch.ORG looks like now [Visit Site].

Here is a screen shot of what the FranzKelsch.com site looks like now [Visit Site].

Here is a screen shot of what KelschFamily.NET looks like now [Visit Site].

Here is a screen shot of what my Photography site looks like now [Visit Site].

Here is a screen shot of what my Tech site looks like now [Visit Site].

I did have one issue with the kelsch.org site that that showed up only on Windows based browsers. I am using a Spry hortizontal menu and when I would click on the menu item, the drop down portion of the menu would be hidden by the flash slide show below.  Doing some research, I solved this by adding this command to the flash slide show coding:

<param name="wmode" value="transparent" />

This makes the background transparent.  Inside Dreamweaver, select the Flash slide show and in the properties select Parameters.  Add “wmode” with a value of “transparent”.  Change the order so this is the first parameter in the list.  That solved the issue.  For more information refer to this item:

http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15523&sliceId=1

It might be good to list down now all the domains I have, along with the subdomains, and what they are currently being used for.

Franz Kelsch Hosted Domains

Domain
Subdomain
Now Hosting
kelsch.com
root
F&A Blog
franz.kelsch.com
Collection Blog
john.kelsch.com
J&ABlog
jeff.kelsch.com
Jeff Blog
photo.kelsch.com PhotoBlog - Favorite Images
franzkelsch.com
root
Franz Website
sports.franzkelsch.com
Sports Blog
photo.franzkelsch.com Photography Bog
tech.franzkelsch.com Technology Blog
kelschfamily.net root Family History Website
annekelsch.com root Anne Website
ultracycle.net root Ultra Cycling Website
blog.ultracycle.net Blog
johnkelsch.com John Owns - Not Being Use