Status: offline

sharmisesha

Forum User
Newbie
Registered: 09/10/13
Posts: 7
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.

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Did you also switch the "PHP" option to actually execute the PHP (with or without the return, depending on your code), as explained in the documentation?

What happens now? Does it display the code or do you get an empty page?

bye, Dirk

Status: offline

sharmisesha

Forum User
Newbie
Registered: 09/10/13
Posts: 7
I have followed the steps given in the document. Am getting empty page.

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
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

Status: offline

sharmisesha

Forum User
Newbie
Registered: 09/10/13
Posts: 7
I have created a static page with simple echo statement. But it was not worked

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
Did you enable the staticpage.php permission?

I would also make sure you use the post mode "HTML Formatted"

Tom
One of the Geeklog Core Developers.

Status: offline

sharmisesha

Forum User
Newbie
Registered: 09/10/13
Posts: 7
in HTML formatted? Am not able to get your point. Can you explain me in detail. So that i can check it correctly.

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
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
One of the Geeklog Core Developers.

Status: offline

sharmisesha

Forum User
Newbie
Registered: 09/10/13
Posts: 7
There is no option called "Post Mode" in static page editor. Do i need to enable any plugin for that?

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
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???
One of the Geeklog Core Developers.

Status: offline

sharmisesha

Forum User
Newbie
Registered: 09/10/13
Posts: 7
PHP tags are working. But am not able to include PHP file using header() function. Pls suggest