Installation


PHPTAL is released as a PEAR package (see http://pear.php.net). You can download the PHPTAL library on the PHPTAL website (http://phptal.motion-twin.com).

You can install it using the pear utility:

pear install http://phptal.motion-twin.com/latest.tar.gz

Once installed, you can upgrade PHPTAL easily on each PHPTAL update using PEAR:

pear upgrade http://phptal.motion-twin.com/latest.tar.gz

If you do not use PEAR or do not have it installed on your system, you can still install PHPTAL by unzipping the downloaded archive.

tar zxvf PHPTAL-X.X.X.tar.gz
cp -r PHPTAL-X.X.X/PHPTAL* /path/to/your/lib/folder

This will install the PHPTAL.php file and the associated PHPTAL folder in /path/to/your/lib/folder.

Don't forget to modify your php include path in your scripts so that PHP will be able to locate library files automatically:

<?php

set_include_path(get_include_path() . PATH_SEPARATOR . '/path/to/your/lib/folder');

// will work like a charm
require_once 'PHPTAL.php'; 
?>

If you work with apache, you may also be able to modify the php include_path in a .htaccess file:

# some .htaccess file

# linux users may use something as follow
php_value include_path /usr/lib/php:/usr/local/lib/php:/path/to/your/lib/folder:.

You may also modify the include_path variable in you php.ini file.