Archive for October, 2007

XmlWriter Got You Down?

Wednesday, October 31st, 2007

You need to read this blog post.

It might make you angry if you are trying to get .NET to emit XML that is not encoded in UTF-16, but it will give you a solution.

Replacing a Dell EIDE/ATA Hard Drive?

Friday, October 12th, 2007

Ok, I modified this. I thought you needed an adapter, but you do not. Simply remove the adapter from your Dell drive and put it on your new drive. Thanks to the helpful guy at GeekSquad who helped my sister get her laptop running again!

Getting Smarty Templates Running on PHP 5 on Windows

Monday, October 1st, 2007

I was looking for a good, stable PHP template framework. The last time I was writing a lot of PHP, it was 2000 and we were using FastTemplates. It looks like the project is still being maintained by somebody, but it also seems many people are using Smarty, so I decided to try it.

It installed relatively smoothly, until I went to try and actually render a template. Then I got an error about Smarty.class.php:1258 not finding a file. Everything I could find was conflicting: it’s probably a permissions problem, but don’t worry about permissions on Windows. Hmmm.

Turns out, my Apache service is running as the local system user, which is what I expected. However, I didn’t see that user had any explicit rights in one of the folders where Smarty needs to write files (templates_c, I think that’s the compilation path).

So, I gave the system user full control permissions on that folder and, voila! Templates! Now to actually do something useful…

Now, I don’t know for sure if this is the most secure method. I was thinking that a better way to do this would be to create a lower privileged user and change the service to logon as that user, then give that user permission to write to the compiled templates directory. Here’s the official take on it.