Menu

Allowing users to edit details

Help
2004-03-08
2004-04-02
<< < 1 2 (Page 2 of 2)
  • John Finlay

    John Finlay - 2004-03-30

    I'm trying to find out why you might be getting this error and checking some of the common reasons why this error might be happening.

    Here is the line of code that checks if you have permissions:
    if ((!userCanEdit(getUserName()))||(!$disp)||(!$ALLOW_EDIT_GEDCOM))

    Would you mind inserting the following lines before line 137 of gdbi_interface.php:

    if (!userCanEdit(getUserName())) print "user can't edit<br />"; else print "user can edit<br />";
    if (!disp) print "disp was false<br />"; else print "disp was true<br />";
    if (!$ALLOW_EDIT_GEDCOM print "gedcom editing disabled<br />"; else print "gedcom editing enabled<br />";

    Try to edit something again and tell me what was printed.

    Thanks,
    --John

     
    • jsc

      jsc - 2004-03-30

      it said:

      Parse error: parse error in /home/senior/public_html/geno/gdbi_interface.php on line 141

       
  • jsc

    jsc - 2004-03-30

    I should tell you that that line is now the final one you sent me.

    if (!$ALLOW_EDIT_GEDCOM print "gedcom editing disabled<br />"; else print "gedcom editing enabled<br />";

     
  • John Finlay

    John Finlay - 2004-03-30

    Sorry, that final line is missing a closing ) and should read:
    if (!$ALLOW_EDIT_GEDCOM) print "gedcom editing disabled<br />"; else print "gedcom editing enabled<br />";

     
  • jsc

    jsc - 2004-03-30

    alright, I think this may help:

    user can edit

    Warning: Use of undefined constant disp - assumed 'disp' in /home/senior/public_html/geno/gdbi_interface.php on line 138
    disp was true
    gedcom editing enabled
    Access Denied
    You do not have access to this resource.

     
  • jsc

    jsc - 2004-03-30

    line 138 says:

    $if (!disp) print "disp was false<br />"; else print "disp was true<br />";

     
  • John Finlay

    John Finlay - 2004-03-30

    I guess that I typed that up too fast:

    The line should be:
    if (!$disp) print "disp was false<br />"; else print "disp was true<br />";

    But based on the other lines it is obvious that it is the $disp variable that isn't getting set to true.

    Could you replace line 138 with:
    if (!$disp) {
        print "<br />Privacy check failed.";
        if (!empty($pid)) print "<br />Privacy could not be granted for pid $pid.";
        if (!empty($famid)) print "<br />Privacy could not be granted for famid $famid.";
    }

    This will help me to know where the $disp variable is getting set to false.

    --John

     
  • jsc

    jsc - 2004-03-31

    OK, the results were:

    user can edit
    Privacy check failed.
    Privacy could not be granted for pid INDI.
    Privacy could not be granted for famid new.gedcom editing enabled
    Access Denied
    You do not have access to this resource.

     
  • John Finlay

    John Finlay - 2004-03-31

    While working on another problem I think that I may have figured out what it going wrong...

    edit the session.php file and comment out lines 173 and 186.  Then let me know if it starts working.

    --John

     
  • jsc

    jsc - 2004-04-02

    I deleted the lines you mentioned, but then I got a whole raft of errors...I assume because the linecount got confused when I added and deleted lines.

    So I uploaded the original file and commented out the lines and nothing special happened...just the same old "you do not have access to this resource".  I see you have uploaded a new beta version so I'll try using that and see what happens.

     
  • jsc

    jsc - 2004-04-02

    Okay, Its too early, not enough coffee...didn't edit the right file.  but now I have and it hasn't seemed to help any...

     
<< < 1 2 (Page 2 of 2)

Log in to post a comment.