Posted on: 09/10/13 03:08am
By: sharmisesha
Dear all,
Am using geeklog 2.0.0 version for project. I have created static pages with PHP tags. But php tags are not executed. I have enabled staticpages.php option for static page admin group. And php enabled for static pages.
Kindly suggest.
Re: PHP tags are not working inside static pages
Posted on: 09/10/13 03:24am
By: Dirk
Did you also switch the "PHP" option to actually execute the PHP (with or without the return, depending on your code), as
explained[*1] in the documentation?
What happens now? Does it display the code or do you get an empty page?
bye, Dirk
Re: PHP tags are not working inside static pages
Posted on: 09/10/13 06:09am
By: sharmisesha
I have followed the steps given in the document. Am getting empty page.
Re: PHP tags are not working inside static pages
Posted on: 09/10/13 06:19am
By: Dirk
An empty page may be an indication of a problem in your PHP code. Debugging PHP code in a static page is a bit of a pain, unfortunately.
Try something simple first, maybe an echo statement, to confirm that it works at all and then slowly add parts of your code. Keep in mind that your PHP code will run as part of a function, so global variables need to be declared as such.
bye, Dirk
Re: PHP tags are not working inside static pages
Posted on: 09/10/13 06:25am
By: sharmisesha
I have created a static page with simple echo statement. But it was not worked
Re: PHP tags are not working inside static pages
Posted on: 09/10/13 06:56am
By: Laugh
Did you enable the staticpage.php permission?
I would also make sure you use the post mode "HTML Formatted"
Tom
Re: PHP tags are not working inside static pages
Posted on: 09/11/13 02:18am
By: sharmisesha
in HTML formatted? Am not able to get your point. Can you explain me in detail. So that i can check it correctly.
Re: PHP tags are not working inside static pages
Posted on: 09/11/13 06:44am
By: Laugh
On the staticpage editor there is an option called "Post Mode". It is right above the content area. Make sure that is set to "HTML Formatted".
Tom
Re: PHP tags are not working inside static pages
Posted on: 09/11/13 11:23pm
By: sharmisesha
There is no option called "Post Mode" in static page editor. Do i need to enable any plugin for that?
Re: PHP tags are not working inside static pages
Posted on: 09/12/13 06:59am
By: Laugh
Then you should be fine since you don't have the advance editor enabled.
It must be another issue. Did you follow Dirk's link and follow the instructions there?
ie enabled the permission right etc???
Re: PHP tags are not working inside static pages
Posted on: 09/12/13 07:12am
By: sharmisesha
PHP tags are working. But am not able to include PHP file using header() function. Pls suggest