Pages

Tuesday 15 July 2014

Run PHP application inside Liferay server

yes, as all we know Liferay supports almost all scripting language like ruby & PHP.
To run PHP application we will have to follow these steps.

1. Try to make a dummy PHP initially. So that in first integration testing it will easy to debug.

2. Create a new txt file with below content.

<?php
$first_number = 10;
$second_number = 20;
$sum_total = $first_number + $second_number;
$direct_text = 'The two variables added together = ';
print ($direct_text . $sum_total);
?>


save the file from .txt to .php extension.


3. now right click on this file & zip that file say myphp.zip

4. Like all .war file you just have to but this zip file inside deploy folder of liferay server.

5. Either it will taken care by hot deploy or you can restart the server.

6. Now login into liferay with admin role.

7. Goto add bottom a list of available portlet will appear.

8. You will see myphp drag & drop this to your page that it.

9. Your PHP portlet now in action.

The two variables added together = 30


Keep Sharing...
                   what you learn.......



No comments:

Post a Comment