04th Nov 2007

Adobe Dreamweaver CS3 Select Fix

So as everyone knows there was recently a time change going back down to “winter time” (bla) and as I was working with DW CS3 on a project it seemed to freeze and crash when I tried to edit a select box. I tried to restart and tried to edit it again…no such luck. So after some searching on the internet I found a solution for the time change.

Here is some of the error message:
Problem signature: 
Problem Event Name:  APPCRASH 
Application Name:    Dreamweaver.exe 
Application Version: 9.0.0.3481 
Application Timestamp:       4600622f 
Fault Module Name:   Dreamweaver.exe 
Fault Module Version:        9.0.0.3481 
Fault Module Timestamp:      4600622f 
Exception Code:      c0000005 
Exception Offset:    002dab57 
OS Version:  6.0.6000.2.0.0.256.1 
Locale ID:   2057 
Additional Information 1:    f150 
Additional Information 2:    112d33ddab86c076fa96123810cc4032 
Additional Information 3:    7287 
Additional Information 4:    6413fc23cc8b338dc85422963dbec2cd

1. Close Dreamweaver
2. Set your clock to the correct time if it isn’t already so
3. delete WinFileCache*.dat from C:\Documents and Settings\[Your username]\Application Data\Adobe\Dreamweaver 9\Configuration
4. Start Dreamweaver and use it as usually

BAM! then it works perfectly. I would have to assume that you would have to delete this file with every time change until Adobe puts out a fix for this. But I guess thats not so bad…

Hope that helped someone out.

Posted by Chris Gmyr under Technology | No Comments »

14th Oct 2007

New Drumset

Hey all,
A few months ago I walked into one of the local music stores and instantly fell in love…with a drumset!!! It was a brand new (slightly used…will explain shortly) 2007 Pearl Reference Series with special edition finish (Green Sparkle). This was only 1 of 40 made this year (2007). What makes it even more special is that a few months before Mike Mangini was in town for a clinic for this store. For the clinic he used this set which makes it slightly used :-). He also did a clinic down south somewhere on the same type of kit, so this kit that I was looking at was 1 of 2 in the world! Pretty cool huh?

So the owner of the store is talking to be about the kit and what it’s made out of, which is very interesting. You can get more information on the Reference series in Pearl’s website. So I pick up a couple small things that I needed and leave the store, saying that I would think about it and come back next week sometime. So the next week rolls around and I go in Monday afternoon when they open and decide to buy it with some more hardware. They gave me a killer deal on it, which was very cool of them.

I bring them home and set them up and they are the most amazing drums I’ve ever played!!! They make me want to sell my other drums that I have to buy another Reference kit. So I would recommend a Reference kit to anyone looking for a REALLY high end, great sounding kit.

Here are some pics:

Posted by Chris Gmyr under Music | No Comments »

04th Sep 2007

Delete files not in database

I made this script to delete any unneeded files from the server that weren’t being used by the database. Of course you can expand this a lot more, but I cut it down a little to put it up here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php 
 
/*
Just change $dir to whatever your directory is and change the SQL 
query to search for whatever file you need in the DB
*/
 
function deleteFiles(){
	$del_items = array();
	$files = array();
 
	$dir = '/user_images';
	$path = opendir($dir);
 
	while(false !== ($file = readdir($path))){
		if ($file != "." && $file != ".."){
			if(file_exists($dir.$file)) $files[] = $file;  
		}
	}   
	closedir($path);
 
	//Make DB connection here
 
	//see if files are in the DB or not
	foreach($files as $file){
		$sql = "SELECT userid FROM users WHERE main_image = \"$file\"";
		$result = mysql_query($sql);
		if(mysql_num_rows($result) == 0){
			$del_items[] = $file;
			unlink($dir.$file);
		}
	}
 
	//View the files you deleted
	echo "<pre>";
	print_r($del_items);
	echo "

“;
}

?>

Posted by Chris Gmyr under PHP | No Comments »

17th Aug 2007

MySQL Class

This is a class that I wrote and use for all of my web work. There are a lot of built in features that are useful to developers. I know that there could be a lot more options and even support for multiple database types, but I wanted to keep it as simple as possible.

Please refer to this file for the following samples: http://www.chrisgmyr.com/files/class.mysql.phps

First thing’s first. Let’s create a users table in a database and put some information in.

CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`email` varchar(96) NOT NULL default '',
`password` varchar(40) NOT NULL default '',
`active` enum('0','1') NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;

INSERT INTO `users` (`id`, `email`, `password`, `active`) VALUES (1, 'chris@chrisgmyr.com', 'password', '1'),
(2, 'user@chrisgmyr.com', 'password', '1');

Step 1 - Let’s initiate the class and connection to the database. If you don’t know what this stuff mean, you should look up OOP in PHP for some more information.

1
2
3
4
<?php 
require_once "class.mysql.php";
$db = new mysql(); 
?>

Now that we are all set and ready to rock and roll we can start using the functions.
Step 2 - Now we can make a simple database query

1
2
3
4
<?php 
$select = "SELECT * FROM users";
$result = $db->query($select);
?>

Step 3 - If there are records then loop through them

1
2
3
4
5
6
7
8
9
10
11
12
<?php 
if($db->numRows($result) > 0){
while($row = $db->fetch($result)){
$id = $row['id'];
$email = $row['email'];
$password = $row['password'];
echo "User {$id}: {$email} - {$password} <br />";
}
}else{
echo "Sorry...No Results";
}
?>

This should output:
User 1: chris@chrisgmyr.com - password
User 2: user@chrisgmyr.com - password

Simple enough right? I hope you liked this little tutorial…part 2 coming soon.

Posted by Chris Gmyr under PHP | No Comments »

17th Aug 2007

Syracuse Bands v3

Recently I put out the newest version of my SyracuseBands.NET site. Some features include a new calender, new user functions, enhanced javascript throughout the site, RSS feeds and a few other misc things. To check it out please visit: www.SyracuseBands.NET

Posted by Chris Gmyr under Music | No Comments »