Smutty

MVC Framework

SmuttyInstall

This page aims to tell you quickly and simply how to install Smutty and get it up and running as fast as possible, so that you can get on with more important things like writing your application.

Requirements

Smutty aims to be as requirement light as possible, including all the libraries it uses in it's source package, already configured. Things you will need are PHP 5 (sorry but too many WON'T FIX bugs and limitations in PHP 4 forced it), and something like Apache with mod_rewrite. (I haven't tried it but maybe other things will work like lighttpd or even IIS *gulp*)

Your distribution should already have packages for all of this as they're very popular, but if not you can go and get them from the following websites.

Apache - http://httpd.apache.org
PHP - http://www.php.net

Getting Smutty

There are a few ways to obtain a copy of Smutty, downloading the latest release is the easiest, and definately reccomended unless you have special reason for using another method.

Downloading

The easiest way to get Smutty is to simply go to downloads page and get the latest release as a tarball. Peasy! You can then unpack it with the following command.

tar -zxf smutty-version.tar.gz .

SVN

If you want you can also export a copy from the Subversion repository with the following command.

svn checkout http://smutty.googlecode.com/svn/trunk/release smutty

Setting It Up

When you have Smutty unpacked, the next step is to symlink to the htdocs directory, this is safer than putting the whole application in a web visible folder. Then read one of the two sections below...

The easy way...

Smutty's smut utility comes with a handy setup function that in most cases will configure Smutty ready for use. To invoke it just run the following command.

./smut setup

This will then check through your install and make sure everything is fine and dandy. If things don't work then you'll probably need to read the 'Slighty less easy way' information below.

The slightly less easy way...

Next you'll need to create the .htaccess so that all requests are passed along for Smutty to handle.

There is a sample file called htaccess in the htdocs folder which you can rename. The only reason you'll need to change this file is if your Smutty application does not live at the web root (mydomain.com/). If this is the case then uncomment the RewriteBase line and edit the url to suit your setup.

Example

RewriteEngine on
RewriteBase /~user/smutty/
RewriteRule .* index.php

php_flag magic_quotes_gpc off
php_flag register_globals off

You'll then need to make the cache directory writable by the webserver. This directory is located at library/smarty/cache. The following command will do this for you.

chmod -R 777 library/smarty/cache

Finally you'll need to make sure your app.cfg file exists. There is a sample file you can copy in the application directory.

cp application/app.cfg-sample application/app.cfg

No Symlinks

It is also possible to set up Smutty without symlinking to it (as this may not be an option for you with some web hosting). To do this just unpack it in the directory you want to run it from, then move the index.php and .htaccess files from the htdocs directory up one level to the root directory. Easy!

Good to go!

Now if you go and point your browser at the URL you've set Smutty up at you should find it working!

NOTE: "working" at the moment means that you'll probably see an error message saying IndexController doesn't exist, but that's fine cause you won't have created it yet.

You're now ready to configure Smutty and write your first Smutty application!

Links: Post a comment

Useful Pages

Links