Welcome to Geeklog, Anonymous Saturday, November 23 2024 @ 04:22 am EST
Geeklog Forums
StaticPages still no PHP
Status: offline
jnordquist
Forum User
Full Member
Registered: 03/14/03
Posts: 129
Location:Kenosha
Okay, I have upgraded to the latest greatest 1.3.9. After sme theme issues, everything works with the exception of PHP on static pages.
My syaticPages Editor page has:
No, I read the docs forward, backward, upsidedown, and did everythi g exactly like they say, but still, no PHP button available.
Any clues???
John Nordquist,
Applications Specialist, medical Technologies
My syaticPages Editor page has:
PHP: The use of PHP in static pages is not activated. Please see the documentation for details.
No, I read the docs forward, backward, upsidedown, and did everythi g exactly like they say, but still, no PHP button available.
Any clues???
John Nordquist,
Applications Specialist, medical Technologies
11
10
Quote
Status: offline
Peter_Apockotos
Forum User
Junior
Registered: 03/18/04
Posts: 29
Per the doc labeled staticpages.html:
Activating PHP
Important: For security reasons, the use of PHP in static pages is disabled by default. To enable it, you will have to grant the 'staticpages.PHP' permission to the "Static Page Admin" group. To do this, log in as the Admin and from the Admin's Only block, select "Groups". Find the "Static Page Admin" group and edit it by clicking on the name of the group. At the bottom of the page, you will find a list of "Rights" (permissions) that can be granted to all members of this group. Note that 'staticpages.delete' and 'staticpages.edit' are checked, while 'staticpages.PHP' is not checked. To allow members of the Static Page Admin group to use PHP in static pages, you will have to check the 'staticpages.PHP' checkbox and save your changes.
In addition to the 'staticpages.PHP' permission discussed above, there is also a global flag, $_SP_CONF['allow_php'], that can be used to disable the use of PHP in static pages entirely. When set to 0, it will override the 'staticpages.PHP' permission and disable all use of PHP in static pages. The flag is located in the static pages' config.php file in the plugins/staticpages directory.
Activating PHP
Important: For security reasons, the use of PHP in static pages is disabled by default. To enable it, you will have to grant the 'staticpages.PHP' permission to the "Static Page Admin" group. To do this, log in as the Admin and from the Admin's Only block, select "Groups". Find the "Static Page Admin" group and edit it by clicking on the name of the group. At the bottom of the page, you will find a list of "Rights" (permissions) that can be granted to all members of this group. Note that 'staticpages.delete' and 'staticpages.edit' are checked, while 'staticpages.PHP' is not checked. To allow members of the Static Page Admin group to use PHP in static pages, you will have to check the 'staticpages.PHP' checkbox and save your changes.
In addition to the 'staticpages.PHP' permission discussed above, there is also a global flag, $_SP_CONF['allow_php'], that can be used to disable the use of PHP in static pages entirely. When set to 0, it will override the 'staticpages.PHP' permission and disable all use of PHP in static pages. The flag is located in the static pages' config.php file in the plugins/staticpages directory.
12
10
Quote
Status: offline
jnordquist
Forum User
Full Member
Registered: 03/14/03
Posts: 129
Location:Kenosha
Yep, all that and still no PHP button. I've spent hours trying to figure out this one.
John Nordquist,
Applications Specialist, medical Technologies
John Nordquist,
Applications Specialist, medical Technologies
10
8
Quote
Status: offline
Peter_Apockotos
Forum User
Junior
Registered: 03/18/04
Posts: 29
What php button are you referring to?
11
13
Quote
Status: offline
jnordquist
Forum User
Full Member
Registered: 03/14/03
Posts: 129
Location:Kenosha
The one on the main staticpages editor page:
inmy case:
http://kenoshaonline.net/admin/plugins/staticpages/index.php/edit
No box for PHP.
John Nordquist,
Applications Specialist, medical Technologies
inmy case:
http://kenoshaonline.net/admin/plugins/staticpages/index.php/edit
In a block: Wrap Static Page in a block.
PHP: The use of PHP in static pages is not activated. Please see the documentation for details.
Exit Type: Enable for Login Required Message. Leave unchecked for normal security check and message.
PHP: The use of PHP in static pages is not activated. Please see the documentation for details.
Exit Type: Enable for Login Required Message. Leave unchecked for normal security check and message.
No box for PHP.
John Nordquist,
Applications Specialist, medical Technologies
6
11
Quote
Status: offline
Peter_Apockotos
Forum User
Junior
Registered: 03/18/04
Posts: 29
The use of PHP in static pages is not activated. Please see the documentation for details.
This tells me that you either did not enable php via the admin or it is disabled in the
1. Login as the admin
2. Under Admins Only, click on Groups
3. Click on the Static Pages Admin group, the name and not list or edit.
4. Then make sure that staticpages.php, staticpages.delete and staticpages.edit has a check mark.
Now you should be able to add php to a static page, there will not be a box just for php code. You use the same one that you use for plain text and html.
If it is still not working then make sure that it is enabled in the config:
Plugins---->StaticPages---->Config.php
Make sure that the following line looks like this:
$_SP_CONF['allow_php'] = 1;
This tells me that you either did not enable php via the admin or it is disabled in the
1. Login as the admin
2. Under Admins Only, click on Groups
3. Click on the Static Pages Admin group, the name and not list or edit.
4. Then make sure that staticpages.php, staticpages.delete and staticpages.edit has a check mark.
Now you should be able to add php to a static page, there will not be a box just for php code. You use the same one that you use for plain text and html.
If it is still not working then make sure that it is enabled in the config:
Plugins---->StaticPages---->Config.php
Make sure that the following line looks like this:
$_SP_CONF['allow_php'] = 1;
10
10
Quote
Status: offline
jnordquist
Forum User
Full Member
Registered: 03/14/03
Posts: 129
Location:Kenosha
Hi, I appreciate your patience with this.
Yes, all that is correct.
Over and over again. Is there a permission setting that I'm missing?
John Nordquist,
Applications Specialist, medical Technologies
Yes, all that is correct.
Over and over again. Is there a permission setting that I'm missing?
John Nordquist,
Applications Specialist, medical Technologies
10
6
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Can't think of much else that could go wrong here ...
Make sure the user you're logged in as is a member of the Static Pages Admin group. Also check if you have (for whatever reason) more than one Static Page Admin group (maybe you've been editing the wrong one).
Actually, you could try creating another such group, assign it all the 3 staticpages.xxx permissions, make yourself a member of it and see if that helps.
Sorry, just some shots in the dark ...
bye, Dirk
Make sure the user you're logged in as is a member of the Static Pages Admin group. Also check if you have (for whatever reason) more than one Static Page Admin group (maybe you've been editing the wrong one).
Actually, you could try creating another such group, assign it all the 3 staticpages.xxx permissions, make yourself a member of it and see if that helps.
Sorry, just some shots in the dark ...
bye, Dirk
7
9
Quote
Status: offline
jnordquist
Forum User
Full Member
Registered: 03/14/03
Posts: 129
Location:Kenosha
Many many thanks to Peter_Apockotos who was able to login and poke around and fix it. Not sure yet what exactly he found, but the fact tha the took the time to SSH in, check the config's, etc, recommend action and fixing it, is a great testament to the spirit of OpenSource.
Thanks a million Peter. Now there are so many projects I can do that I couldn't without this working.
John Nordquist,
Applications Specialist, medical Technologies
Thanks a million Peter. Now there are so many projects I can do that I couldn't without this working.
John Nordquist,
Applications Specialist, medical Technologies
8
8
Quote
Status: offline
Peter_Apockotos
Forum User
Junior
Registered: 03/18/04
Posts: 29
There were two additional groups performing the same function as the Statics Pages Admin Group. Then there were duplicate rights set for these groups which I imagine cancelled one another.
Those duplicate rights are still in the database, I believe they are in the gl_groups and gl_group_assignments tables.
Dirk correct my if I am wrong. I wish there was an easier way to delete rights entirely without having to do it directly in the database. Which I wasn't able to do for you John, since I didn't have access to your dB.
Those duplicate rights are still in the database, I believe they are in the gl_groups and gl_group_assignments tables.
Dirk correct my if I am wrong. I wish there was an easier way to delete rights entirely without having to do it directly in the database. Which I wasn't able to do for you John, since I didn't have access to your dB.
11
12
Quote
Status: offline
Peter_Apockotos
Forum User
Junior
Registered: 03/18/04
Posts: 29
Blaine,
John installed this on his server and although it seems to remove the rights in question from the groups. It doesn't remove those rights outright. Is there something I am missing?
John installed this on his server and although it seems to remove the rights in question from the groups. It doesn't remove those rights outright. Is there something I am missing?
9
10
Quote
Status: offline
jnordquist
Forum User
Full Member
Registered: 03/14/03
Posts: 129
Location:Kenosha
As far as I can tell it is working right now. At least the php "hello world" test does. Now I get to be dangerous. Thanks everybody, and thanks again Peter for actually going in and looking! There is no possibility I would have found it in a million years.
John Nordquist,
Applications Specialist, medical Technologies
John Nordquist,
Applications Specialist, medical Technologies
7
8
Quote
All times are EST. The time is now 04:22 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content