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.......



Problem in Liferay 6.2 CE Installation




I have noticed that Liferay 6.2 CE standard version doesn't come with JRE inside tomcat.
So when you try to start the liferay server on windows the terminal will close by its own.
& in linux you will get JRE not found like error.

The main cause of this is that we dont have jre inside Tomcat bundle in liferay.


  • To resolve the same issue either download a fresh bundle with JRE included.

download from here

  • Or you can copy & paste JRE folder inside your liferay 6.2 tomcat from the last liferay 6.1 version. 


Please let me know if you have any query. 


Keep sharing, what you learn... :)