Open-Source PHP Framework - Designed for rapid development of performance-oriented scalable applications

Vork Installation

API >> install

Installing Vork

Step 1. Download and unzip Vork into a directory on your web server

Step 2. Configure Vork. Open the .config file (in the root of Vork) in a text-editor (Eg. Notepad).

  • Enter the name of your web site in the SITE_NAME constant.
  • If you will be using a database then enter your database credentials in the DB_NAME constant and dbConnect() method; if you will not be using a database then you need to comment out the entire dbConnect() method.
  • If you will be using Memcache to cache Vork output/data then uncomment the Memcache connection within the cache() method.

For MySQL and Amazon RDS users Vork is now set up, other databases need to follow the instructions for "Other Databases" lower on this page.

Step 3. Configure your web server. Point the Document-Root of your web server to the "webroot" directory of Vork and enable mod_rewrite (detailed instructions for Apache users is below). If you are using a web server that does not support .htaccess files or mod_rewrite (web servers not based on Apache) then follow the configuration instructions lower on this page. Restart your web server for the changes to take effect.

That's it! Vork is installed and ready for you to build your website/web-application with it.

Installing the TinyMCE package (only required if you wish to utilize WYSIWYG textarea functionality)

  1. All Vork-powered web sites (using version 2.0+) have an automatic application-installer that is accessible from within a browser by navigating to the /vork page on your own web site (eg. In order to see the installer you must be accesing your site as a "superuser"; what constitutes a superuser is determined in your .config file within the isSuperuser() method. If you are not sure what that is, then just make sure you are acceessing your web site from the local machine ( or http://localhost) and not remotely via your domain name If you go to the /vork page while accessing your site as a superuser you will see the installer, otherwise you will see the normal front page of your web site.
  2. Download the TinyMCE package
  3. Upload it through the 1-step installer and it will be immediately ready to use.


  • PHP - any version between 5.0.2 and 5.4.x
  • A database is optional and any database that is supported by PHP will work with Vork
  • Works on any web server (Apache, Microsoft IIS, etc.)
  • Works with any operating system (Linux, Windows, Mac OS X, FreeBSD, etc.)

Other Databases

Using a relational-database other than MySQL and Amazon RDS

(note: NoSQL databases like MongoDB, Couchbase and Amazon DynamoDB are NOT relational)

Search the .config-rdbms file for "mysqlabstract" and change BOTH TWO occurrences of mysqlabstract to the identifier for your database (must be in all-lowercase letters.) Database identifiers are:
  • db2
  • mssql
  • oracle
  • postgresql
  • sqlite3abstract
  • sybase
  • mysqlabstract (the default, used for MySQL and Amazon RDS)
Most databases accept the basic connection arguments in the same order- hostname, username, password, databasename

If this is not working in your database or you need to use additional connection parameters such as port or persistancy you will need to refer to the API for the connection signature of your database.

Using Amazon Relational Database Service (Amazon RDS)

Simply change HOSTNAME in the dbConnect() method within the .config file to the hostname supplied to you by Amazon RDS, eg.:
self::$db = new $db('''scott''PantheraTigris'self::DB_NAME);

Using MongoDB

MongoDB can be used as the sole database or in conjunction with an RDBMS (relational database like MySQL or Amazon RDS). To enable MongoDB open the .config file and in the dbConnect() method uncomment the MongoDB section (begins with $m = new Mongo(); ) and just after the dbConnect() method uncomment the property public static $mongo;

The MongoDB database object will now be available from within any model via $this->mongo , eg.:
$collection $this->mongo->selectCollection('someCollection');

If you are exclusively using MongoDB as your database (and not using an RDBMS in conjunction) then
uncomment the last line in the dbConnect() method
self::$modelObjects = array('mongo');
comment out lines
::$db = new $db(...)

self::$modelObjects[] = 'mongo';
as well as the last line in the .config file:
require '.config-rdbms';

Please note that, like any database, you do need to have installed both the Mongo database and the MongoDB PHP extension for MongoDB to work.

Web Server Setup

Using a web server that does not support .htaccess

Step A. Set your web server to use vork as the default file in a directory

Step B. Set the 404 error document to point to /vork/error/notFound

Step C. Set /webroot/vork (the vork file in the webroot folder) to be parsed as PHP

Step D. Have your web server point all requests to the vork file except for requests that match the actual filenames of files within the webroot folder or within subdirectories of webroot. Be sure that the server is only pointing the request, not actually redirecting the browser (the URL in the browser should not appear to change.) Microsoft IIS users can do this via ISAPI_Rewrite, IIS Mod-Rewrite or a similar IIS ISAPI version of Apache mod_rewrite.

Setting up an Apache web server

For web servers dedicated to this one web site

Step A. Open the httpd.conf file in the Apache conf directory. Search the httpd.conf file for "mod_rewrite" and make sure the line it is on is not commented out (does not have a pound-sign at the beginning, if it has one then remove it.) Linux users may need to recompile Apache if mod_rewrite was not included with the package.

Step B. Change the DocumentRoot to point to the /webroot directory of Vork.

Step C. Scroll a little farther down in the file and look for the comment stating "This should be changed to whatever you set DocumentRoot to" and change <Directory "C:PATH_TO_APACHEhtdocs"> to the same URL (the Vork webroot). Save and restart your web server for the changes to take effect.

For web servers running multiple web sites

Step A. Open the httpd.conf file in the Apache conf directory. Search the httpd.conf file for "mod_rewrite" and make sure the line it is on is not commented out (does not have a pound-sign at the beginning, if it has one then remove it.) Linux users may need to recompile Apache if mod_rewrite was not included with the package.

Step B. Search the file for "NameVirtualHost" if this is not found then add to a new line at the end of the file: NameVirtualHost *:80

Step C. Add on a new line afterwards:
<VirtualHost *:80>
DocumentRoot "C:PATH_TO_VORKwebroot"

Restart your web server for the change to take effect.

If you do not have a domain name (or it points to a different server) then just make up any name or keyword to use in place of YOUR_DOMAIN_NAME.COM and then open your hosts file in a text-editor (on Windows it is at C:WINDOWSsystem32driversetchosts) and add a new line containing: YOUR_MADE_UP_DOMAIN_NAME.COM

Close any open browser windows for the change to take effect. You can now use YOUR_MADE_UP_DOMAIN_NAME.COM exactly as if it were your real domain name.

Step D. Open a new browser window and go to YOUR_DOMAIN_NAME.COM, you should see the Vork default page.


If your browser either says "Forbidden" or displays a list of files then you need to add this to httpd.conf:
<Directory "C:PATH_TO_VORK">
Options FollowSymLinks
Allow from all
AllowOverride all

Installing Vork in legacy environments

Using MySQL with the older, deprecated PHP extension for MySQL

By default Vork uses the newer mysqli extension for PHP, to use mysql (note there is no i at the end of mysql) open /sql/mysqlabstract and change the first line from mysqli to mysql

Installation to PHP versions prior to 5.2.3

Vork works on any version of PHP from 5.0.2 until current; versions 5.2.3 and later work out-of-the-box, older versions need one slight modification:
Open /webroot/vork and find the htmlentities() method and comment out (or remove) the last $doubleEncode argument including preceding comma (,) - change:
...(!is_null($charset) ? $charset 'UTF-8'), $doubleEncode);
...(!is_null($charset) ? $charset 'UTF-8'));

Eric DavidLast modified by Eric David