PHP Templating and Scripting AMP Installation Instructions

Document created by resplin Employee on Jun 6, 2015Last modified by alfresco-archivist on Aug 31, 2016
Version 4Show Document
  • View in full screen mode

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



PHP SDK
Back to PHP SDK

WARNING: The PHP integration is an example implementation and is unsupported.


Introduction


Installing the PHP AMP will allow users to create and execute PHP templates and scripts along side the already provided JavaScript and FreeMarker scripts and templates.

The Alfresco PHP API used is identical to that provided in the PHP library, so common scripts can be used in either environment.

With additional configuration once the AMP is installed, it is possible to allow the application server to host PHP applications directly.  PHP application hosted in this manner will also have access to the Alfresco PHP API.  See Enabling Alfresco PHP Server for more details.


Installing the PHP AMP


  • Use the MMT to install the PHP AMP into the selected WAR file
  • Restart the Alfresco repository with the updated WAR

Checking the PHP AMP Installation


  • Navigate into the data dictionary and then within the presentation templates space.  You should see example .php templates present.
  • Navigate into the data dictionary and then within the scripts space.  You should see example .php scripts present.

Scripts.jpg


  • Go into the guest space and view the details of the Alfresco-Tutorial.pdf.
  • Apply the custom template 'doc_info.php'

Applytemplate.jpg


  • The template should execute successfully and the following details displayed.

Appliedtemplate.jpg

Attachments

Outcomes