Installation
1. Setup and configuration
Check our step by step tutorial if you are setting up a Linux or Unix environment (Mac can get some useful info).
For Win systems, let's get everything up and running...
Pre-Requisites :
Grab a glass, lemons, salt and well for the computer..
Get Tequila framework Download here
A running web server (IIS, Apache)
MySql server (For this tutorial)
PHP 5.x
PHPmyadmin or any other tool for editing your db
Tip: You can use a LAMP / WAMP package to simplify your life.
We will not get in details as there are so many good tutorials on this subjects for different platforms!
Let's get started!
Getting Tequila,
Unzip / Unrar the package in a directory inside your webserver, i.e. yourpath/tequila
You should see 2 folders now:
Project1: Our first application (You can duplicate this folder to keep a clean structure)
TequilaCore : The core files
Can I have everything together? Yes you can just merge the include folders and leave tequilapath empty in config file.
Create a DB in MySQL
Using phpmyadmin or your favorite mysql tool:
Let's create a DB for our example, let's call it: Tequila,
Run the script included in the source (In root folder: basic.sql) or get it from this page.
Notice: Tequila can also run without a DB, but most applications can make good use of one
Write permissions
For now give PHP user permission to write on your project directory.
After finishing using the generator you should change this permissions so PHP user can only write on /temp
Configure your application
Tequila framework use a configuration file located in yourpath/Project1/includes/config.php, we will:
Configure database
If you wish to change paths or the application name
Open the configuration file using notepad++, notepad or your favorite PHP tool:
Database info
Enter your MySql information, (lines 27-31) you will find the database configuration section, replace to match your install:
$dbhost= 'localhost';
$dbuname='root';
$dbpass = 'root';
$dbname='tequila';
$dbtype='mysql4';
You can now save and go for testing, or do some other changes..
Framework core files location (optional change)
If you didn't move the TequilaCore folder, you don't need to change this lines.
For the single Core, on line 52 modify to match the folder you just unzip + \\TequilaCore\\includes\\
$tequilapath = "../TequilaCore/includes/";
For the generator path you can select a path on line 57
$sunrise_path = "yourpath/filename";
*Don't forget in windows to escape '\' duplicate it \\ and finish with \
Let's give our application a name (optional change)
Change line 70 to any name you wish your application to have.
$appname = 'appname';
* This variable is used in security settings, don't worry about it now.
Finish, save this file and test!
2. Testing
Ok, that was long, let's test:
Open your web browser
Browse to the application
i.e.: localhost/tequila/project1/index.php
Got a login page in english? you are nearly done
Hey I get a lot of warnings!,
Check line 52, is the path correct?
Now let's start the tutorial!