Welcome Guest, Not a member yet? Register   Sign In
BackendPro 0.6.1

[eluser]adamp1[/eluser]
Is this 1.0. If so then yes its not complete.

[eluser]CARP[/eluser]
Hi Adam
I've installed BP6.1 on a clean CI install 1.7.2

Now I'm getting this error:

Code:
A PHP Error was encountered
Severity: 8192
Message: Assigning the return value of new by reference is deprecated
Filename: libraries/Loader.php
Line Number: 414

I've searched and found this error is due to php 5.3.0. This is theoretically fixed in CI 1.7.2, but I hadn't seen this error before I installed BP...

Do you have some idea about how to fix this? Thanks,

[eluser]adamp1[/eluser]
The issue is because BackendPro overrides the CI Loader file. To fix it find line 414 and remove the & sign.

[eluser]CARP[/eluser]
[quote author="adamp1" date="1269025845"]The issue is because BackendPro overrides the CI Loader file. To fix it find line 414 and remove the & sign.[/quote]

in which file? libraries/Loader.php? I don't see & sign there... ain't that file from CI's core?

[eluser]adamp1[/eluser]
application/libraries/loader.php

[eluser]riza_nurhadi[/eluser]
[quote author="adamp1" date="1269030354"]application/libraries/loader.php[/quote]

ok thanks it works. solve my problem..

[eluser]riza_nurhadi[/eluser]
[quote author="daniel9201" date="1264653493"]Has anyone successfully installed install BackendPro using a postgres database instead of MySQL?[/quote]

i'm workin on that too...

converting mysql to postgre wont solve anything...
now im trying to change the mysql query to works on postgre..

if anyone have a good news... please bring it up...

