23
This issue seems to be caused by some, but only some, variables not turning up in the '$_POST' array on a live site, whereas they do on a local setup.
As far as I can see the two setups are almost the same (details in earlier post).
If this is a server setup issue I would value any advice I could pass on to my provider.
Here's some more input to this issue.
Extended Profile module
***********************
Module Admin > permissions (url is now xx../modules/profile/admin/permissions.php)
This gives a big table of check boxes with a submit button. Hit the button and it takes you to:
xx../modules/system/admin/groupperm.php
This takes the posted variables and:
- checks which module you're updating
- checks the user has admin rights
If it likes the module and user it proceeds with the update, shows what it's updating and then returns to the page with the big table.
If it doesn't like the module or user it re-directs to a 'Sorry you don't have permission to access ..' page, which in turn re-directs to the front page.
In my case the local machine (details in earlier post) updates as expected, but on the hosted site it fails because some variables aren't posted.
I trapped the posted variables by adding into xx/modules/system/admin/groupperm.php these two lines at the top of the file:
print_r ($_POST); // shows what variables are posted
exit(); // stops further processing
Then hit submit on the Profile permissions page to see what got posted.
Local machine:
-------------
Array ( [perms] => Array ( [profile_edit] => Array ( [groups] => Array ( [1] => Array ( [1] => 1 [8] => 1 [12] => 1 [20] => 1 [2] => 1 [9] => 1 [13] => 1 [3] => 1 [10] => 1 [14] => 1 [22] => 1 [4] => 1 [11] => 1 [15] => 1 [5] => 1 [16] => 1 [24] => 1 [6] => 1 [17] => 1 [18] => 1 [19] => 1 ) [2] => Array ( [1] => 1 [8] => 1 [12] => 1 [20] => 1 [2] => 1 [9] => 1 [13] => 1 [3] => 1 [10] => 1 [14] => 1 [4] => 1 [11] => 1 [15] => 1 [5] => 1 [16] => 1 [24] => 1 [6] => 1 [17] => 1 [18] => 1 [19] => 1 ) ) [parents] => Array ( [1] => [8] => [12] => [20] => [2] => [9] => [13] => [3] => [10] => [14] => [22] => [4] => [11] => [15] => [5] => [16] => [24] => [6] => [17] => [18] => [19] => )
[itemname] => Array ( [1] => Real Name [8] => ICQ [12] => Allow other users to v... [20] => Website [2] => Location [9] => AIM [13] => Always attach my signa... [3] => Time Zone [10] => YIM [14] => Receive occasional ema... [22] => Rank [4] => Occupation [11] => MSNM [15] => Theme [5] => Interest [16] => Comments Display Mode [24] => Signature [6] => Extra Info [17] => Comments Sort Order [18] => Default Notification Mode [19] => Notification Method Wh... ) ) ) [submit] => Submit [modid] => 20 [redirect_url] => admin/permissions.php )
Hosted site:
------------
Array ( [perms] => Array ( [profile_edit] => Array ( [groups] => Array ( [1] => Array ( [1] => 1 [8] => 1 [12] => 1 [20] => 1 [2] => 1 [9] => 1 [13] => 1 [3] => 1 [10] => 1 [14] => 1 [22] => 1 [4] => 1 [11] => 1 [15] => 1 [5] => 1 [16] => 1 [24] => 1 [6] => 1 [17] => 1 [18] => 1 [19] => 1 ) [2] => Array ( [1] => 1 [8] => 1 [12] => 1 [20] => 1 [2] => 1 [9] => 1 [13] => 1 [3] => 1 [10] => 1 [14] => 1 [4] => 1 [11] => 1 [15] => 1 [5] => 1 [16] => 1 [24] => 1 [6] => 1 [17] => 1 [18] => 1 [19] => 1 ) ) [parents] => Array ( [1] => [8] => [12] => [20] => [2] => [9] => [13] => [3] => [10] => [14] => [22] => [4] => [11] => [15] => [5] => [16] => [24] => [6] => [17] => [18] => [19] => )
[itemname] => Array ( [1] => Real Name [8] => ICQ [12] => Allow other users to v... [20] => Website [2] => Location [9] => AIM [13] => Always attach my signa... [3] => Time Zone [10] => YIM [14] => Receive occasional ema... [22] => Rank [4] => Occupation [11] => MSNM [15] => Theme [5] => Interest [16] => Comments Display Mode [24] => Signature [6] => Extra Info [17] => Comments Sort Order [18] => Default Notification Mode [19] => Notification Method Wh... ) ) ) )
The important bit is at the end:
[submit] => Submit [modid] => 20 [redirect_url] => admin/permissions.php
These come from some hidden text boxes and show up on the local machine and but not at the hosted site. This causes the failure as '../groupperm.php' isn't given a module to update ([modid] => 20).
Any ideas what can cause this on one server and not another?
GFD