»
S
I
D
E
B
A
R
«
Artisan System PHP5 Framework
October 30th, 2009 by wood

The Artisan System Framework is a new PHP5 (and soon to be 6) framework that allows you to build web software quickly and efficiently. It uses several Design Patterns.

Artisan System Installation Guide


Artisan System Installation Guide

Installing Artisan System is easy. It can be installed on any system that has PHP5.2 or greater.

There are two ways to install Artisan System: from Subversion and from zip/tarball.

Artisan System is generally easier to configure on Linux machine, however, it’s possible to install it on Windows/Macintosh machines as well.

Keep in mind, Artisan System is a general PHP Framework, it does not have to be used for web development only. However, it excels at speedy and robust web development.


Downloading


From Subversion

The current Subversion repository of Artisan System is located at:

svn://leftnode.dyndns.org/artisan_system/

The latest stable release is always located at:

svn://leftnode.dyndns.org/artisan_system/branches/release/

And older releases are tagged in:

svn://leftnode.dyndns.org/artisan_system/tags/vX

where X is the version, in the form x.x.

From Tarball

The latest version of Artisan System can also be downloaded from the front page of this site: Artisan System


LAMP Stack Installation

Installing Artisan System on a LAMP Stack is very easy. It is recommended that you install Artisan System as a central library so that way several websites on one server can use the same version.

Using this method, you will install Artisan System in /usr/share/artisan_system/ and allow all virtual hosts to load in the Artisan System files via an Apache configuration file.

To do this, perform these steps:

  1. Shell into your server as root or as a user with sudo permissions.
  2. Perform these actions:
    cd /usr/share/
    sudo mkdir artisan_system
    cd artisan_system
    
    sudo svn co svn://leftnode.dyndns.org/artisan_system/branches/release/ ./
    # Alternatively, you can use svn export to export the codebase without all of the .svn directories, however
    # you will not be able to do svn up to get the latest release.
    
    # You can optionally chown the directory artisan_system to the user and group that apache operates under.
  3. Next, you’ll need to configure Apache (this is assuming you’re on an Ubuntu 8.04 system, change the directories to be their appropriate locations.
    cd /etc/apache2/conf.d/
    sudo touch artisan_system.conf
    sudo vim artisan_system.conf
  4. Now that you have created the configuration file, you’ll have to add content:
    <Directory /var/www/vhosts/example.com/httpdocs/>
    	Options Indexes FollowSymLinks
    	DirectoryIndex index.php
    
    	<IfModule mod_php5.c>
    		AddType application/x-httpd-php .php
    
    		php_flag magic_quotes_gpc Off
    		php_flag track_vars On
    		php_flag register_globals Off
    		php_value include_path ".:/usr/share/artisan_system/"
    	</IfModule>
    </Directory>
    
  5. In the first directive, the <Directory> value is set to a specific value, this means that Artisan System can only be used under example.com. You can update <Directory> to be <Directory /var/www/vhosts/*> to allow any site to use it.
  6. Restart Apache.

You have successfully installed Artisan System on your system.

Note: In Step #2 above, you can replace the Subversion checkout with:

tar -xvzf artisan_system.latest.tar.gz

in order to untar the latest version.


To Test Your Installation

Testing your installation and making sure everything worked correctly is easy.

  1. Navigate to the directory set up earlier in the Apache <Directory> directive.
  2. Create a new file index.php:
    cd /var/www/vhosts/example.com/httpdocs/
    touch index.php
    vim index.php
  3. In vim (or your preferred editor), type the following code:
    <?php
     
    require_once 'Library.php';
     
    Artisan_Library::load('Config/Array');
    $CONFIG = new Artisan_Config_Array(array(
    
    	'server' => 'localhost',
    	'username' => 'example',
    	'password' => 'example_password',
    	'database' => 'example_db'
    
    	)
    );
    echo $CONFIG->server; // This will print the word localhost.
  4. Open up your browser and navigate to your virtual host.
  5. If everything worked properly, you will see the word “localhost” printed out on your screen.
  6. Success! Artisan System has been installed!

Official website


Leave a Reply

»  Substance: PHP Frameworks   »  SiteMap