ok this is the update...
1. @modules/auth/libraries/Userlib.php *line 83 *i forgot the line... Tongue
changed this
Code:
$query = $this->CI->user_model->delete('Users',
'DATE_ADD(created,INTERVAL '.$this->CI->preference->item('account_activation_time').' DAY) <= NOW()
AND active=0');
into this
Code:
$query = $this->CI->user_model->delete('Users',
'(created+ interval \''.$this->CI->preference->item('account_activation_time').' day\') <= NOW()
AND active=0');
2. @modules/auth/helpers/khacl_helper.php
changed this
Code:
$rs = $ci->db->query('SELECT access.allow
                       FROM ('.$ci->db->dbprefix.$tables['aros'].' AS aro_node,
'.$ci->db->dbprefix.$tables['acos'].' AS aco_node)

                     LEFT JOIN '.$ci->db->dbprefix.$tables['aros'].' AS aro_branch
ON (aro_node.lft >= aro_branch.lft AND aro_node.lft <= aro_branch.rgt)

                     LEFT JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_branch
ON (aco_node.lft >= aco_branch.lft AND aco_node.lft <= aco_branch.rgt)

                     INNER JOIN '.$ci->db->dbprefix.$tables['access'].' AS access
ON (aro_branch.id = access.aro_id AND aco_branch.id = access.aco_id)

                            WHERE aro_node.name = ? AND aco_node.name = ?

                            ORDER BY aro_branch.rgt ASC, aco_branch.rgt ASC

                            LIMIT 1', array($aro, $aco));
into this
Code:
$rs = $ci->db->query('SELECT access.allow

                        FROM '.$ci->db->dbprefix.$tables['aros'].' AS aro_node
CROSS JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_node

                       LEFT JOIN '.$ci->db->dbprefix.$tables['aros'].' AS aro_branch
ON (aro_node.lft >= aro_branch.lft AND aro_node.lft <= aro_branch.rgt)

                       LEFT JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_branch
ON (aco_node.lft >= aco_branch.lft AND aco_node.lft <= aco_branch.rgt)

                     INNER JOIN '.$ci->db->dbprefix.$tables['access'].' AS access
ON (aro_branch.id = access.aro_id AND aco_branch.id = access.aco_id)

  WHERE aro_node.name = ? AND aco_node.name = ?

              ORDER BY aro_branch.rgt ASC, aco_branch.rgt ASC

                       LIMIT 1', array($aro, $aco));
3. @modules/auth/helpers/khacl_helper.php
changed this
Code:
$rs = $ci->db->query('SELECT access_actions.allow

               FROM ('.$ci->db->dbprefix.$tables['aros'].' AS aro_node,
'.$ci->db->dbprefix.$tables['acos'].' AS aco_node,
'.$ci->db->dbprefix.$tables['axos'].' AS axo_node)

          LEFT JOIN '.$ci->db->dbprefix.$tables['aros'].' AS aro_branch
ON (aro_node.lft >= aro_branch.lft AND aro_node.lft <= aro_branch.rgt)

         LEFT JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_branch
ON (aco_node.lft >= aco_branch.lft AND aco_node.lft <= aco_branch.rgt)

         LEFT JOIN '.$ci->db->dbprefix.$tables['access'].' AS access
ON (aro_branch.id = access.aro_id AND aco_branch.id = access.aco_id)

        INNER JOIN '.$ci->db->dbprefix.$tables['access_actions'].' AS access_actions
ON (access.id = access_actions.access_id AND axo_node.id = access_actions.axo_id)

   WHERE aro_node.name = ? AND aco_node.name = ? AND axo_node.name = ?

                                        ORDER BY aro_branch.rgt ASC, aco_branch.rgt ASC

                                        LIMIT 1', array($aro, $aco, $axo));
into this
Code:
$rs = $ci->db->query('SELECT access_actions.allow

          FROM '.$ci->db->dbprefix.$tables['aros'].' AS aro_node
             CROSS JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_node
             CROSS JOIN '.$ci->db->dbprefix.$tables['axos'].' AS axo_node  

           LEFT JOIN '.$ci->db->dbprefix.$tables['aros'].' AS aro_branch
           ON (aro_node.lft >= aro_branch.lft AND aro_node.lft <= aro_branch.rgt)

           LEFT JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_branch
           ON (aco_node.lft >= aco_branch.lft AND aco_node.lft <= aco_branch.rgt)

            LEFT JOIN '.$ci->db->dbprefix.$tables['access'].' AS access
            ON (aro_branch.id = access.aro_id AND aco_branch.id = access.aco_id)

           INNER JOIN '.$ci->db->dbprefix.$tables['access_actions'].' AS access_actions
           ON (access.id = access_actions.access_id AND axo_node.id = access_actions.axo_id)

           WHERE aro_node.name = ? AND aco_node.name = ? AND axo_node.name = ?

             ORDER BY aro_branch.rgt ASC, aco_branch.rgt ASC

            LIMIT 1', array($aro, $aco, $axo));

and maybe theres more to it...

[eluser]adamp1[/eluser]
Most of the queries are done using the DB class so there may be one or two which have to be changed. Am I wrong?

[eluser]riza_nurhadi[/eluser]
forgot to mention....i'll upload the file when its working smoothly....
[quote author="riza_nurhadi" date="1269315108"][quote author="daniel9201" date="1264653493"]Has anyone successfully installed install BackendPro using a postgres database instead of MySQL?[/quote]

i'm workin on that too...

converting mysql to postgre wont solve anything...
now im trying to change the mysql query to works on postgre..

if anyone have a good news... please bring it up...

ok this is the update...
1. @modules/auth/libraries/Userlib.php *line 83 *i forgot the line... Tongue
changed this
Code:
$query = $this->CI->user_model->delete('Users',
'DATE_ADD(created,INTERVAL '.$this->CI->preference->item('account_activation_time').' DAY) <= NOW()
AND active=0');
into this
Code:
$query = $this->CI->user_model->delete('Users',
'(created+ interval \''.$this->CI->preference->item('account_activation_time').' day\') <= NOW()
AND active=0');
2. @modules/auth/helpers/khacl_helper.php
changed this
Code:
$rs = $ci->db->query('SELECT access.allow
                       FROM ('.$ci->db->dbprefix.$tables['aros'].' AS aro_node,
'.$ci->db->dbprefix.$tables['acos'].' AS aco_node)

                     LEFT JOIN '.$ci->db->dbprefix.$tables['aros'].' AS aro_branch
ON (aro_node.lft >= aro_branch.lft AND aro_node.lft <= aro_branch.rgt)

                     LEFT JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_branch
ON (aco_node.lft >= aco_branch.lft AND aco_node.lft <= aco_branch.rgt)

                     INNER JOIN '.$ci->db->dbprefix.$tables['access'].' AS access
ON (aro_branch.id = access.aro_id AND aco_branch.id = access.aco_id)

                            WHERE aro_node.name = ? AND aco_node.name = ?

                            ORDER BY aro_branch.rgt ASC, aco_branch.rgt ASC

                            LIMIT 1', array($aro, $aco));
into this
Code:
$rs = $ci->db->query('SELECT access.allow

                        FROM '.$ci->db->dbprefix.$tables['aros'].' AS aro_node
CROSS JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_node

                       LEFT JOIN '.$ci->db->dbprefix.$tables['aros'].' AS aro_branch
ON (aro_node.lft >= aro_branch.lft AND aro_node.lft <= aro_branch.rgt)

                       LEFT JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_branch
ON (aco_node.lft >= aco_branch.lft AND aco_node.lft <= aco_branch.rgt)

                     INNER JOIN '.$ci->db->dbprefix.$tables['access'].' AS access
ON (aro_branch.id = access.aro_id AND aco_branch.id = access.aco_id)

  WHERE aro_node.name = ? AND aco_node.name = ?

              ORDER BY aro_branch.rgt ASC, aco_branch.rgt ASC

                       LIMIT 1', array($aro, $aco));
3. @modules/auth/helpers/khacl_helper.php
changed this
Code:
$rs = $ci->db->query('SELECT access_actions.allow

               FROM ('.$ci->db->dbprefix.$tables['aros'].' AS aro_node,
'.$ci->db->dbprefix.$tables['acos'].' AS aco_node,
'.$ci->db->dbprefix.$tables['axos'].' AS axo_node)

          LEFT JOIN '.$ci->db->dbprefix.$tables['aros'].' AS aro_branch
ON (aro_node.lft >= aro_branch.lft AND aro_node.lft <= aro_branch.rgt)

         LEFT JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_branch
ON (aco_node.lft >= aco_branch.lft AND aco_node.lft <= aco_branch.rgt)

         LEFT JOIN '.$ci->db->dbprefix.$tables['access'].' AS access
ON (aro_branch.id = access.aro_id AND aco_branch.id = access.aco_id)

        INNER JOIN '.$ci->db->dbprefix.$tables['access_actions'].' AS access_actions
ON (access.id = access_actions.access_id AND axo_node.id = access_actions.axo_id)

   WHERE aro_node.name = ? AND aco_node.name = ? AND axo_node.name = ?

                                        ORDER BY aro_branch.rgt ASC, aco_branch.rgt ASC

                                        LIMIT 1', array($aro, $aco, $axo));
into this
Code:
$rs = $ci->db->query('SELECT access_actions.allow

          FROM '.$ci->db->dbprefix.$tables['aros'].' AS aro_node
             CROSS JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_node
             CROSS JOIN '.$ci->db->dbprefix.$tables['axos'].' AS axo_node  

           LEFT JOIN '.$ci->db->dbprefix.$tables['aros'].' AS aro_branch
           ON (aro_node.lft >= aro_branch.lft AND aro_node.lft <= aro_branch.rgt)

           LEFT JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_branch
           ON (aco_node.lft >= aco_branch.lft AND aco_node.lft <= aco_branch.rgt)

            LEFT JOIN '.$ci->db->dbprefix.$tables['access'].' AS access
            ON (aro_branch.id = access.aro_id AND aco_branch.id = access.aco_id)

           INNER JOIN '.$ci->db->dbprefix.$tables['access_actions'].' AS access_actions
           ON (access.id = access_actions.access_id AND axo_node.id = access_actions.axo_id)

           WHERE aro_node.name = ? AND aco_node.name = ? AND axo_node.name = ?

             ORDER BY aro_branch.rgt ASC, aco_branch.rgt ASC

            LIMIT 1', array($aro, $aco, $axo));

and maybe theres more to it...[/quote]

[eluser]adamp1[/eluser]
That's some good work. Can I ask how easy was it for the installer to be modified to setup the initial DB tables? What I will do for 1.0 is make sure all SQL code is created using the DB library if possible.




Theme © iAndrew 2016 - Forum software by © MyBB