Subject: Enabling php in static pages

Posted on: 29/05/09 01:34pm
By: Anonymous

Is it possible to enable php in a staticpage? If so can someone explain to me in really simple terms.

Thanks.

Re: Enabling php in static pages

Posted on: 29/05/09 01:42pm
By: Dirk

Have you tried reading the documentation? Which is actually linked from the static pages editor ...

bye, Dirk

Re: Enabling php in static pages

Posted on: 29/05/09 01:44pm
By: Anonymous

An SQL error has occurred. Please see error.log for details.

I get this when i go to groups, but everything else works fine ??

Re: Enabling php in static pages

Posted on: 29/05/09 01:50pm
By: Dirk

That shouldn't happen of course. Please quote the SQL error from your error.log

bye, Dirk

Re: Enabling php in static pages

Posted on: 29/05/09 02:01pm
By: Anonymous

would you have any idea where i would find that?

Re: Enabling php in static pages

Posted on: 29/05/09 02:24pm
By: Dirk

/path/to/geeklog/logs/error.log

Re: Enabling php in static pages

Posted on: 29/05/09 02:49pm
By: Anonymous

hi dirk,

its not there ive gone to the path to geeklog and there is no logs folder.

Re: Enabling php in static pages

Posted on: 29/05/09 03:01pm
By: Dirk

It must be somewhere. Usually in the same directory as the "system", "language", "plugins", and "sql" directories.

bye, Dirk

Re: Enabling php in static pages

Posted on: 29/05/09 03:22pm
By: Anonymous

found it!

this is the logged message

Fri May 29 19:02:48 2009 - 1054: Unknown column 'grp_gl_core' in 'where clause'. SQL in question: SELECT * FROM ge_groups WHERE (grp_gl_core = 0 OR grp_id in (2,13))

Re: Enabling php in static pages

Posted on: 29/05/09 03:50pm
By: Dirk

Hmm, that's an odd one. The 'grp_gl_core' row has always been part of the Geeklog database schema.

Which Geeklog version is that and how did you install it?

bye, Dirk

Re: Enabling php in static pages

Posted on: 29/05/09 04:56pm
By: Anonymous

its version 1.4.1 and i installed it through my webhosts script thingy..

Re: Enabling php in static pages

Posted on: 31/05/09 03:49am
By: Dirk

Do you have access to phpMyAdmin or some other way to get directly to the database?

It's very odd that that field would be missing, but could be fixed relatively easily.

bye, Dirk

Re: Enabling php in static pages

Posted on: 31/05/09 03:07pm
By: Anonymous

Hi Dirk,

I do have access to phpmyadmin what do i need to do?

Re: Enabling php in static pages

Posted on: 31/05/09 03:23pm
By: Dirk

The UI of phpMyAdmin differs a lot between versions, so please bear with me. I'll try to describe what you should be seeing.

Find the gl_groups table and click on it. You should have a tab "Structure" where you can see the fields in that table. There should be 4 of them: grp_id, grp_name, grp_descr, and grp_gl_core.

From your description, it seems like you are missing the last one, grp_gl_core.

If so: There should be an option to add 1 field at the end of the table. Do that with the following information:
- Field name is "grp_gl_core"
- Type is "TINYINT"
- Length is "1"
- Attributes is "UNSIGNED"
- for Null select "not null"
- Default is "0"
- leave any other options (collation, extra) empty

Click on "Save", then try to get into Geeklog's Groups editor again.

Fortunately, that field is really only used for filtering out the Admin groups in the Groups editor. That won't work for you, but other than that you won't be missing any functionality.

bye, Dirk

Re: Enabling php in static pages

Posted on: 31/05/09 03:37pm
By: Anonymous

thanks dirk that worked!! however i am getting the same error on the plugins page too, how can i rectifify this??

Re: Enabling php in static pages

Posted on: 31/05/09 03:46pm
By: Anonymous

this is the error i am getting in error.log

Sun May 31 20:38:41 2009 - 1054: Unknown column 'pi_gl_version' in 'field list'. SQL in question: SELECT pi_name, pi_version, pi_gl_version, pi_enabled, pi_homepage FROM ge_plugins WHERE 1=1

Re: Enabling php in static pages

Posted on: 31/05/09 03:47pm
By: Dirk

Really the exact same error? The steps above should have fixed that. Double-check the name of that new field (and compare with the one in the error message).

bye, Dirk

Re: Enabling php in static pages

Posted on: 31/05/09 03:52pm
By: Anonymous

Hi Dirk,

No it is not the exact same error this time in error.log i am getting

Sun May 31 20:38:41 2009 - 1054: Unknown column 'pi_gl_version' in 'field list'. SQL in question: SELECT pi_name, pi_version, pi_gl_version, pi_enabled, pi_homepage FROM ge_plugins WHERE 1=1

Re: Enabling php in static pages

Posted on: 31/05/09 04:14pm
By: Dirk

Something about your setup is really very odd. Is this a new install or has it been running for a while (1.4.1 isn't exactly new)? If it's not a new install - have these things worked before?

To add the missing field: Go into the "Structure" tab for the gl_plugins table, add a new field "pi_gl_version" with Type "VARCHAR", Length "20", and null set to "not null". Leave the other entries blank.

Again, nothing vital missing there. But I've never seen such an install before ...

bye, Dirk

Re: Enabling php in static pages

Posted on: 31/05/09 04:37pm
By: Anonymous

hi dirk,

all working, ive had geeklog for about a year now and i think there must be something odd about my hosts installer as these have never worked (until today!)

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=87651