Herself's Webtools

Scripts, HowTos, Templates, Plugins, Widgets, Tips

Archive for April, 2008

How to move Coppermine to a new server

with 2 comments

I’ve known for a few months I needed to move to another hosting company but I kept putting it off because the thought of redoing all the Coppermine stuff horrified me.

It turned out to be pretty easy. OK after 4 hours of going in circles I now know how to do it and it is easy now.

Backup old stuff:
Download your entire Coppermine directory from your old host to your home computer. This may take a while if you have lots of pictures.

Using whatever tools your webhost provides backup and download your Coppermine MySQL database. Most hosts use phpMyAdmin. If you have that available select your Coppermine database; Select Export; Select Save as file; Give it a file name ( template ) and download it with no compression.

Upload to new server:
Upload your entire Coppermine directory to your new webhost ( this may take a while )

Create a new database for Coppermine on your new host using what ever tools the host provides. Write down your user name, database name, and server if it gives you a server name. ( Most of the time it will be on the same server and you will just use localhost. )

Import the old database to the new database. If you are using phpMyAdmin, select the database; Select Import; chose the file and upload.

If you get permissions errors from MySQL while importing your data base try this: On your computer open your database backup you downloaded in a text editor. It is a plain text file you can easily work with it. ( Make a copy first of course! ) Remove every thing until the lines

– Table structure for table ‘cpg_albums’

Leave those lines and every thing after them in the file but remove the lines before that. The user name, database, CREATE DATABASE etc are all what is causing the permissions problem. Dump the lines below – yours will be slightly different.

– phpMyAdmin SQL Dump
– version 2.9.1.1
– http://www.phpmyadmin.net

– Host: 10.6.255.255
– Generation Time: Mar 11, 2008 at 02:06 PM
– Server version: 4.1.22
– PHP Version: 4.4.4

– Database: `her0731003345419`

CREATE DATABASE `her0731003345419` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `her0731003345419`;

– ——————————————————–


– Table structure for table `cpg_albums`

It took me several hours to find that information. It is not well documented anywhere. The rest of the move was painless.

The last thing you have to do now is to change your user name, host and database name in your config.inc.php file to use your new database. You’ll find this file in Coppermine/includes. Just edit the entries and remove your old user name, password and host and enter your new password, host and database name.

Written by Linda MacPhee-Cobb

April 14th, 2008 at 5:00 am

Ajax tutorial now available at Google Code

without comments

Google Code University has a new section on Ajax Programming

Ajax is Asynchronous JavaScript and XML and first got web developers attention when Google Maps was released. Google Maps being the first really cool application anyone had done with Ajax.

Ajax is nice in that much of the information exchange between the user and the webserver happens in the background and entire page refreshes are not needed to update information.

While Ajax claims to be cross-platform working the same on all platforms you’ll find in practice you’ll likely need to make various tweaks for different browsers.

W3 Schools also has an Ajax tutorial

Written by Linda MacPhee-Cobb

April 10th, 2008 at 5:00 am

Posted in ajax