Monday, October 25, 2010

Railo 3.1 Installation on IIS 6

I've come upon the need for a fast, open-source cfml processor for one of my clients projects.. and it turns out, Railo is fast... very fast, and has a relatively small footprint of ~250Mb of ram when running.

Well, this has been quite the adventure (I prefer my webservers to be already running.. so I can focus on Development) , but it turns out the guide on was mostly correct, but required a slight alteration of the railo/conf file.

For clarity: These notes are for Resin 3.1 and Railo rc to be used with IIS 6.0 as the primary webserver.

1) In the example, resin.conf has an entry added for in which the root-directory attribute is set to "", when it should be set to simply "." in the case of Railo 3.x

2) Also, during my multiple attempts at the installation process, I came across other documents saying that an ISAPI filter was required on the "Web Sites" node of IIS... in my case.. it only worked without doing adding an ISAPI filter.

3) adding a /scripts directory? I added a scripts directory, with a copy of isapi_srun.dll into /InetPub/vhosts/

4) The default cflocation in index.cfm to the railo-context admin was driving me crazy... I had no idea where I actually was~!! Without adding an entry to resin.conf, my site was root-pointing to C:\railo\webapps\ROOT and launching index.cfm ... which I discovered later was redirecting via cflocation to the railo-context admin... so it was working... but I didn't know it! So, to save my sanity until I got everything going, I temporarily edited C:\railo\webapps\ROOT\index.cfm to require a manual click (a href=) instead of cflocation to show me where I was, and where I was going.

5) I also now have a new services entry called "Railo 3.1 Server" set as Automatic, which launches:

"C:\railo\httpd.exe" -service -Xms256M -Xmx512M -conf conf/resin.conf -java_home jre/ -java_exe jre/bin/java

Guide for adding Caucho Resin as a windows service if you don't have it already configured for you:

Tuesday, June 22, 2010

GoDaddy Automated SQL Backups on Shared Hosting

I've been looking for a while to find out how to do automated backups with Go-Daddy's shared hosting, which, as advertised, does not allow automated backups, and Go-Daddy does not provide the service.

To compound the issue, microsoft no longer ships their import/export suite of tools for free, and as a matter of fact, they're not available at all... unless you buy a regular SQL-Server license (or forfeit your left leg)

Introducing Microsoft's "Database Publishing Wizard"

The Database Publishing Wizard is a neat FREE little tool, with both graphical, and command-line interfaces. It uses the power of sql-transact to read your go-daddy (or any SQL datasource) and save it into an sql-transact file which you can use re-create your entire database, simply by executing it as a query.

Which is great... unless you want to automate the process, in which case a GUI is pretty useless.

Introducing the command-line feature of the application:

The following command uses an SQL connect string, to access your database, and dump its entire schema, and database table contents into a giant series of queries in a .sql text file. In this case, I've tacked the additional command:

"> C:\backupJob.log"

To the end of my command, which saves the output of the process to a text file. Very useful if you plan on running this at 3 in the morning, but still need to verify that the job actually occurred.

SqlPubWiz.exe script -C "Data Source=MyGodaddySQLDataSourceURI;Initial Catalog=MyDatabaseName;User Id=MyDSNUserId;Password=MyDSNPass;" C:\backup.sql > C:\backupJob.log