Smarty

     

    NOTE: This guide uses /opt/bitnami to refer to the installation directory for the Bitnami Stack. This is the default installation directory for Bitnami Cloud Hosting, Google Cloud Platform and Microsoft Azure servers and for virtual servers. If you're using a native installer and have installed the Bitnami Stack to a different folder, replace /opt/bitnami in the examples below with your actual installation directory.

    Overview

    The Smarty framework is installed in the frameworks/smarty directory of the installation directory. This folder includes two example applications, located in the sample/ and demo/ directories respectively.

    Activation and Testing

    To enable the example application, edit the Apache configuration file at  /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf and uncomment the following line

    Include "/opt/bitnami/frameworks/smarty/conf/httpd-prefix.conf"

    Then, restart the Apache server.

    $ sudo /opt/bitnami/ctlscript.sh restart apache
    

    You can now verify that the example application is working by visiting its URL using your browser. Select your platform below.

    Bitnami Cloud Hosting

    Access the example application via your browser at http://[server-IP-address]/smarty

    Microsoft Azure / Google Cloud Platform

    Access the example application via your browser at http://[server-IP-address]/smarty

    Virtual Machine

    Access the example application via your browser at http://[virtual-server-IP-address]/smarty

    Native Installer

    Access the example application via your browser at http://localhost/smarty (Windows) or http://localhost:8080/smarty (Mac OS X and Linux).

    Tabs end

    Here is an example of what you might see:

     

    smarty-1.png

    To enable the second example application, edit the Apache configuration file at  /opt/bitnami/frameworks/smarty/conf/httpd-prefix.conf and modify it to point to the demo/ directory, as shown below:

    Alias /smarty/ "/opt/bitnami/frameworks/smarty/demo/"
    Alias /smarty "/opt/bitnami/frameworks/smarty/demo"
    Include "/opt/bitnami/frameworks/smarty/conf/httpd-app.conf"
    

    Then, edit the /opt/bitnami/frameworks/smarty/conf/httpd-app.conf file and modify the <Directory> directive to reflect the new path:

    <Directory "/opt/bitnami/frameworks/smarty/demo">
    …
    </Directory>
    

    You should also modify the permissions and ownership of the demo/ directory so that it is writable by the Web server user:

    $ cd /opt/bitnami/frameworks/smarty
    $ sudo chown -R bitnami.daemon demo
    $ sudo chmod -R 775 demo
    

    Then, restart the Apache server.

    $ sudo /opt/bitnami/ctlscript.sh restart apache
    

    You can now verify that the second example application is working by visiting the same URL as before. Here is an example of what you should see.

    smarty-2.png

    More Information

    Learn more about developing applications with Smarty at http://www.smarty.net/quick_install.

    Tag page (Edit tags)
    • No tags
    Pages that link here
    Page statistics
    138441 view(s), 10 edit(s) and 4487 character(s)

    Comments

    You must login to post a comment.

    Attach file

    Attachments

    FileSizeDateAttached by 
     smarty-1.png
    No description
    9.93 kB11:50, 9 Jan 2015vikramActions
     smarty-2.png
    No description
    15.46 kB11:51, 9 Jan 2015vikramActions