Tuesday, 21 July 2009

How To Install Smarty On WAMP

Source: http://news.php.net/php.smarty.dev/2703

Assuptions:

  • WAMP install directory is 'd:\wamp'.
  • PHP install directory is 'd:\wamp\bin\php\php.x.x.x'
Instructions:

  1. Download Smarty - http://www.smarty.net/
  2. Extract files, rename Smarty.x.x.x to smarty (suggest OUTSIDE of your www root!) Example: d:\wamp\bin\php\php.x.x.x\smarty
  3. Edit php.ini's include_path and add the location of the libs folder.
  4. example: include_path = ".;d:\wamp\bin\php\php.x.x.x\smarty\libs"
  5. Restart Apache Service
  6. Setup these two folders INSIDE your (www), 'd:\wamp\www\smarty\templates' (this is where your templates will go), 'd:\wamp\www\smarty\configs'.
  7. Setup these two folders OUTSIDE of your webroot: 'd:\wamp\bin\php\php.x.x.x\smarty\templates_c', 'd:\wamp\bin\php\php.x.x.x\smarty\cache'.
  8. Setup security settings for the web server to write to these four folders.

Note: Thanks to John Martinez for the tutorial.

No comments: