Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post 1.2.0.27 To 1.3.0.53 ADV Permissions Issue 
 
I just followed the directions for upgrading my installation.  I would like to start off by saying absolutly sexy and I love what is now there, the IP team makes me very happy and I enjoy IP a lot, swear by it in fact.

So, down to business I suppose.

during 1.2.0.27 I had an issue with multiple sub forums and being unable to use advanced permission.  It would always send me back to Group Permissions.
A fix was made by Hal 9000 which did fix the problem and everything was absolutly awsome.  I had email issues and lost track from there, but I was okay and had directed posts in kind.

So, did my upgrade very excited about the new version.  Follwed everything to the line, everything went swimingly until I had to change advanced permissions again.  It routes me right back to Group Permissions again.

On the logs I get

Today at 22:26    adm/admin_ug_auth.php        ADMIN    MESSAGE         message to the user, code 202
Today at 22:26    adm/admin_ug_auth.php    ADMIN    ADMIN_USER_AUTH    ghost    ADMIN edited permissions of ghost (user)

Any thoughts, did something not go right that I missed?
 



 
d16174l4n63lSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: 1.2.0.27 To 1.3.0.53 ADV Permissions Issue 
 
Okay I have done some checking to recreate the circumstances again.

I did a fresh install of 1.3.0.53.  Install went fine, my forum structure is like this.

Catagory 1
Forum 1
Catagory 2
     Forum 2
     Catagory 3
          Forum 3

Each forum is set to Private on all options.

I went to the user I created, it started at simple permissions.  I went to advanced and changed just three permissions.  I then hit submit, and it brought me to the group permissions control page.  This is on a live page with no modifications to the database.




Now, I used a default WAMP 5 server package and installed.  Under the came settings I get the following.

Code: [Download] [Hide]
  1. Couldn't obtain user/group permissions  
  2.  
  3. DEBUG MODE  
  4.  
  5. SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND g.group_single_user = 1' at line 1  
  6.  
  7. SELECT aa.*, g.group_single_user FROM ip_auth_access aa, ip_user_group ug, ip_groups g WHERE ug.user_id = 3 AND g.group_id = ug.group_id AND aa.group_id = ug.group_id AND aa.forum_id = AND g.group_single_user = 1  
  8.  
  9. Line : 280  
  10. File : admin_ug_auth.php 


So where to go from here, I do not know.  I have found out that there is an issue almost identical with phpbb2 with a couple of mods, but their fix even when adapted did not change anything.


UPDATED

So, I managed to get the WAMP version to save permissions and bypass the error mind you this is just a temp fix but it works thus far.

Code: [Download] [Hide] [Select]
Open ./adm/admin_ug_auth.php
-------------------------------------------------------------------------------
Find (Around line 280 )
-------------------------------------------------------------------------------
$sql = ($mode == 'user') ? ("SELECT aa.*, g.group_single_user FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE. " g WHERE ug.user_id = $user_id AND g.group_id = ug.group_id AND aa.group_id = ug.group_id AND aa.forum_id = $forum_id AND g.group_single_user = 1") : ("SELECT * FROM " . AUTH_ACCESS_TABLE . " WHERE group_id = $group_id AND forum_id = $forum_id");

if (!($result = $db->sql_query($sql)))
    {
        message_die(GENERAL_ERROR, "Couldn't obtain user/group permissions", "", __LINE__, __FILE__, $sql);
    }
        if ($row = $db->sql_fetchrow($result))
    {
        for ($k = 0; $k < count($forum_auth_fields); $k++)
    {
        $change_acl_list[$forum_id][$forum_auth_fields[$k]] = $row[$forum_auth_fields[$k]];
    }
    }
$used_forums[$forum_id] = 1;
-------------------------------------------------------------------------------
IN-LINE FIND
-------------------------------------------------------------------------------
if (!($result = $db->sql_query($sql)))
    {
        message_die(GENERAL_ERROR, "Couldn't obtain user/group permissions", "", __LINE__, __FILE__, $sql);
    }
-------------------------------------------------------------------------------
REPLACE WITH
-------------------------------------------------------------------------------
if (!($result = $db->sql_query($sql)))
    /* {
        message_die(GENERAL_ERROR, "Couldn't obtain user/group permissions", "", __LINE__, __FILE__, $sql);
    } */


With this change you are able to adjust advanced permissions, in forums styles like mine.  Included is a default file for replacement, it has no other mods than what is listed above.

admin_ug_auth.rar
Description: SQL ERROR 1046 temp fix 
Download
Filename: admin_ug_auth.rar
Filesize: 7.54 KB
Downloaded: 107 Time(s)

 



 
d16174l4n63lSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: 1.2.0.27 To 1.3.0.53 ADV Permissions Issue 
 
Hi,
thanks for reporting this.

I will test it on my local environment and let you know.

Hal9000 fix has been included into Icy Phoenix 1.3 if I remember well...
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: 1.2.0.27 To 1.3.0.53 ADV Permissions Issue 
 
Hals fix is there.

The behavior change I am noticing is that before there was a hesitation when you hit submit where you would actively see the things you didn't change disappear before it executed in 1.2.0.27.  

Let me know if there is anything I can do to help you out.  Any information you want or otherwise in case I have not been descriptive.
 



 
d16174l4n63lSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: 1.2.0.27 To 1.3.0.53 ADV Permissions Issue 
 
I made some tests.

The code in that file is buggy.

Try replacinge the whole ELSE part (around line 263) with this and let me know if everything works fine.

Code: [Download] [Hide] [Select]

            else
            {
                $change_acl_list = array();
                $forums_processed = array();
                for($j = 0; $j < count($forum_auth_fields); $j++)
                {
                    $auth_field = $forum_auth_fields[$j];
                    while(list($forum_id, $value) = @each($_POST['private_' . $auth_field]))
                    {
                        // Mighty Gorgon: I have moved this part of code in this cycle to be able to use $forum_id var, otherwhise it was not assigned...
                        // FORUMS AUTH MOVED CODE - BEGIN
                        if (!isset($forums_processed[$forum_id]))
                        {
                            $sql = ($mode == 'user') ? ("SELECT aa.*, g.group_single_user FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE. " g WHERE ug.user_id = $user_id AND g.group_id = ug.group_id AND aa.group_id = ug.group_id AND aa.forum_id = $forum_id AND g.group_single_user = 1") : ("SELECT * FROM " . AUTH_ACCESS_TABLE . " WHERE group_id = $group_id AND forum_id = $forum_id");
                            if (!($result = $db->sql_query($sql)))
                            {
                                message_die(GENERAL_ERROR, "Couldn't obtain user/group permissions", "", __LINE__, __FILE__, $sql);
                            }
                            if ($row = $db->sql_fetchrow($result))
                            {
                                for ($k = 0; $k < count($forum_auth_fields); $k++)
                                {
                                    $change_acl_list[$forum_id][$forum_auth_fields[$k]] = $row[$forum_auth_fields[$k]];
                                }
                            }
                            $forums_processed[$forum_id] = 1;
                        }
                        // FORUMS AUTH MOVED CODE - END
                        $change_acl_list[$forum_id][$auth_field] = $value;
                    }
                }
            }

 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: 1.2.0.27 To 1.3.0.53 ADV Permissions Issue 
 
[Thu Jul 23 11:31:51 2009] [error] [client 72.66.0.234] File does not exist: /home/mysite/public_html/http:, referer: http://mysite.org/adm/admin_ug_auth...6d59f8574ec18d5
[Thu Jul 23 11:29:19 2009] [error] [client 72.66.0.234] File does not exist: /home/mysite/public_html/http:, referer: http://mysite.org/adm/admin_ug_auth...6d59f8574ec18d5

Got this from the server error log, and behaviors hasn't changed.

Update
My userss are reporting en masse the following


[Icy Phoenix Debug] PHP Notice: in file /includes/bbcode.php on line 3621: Missing argument 2 for BBCode::plain_message(), called in /includes/functions_post.php on line 1083 and defined
[Icy Phoenix Debug] PHP Notice: in file /posting.php on line 1324: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2004)
[Icy Phoenix Debug] PHP Notice: in file /includes/functions.php on line 1236: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2004)
 



 
d16174l4n63lSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: 1.2.0.27 To 1.3.0.53 ADV Permissions Issue 
 
About permissions that is strange... I have tried on my own testing site and it is working fine, please try to download the file from SVN so you are sure you have the right file.

Regarding BBCodes:
OPEN includes/functions_post.php
FIND
Code: [Download] [Hide] [Select]
                        $post_text = $bbcode->plain_message($post_text);

REPLACE WITH
Code: [Download] [Hide] [Select]
                        $post_text = $bbcode->plain_message($post_text, '');

 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: 1.2.0.27 To 1.3.0.53 ADV Permissions Issue 
 
hm

Spoiler: [ Show ]


that look´s like the cache problem i had with .27

thing is it only turned up on my live site but not on my localserver.

but that issue only turned up in ACP not in forum.
and disapeared after reload off the page .

hmpf
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: 1.2.0.27 To 1.3.0.53 ADV Permissions Issue 
 
Downloaded the SVN file of admin_ug_auth.php, uploaded it and no change to the behavior but the functions_post.php worked smashingly.

As I recall the issue was the size of the data being dealt with.  The fix that Hal 9000 did essentially cached it, checked for a change and only sent the changed ignoring the other data.

I know what you mean Spydee all too well.  Once fixed though whoo hoo.

Update
Gorgon this is comming up in my server log whenever I try to change the permission now

[Thu Jul 23 21:20:37 2009] [error] [client 72.66.0.234] File does not exist: /home/me/public_html/http:, referer: http://mysite.org/adm/admin_ug_auth...92bd753f78d4c05
[Thu Jul 23 20:38:06 2009] [error] [client 72.66.0.234] File does not exist: /home/me/public_html/http:, referer: http://mysite.org/adm/admin_ug_auth...92bd753f78d4c05
 



 
d16174l4n63lSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: 1.2.0.27 To 1.3.0.53 ADV Permissions Issue 
 
The error should be related to a missing SPACER (due to wrong address)... I should have fixed that as well.

I'll update SVN again.

Permissions are working fine for me now. Please confirm.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: 1.2.0.27 To 1.3.0.53 ADV Permissions Issue 
 
Downloaded admin_ug_auth.php from SVN and uploaded it to my server.  Behavior is still the same, advanced permissions do not update.  I cannot seem to revert to simple mode now as well.

This is the damnedest thing.  

The error [Thu Jul 23 20:38:06 2009] [error] [client 72.66.0.234] File does not exist: /home/me/public_html/http:, referer: http://mysite.org/adm/admin_ug_auth...92bd753f78d4c05

seems to have cleared up on a good note.

I also attempted to load del_unchanged_selects.js from ./template/default/overall_inc_header_js.tpl seeing if maybe it was a hierarchy issue, but that did not help either.  I am going to attempt a few things by code comparison tonight, and edit if I come up with any new results.
 



 
d16174l4n63lSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: 1.2.0.27 To 1.3.0.53 ADV Permissions Issue 
 
Can you please do this for me?

  • Start with a clean installation and SVN files
  • Create two users called user1 and user2 use password same as username (also admin use same password as username)
  • Create the forum structure you mentioned
  • Try to apply the permissions you wish and see what happens
  • If it is not working, please export the full db and attach it here and tell me which permissions you need me to apply, I will test with that configuration


The problem is that on my local testing environment everything is working fine.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: 1.2.0.27 To 1.3.0.53 ADV Permissions Issue 
 
I did exactly as you instructed, recreated the structure and it works just fine with the SVN fix, so your side is right it does work.  I am going to try a full overwrite of teh files and the svn and see if maybe something didn't copy right.

Updated
I did a file update using the regular install and added in the svn updates, and the behavior is the same.  When altering the advanced permissions it goes to the group permissions selection page.

Though as I said before the one I created per your instructions works just fine.  Would suphp be an issue, because apparently it is on, and causing a couple of errors regarding memory.
 



 
d16174l4n63lSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: 1.2.0.27 To 1.3.0.53 ADV Permissions Issue 
 
It turns out, after a long stretch of testing that suPHP is the root cause of my entire issue.  Though the other corrections where awsome as well.

Add in I found out there was a 16mb sql tranfer limit that was secretly imposed.

However after reviewing logs suPHP will nearly kill an IP instillation to a crawl.
 



 
d16174l4n63lSend private message  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron