Featured image of post Installation for Smarty PHP on WAMP

Installation for Smarty PHP on WAMP

Note: This post was created awhile back on another platform and I migrated to my current one.

Smarty Logo

I got this from here: http://news.php.net/php.smarty.dev/2703

Steps to Install Smarty:

1. Download Smarty

2. Extract Smarty

Extract it outside of the www folder (e.g., C:\wamp).
Rename the Smarty.x.x.x folder to smarty.

3. Edit php.ini

To do this, left-click on the WAMP icon in the system tray, under the PHP menu, there should be a php.ini option.

Example configuration:

1
include_path = ".;C:\wamp\smarty\libs"

WARNING: Copy-pasting might create errors with single and double quotes. Make sure to type them manually.

4. Restart All Services

Click on the WAMP icon in the system tray and select Restart All Services.

5. Create Required Folders

In your root www folder, create a directory named smarty, and within that folder, create:

  • templates
  • configs

Outside of www, within C:/wamp/smarty, create:

  • templates_c
  • cache

Note: There are security concerns for live setups, but for localhost, this is fine. Always use Linux for live testing.

6. Create an HTML File

Inside www or any subfolder within www, create a file (e.g., index.html).

7. Create the Template File

Create index.tpl and place it inside www/smarty/templates.

For more details, refer to:
http://news.php.net/php.smarty.dev/2703

Note: Blogspot may parse out HTML tags, so some code might not be displayed correctly.

Desiderata by Max Ehrmann

Go placidly amid the noise and the haste, and remember what peace there may be in silence. As far as possible without surrender be on good terms with all persons. Speak your truth quietly and clearly; and listen to others, even to the dull and the ignorant, they too have their story. Avoid loud and aggressive persons, they are vexations to the spirit.

If you compare yourself with others, you may become vain or bitter; for always there will be greater and lesser persons than yourself. Enjoy your achievements as well as your plans. Keep interested in your own career, however humble; it is a real possession in the changing fortunes of time.

Exercise caution in your business affairs, for the world is full of trickery. But let not this blind you to what virtue there is; many persons strive for high ideals, and everywhere life is full of heroism. Be yourself. Especially do not feign affection. Neither be cynical about love; for in the face of all aridity and disenchantment it is as perennial as the grass. Take kindly the counsel of the years, gracefully surrendering the things of youth.

Nurture strength of spirit to shield you in sudden misfortune. But do not distress yourself with dark imaginings. Many fears are born of fatigue and loneliness. Beyond a wholesome discipline, be gentle with yourself. You are a child of the universe, no less than the trees and the stars; you have a right to be here. And whether or not it is clear to you, no doubt the universe is unfolding as it should.

Therefore, be at peace with God, whatever you conceive Him to be. And whatever your labors and aspirations in the noisy confusion of life, keep peace in your soul. With all its sham, drudgery and broken dreams; it is still a beautiful world. Be cheerful.

Strive to be happy.

Built with Hugo
Theme Stack designed by Jimmy