Menu

RadiusDesk + PHP7

Help
2016-09-15
2016-10-24
  • Justin F. Hallett

    I've been trying to track down wher ethe failure is, I'm running RadiusDesk r1891 and cakphp 2.8.8

    I'm not sure if it's cakephp or RD, but if I switch form php5 to php7 I can no longer even login. The login page shows up and I can enter my username and pass, when I hit enter or click on the login button nothing happens and in my console log I see...

    2 errors (Any help would be greatly appreciated as this is my last php5 system)

    [Error] [E] Ext.JSON.decode(): You're trying to decode an invalid JSON String: <pre class="cake-error"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr57dace4facb6f-trace').style.display = (document.getElementById('cakeErr57dace4facb6f-trace').style.display == 'none' ? '' : 'none');"><b>Warning</b> (2)</a>: Declaration of User::afterSave($created) should be compatible with Model::afterSave($created, $options = Array) [<b>APP/Model/User.php</b>, line <b>0</b>]<div id="cakeErr57dace4facb6f-trace" class="cake-stack-trace" style="display: none;"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr57dace4facb6f-code').style.display = (document.getElementById('cakeErr57dace4facb6f-code').style.display == 'none' ? '' : 'none')">Code</a> <a href="javascript:void(0);" onclick="document.getElementById('cakeErr57dace4facb6f-context').style.display = (document.getElementById('cakeErr57dace4facb6f-context').style.display == 'none' ? '' : 'none')">Context</a><pre id="cakeErr57dace4facb6f-code" class="cake-code-dump" style="display: none;"><code><span style="color: #000000"><span style="color: #0000BB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">file_exists</span><span style="color: #007700">(</span><span style="color: #0000BB">$file</span><span style="color: #007700">))&nbsp;{</span></span></code>
    <code><span style="color: #000000"><span style="color: #0000BB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">static::</span><span style="color: #0000BB">_map</span><span style="color: #007700">(</span><span style="color: #0000BB">$file</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$className</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$plugin</span><span style="color: #007700">);</span></span></code>
    <span class="code-highlight"><code><span style="color: #000000"><span style="color: #0000BB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">return&nbsp;include&nbsp;</span><span style="color: #0000BB">$file</span><span style="color: #007700">;</span></span></code></span></pre><pre id="cakeErr57dace4facb6f-context" class="cake-context" style="display: none;">$className = &#039;User&#039;
    $parts = array(
        (int) 0 =&gt; &#039;Model&#039;
    )
    $plugin = null
    $package = &#039;Model&#039;
    $file = &#039;/var/www/cakephp-2.8.8/rd_cake/Model/User.php&#039;
    $paths = array(
        (int) 0 =&gt; &#039;/var/www/cakephp-2.8.8/rd_cake/Model/&#039;,
        (int) 1 =&gt; &#039;/var/www/cakephp-2.8.8/rd_cake/Lib/Model/&#039;,
        (int) 2 =&gt; &#039;/var/www/cakephp-2.8.8/rd_cake/Model/&#039;,
        (int) 3 =&gt; &#039;/var/www/cakephp-2.8.8/lib/Cake/Model/&#039;
    )
    $appLibs = &#039;/var/www/cakephp-2.8.8/rd_cake/Lib/&#039;
    $normalizedClassName = &#039;User&#039;
    $path = &#039;/var/www/cakephp-2.8.8/rd_cake/Model/&#039;</pre><pre class="stack-trace">include - CORE/Cake/Core/App.php, line 567
    App::load() - CORE/Cake/Core/App.php, line 567
    spl_autoload_call - [internal], line ??
    class_exists - [internal], line ??
    ClassRegistry::init() - CORE/Cake/Utility/ClassRegistry.php, line 146
    BaseAuthenticate::_findUser() - CORE/Cake/Controller/Component/Auth/BaseAuthenticate.php, line 125
    FormAuthenticate::authenticate() - CORE/Cake/Controller/Component/Auth/FormAuthenticate.php, line 78
    AuthComponent::identify() - CORE/Cake/Controller/Component/AuthComponent.php, line 770
    DesktopController::authenticate() - APP/Controller/DesktopController.php, line 17
    ReflectionMethod::invokeArgs() - [internal], line ??
    Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
    Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
    Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
    [main] - APP/webroot/index.php, line 92</pre></div></pre><pre class="cake-error"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr57dace4fae4b5-trace').style.display = (document.getElementById('cakeErr57dace4fae4b5-trace').style.display == 'none' ? '' : 'none');"><b>Warning</b> (2)</a>: Declaration of LimitBehavior::beforeSave($model) should be compatible with ModelBehavior::beforeSave(Model $model, $options = Array) [<b>APP/Model/Behavior/LimitBehavior.php</b>, line <b>0</b>]<div id="cakeErr57dace4fae4b5-trace" class="cake-stack-trace" style="display: none;"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr57dace4fae4b5-code').style.display = (document.getElementById('cakeErr57dace4fae4b5-code').style.display == 'none' ? '' : 'none')">Code</a> <a href="javascript:void(0);" onclick="document.getElementById('cakeErr57dace4fae4b5-context').style.display = (document.getElementById('cakeErr57dace4fae4b5-context').style.display == 'none' ? '' : 'none')">Context</a><pre id="cakeErr57dace4fae4b5-code" class="cake-code-dump" style="display: none;"><code><span style="color: #000000"><span style="color: #0000BB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">file_exists</span><span style="color: #007700">(</span><span style="color: #0000BB">$file</span><span style="color: #007700">))&nbsp;{</span></span></code>
    <code><span style="color: #000000"><span style="color: #0000BB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">static::</span><span style="color: #0000BB">_map</span><span style="color: #007700">(</span><span style="color: #0000BB">$file</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$className</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$plugin</span><span style="color: #007700">);</span></span></code>
    <span class="code-highlight"><code><span style="color: #000000"><span style="color: #0000BB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">return&nbsp;include&nbsp;</span><span style="color: #0000BB">$file</span><span style="color: #007700">;</span></span></code></span></pre><pre id="cakeErr57dace4fae4b5-context" class="cake-context" style="display: none;">$className = &#039;LimitBehavior&#039;
    $parts = array(
        (int) 0 =&gt; &#039;Model/Behavior&#039;
    )
    $plugin = null
    $package = &#039;Model/Behavior&#039;
    $file = &#039;/var/www/cakephp-2.8.8/rd_cake/Model/Behavior/LimitBehavior.php&#039;
    $paths = array(
        (int) 0 =&gt; &#039;/var/www/cakephp-2.8.8/rd_cake/Model/Behavior/&#039;,
        (int) 1 =&gt; &#039;/var/www/cakephp-2.8.8/rd_cake/Lib/Model/Behavior/&#039;,
        (int) 2 =&gt; &#039;/var/www/cakephp-2.8.8/rd_cake/Model/Behavior/&#039;,
        (int) 3 =&gt; &#039;/var/www/cakephp-2.8.8/lib/Cake/Model/Behavior/&#039;
    )
    $appLibs = &#039;/var/www/cakephp-2.8.8/rd_cake/Lib/&#039;
    $normalizedClassName = &#039;LimitBehavior&#039;
    $path = &#039;/var/www/cakephp-2.8.8/rd_cake/Model/Behavior/&#039;</pre><pre class="stack-trace">include - CORE/Cake/Core/App.php, line 567
    App::load() - CORE/Cake/Core/App.php, line 567
    spl_autoload_call - [internal], line ??
    class_exists - [internal], line ??
    BehaviorCollection::load() - CORE/Cake/Model/BehaviorCollection.php, line 120
    BehaviorCollection::init() - CORE/Cake/Model/BehaviorCollection.php, line 66
    Model::__construct() - CORE/Cake/Model/Model.php, line 774
    ReflectionClass::newInstance() - [internal], line ??
    ClassRegistry::init() - CORE/Cake/Utility/ClassRegistry.php, line 169
    BaseAuthenticate::_findUser() - CORE/Cake/Controller/Component/Auth/BaseAuthenticate.php, line 125
    FormAuthenticate::authenticate() - CORE/Cake/Controller/Component/Auth/FormAuthenticate.php, line 78
    AuthComponent::identify() - CORE/Cake/Controller/Component/AuthComponent.php, line 770
    DesktopController::authenticate() - APP/Controller/DesktopController.php, line 17
    ReflectionMethod::invokeArgs() - [internal], line ??
    Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
    Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
    Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
    [main] - APP/webroot/index.php, line 92</pre></div></pre>{
        "data": {
            "token": "552d538e-0d70-4c33-8658-713ba9baf6a0",
            "isRootUser": true,
            "menu": [
                {
                    "text": "Realms and Providers",
                    "glyph": "xf17d@FontAwesome",
                    "menu": {
                        "items": [
                            {
                                "text": "Access Providers",
                                "glyph": "xf084@FontAwesome",
                                "itemId": "cAccessProviders"
                            },
                            {
                                "text": "Realms",
                                "glyph": "xf17d@FontAwesome",
                                "itemId": "cRealms"
                            },
                            {
                                "text": "SSIDs",
                                "glyph": "xf012@FontAwesome",
                                "itemId": "cSsids"
                            }
                        ]
                    }
                },
                {
                    "text": "NAS Devices",
                    "glyph": "xf1cb@FontAwesome",
                    "menu": {
                        "items": [
                            {
                                "text": "Dynamic RADIUS Clients",
                                "glyph": "xf239@FontAwesome",
                                "itemId": "cDynamicClients"
                            },
                            {
                                "text": "NAS Devices",
                                "glyph": "xf1cb@FontAwesome",
                                "itemId": "cNas"
                            },
                            {
                                "text": "NAS Device tags",
                                "glyph": "xf02b@FontAwesome",
                                "itemId": "cTags"
                            }
                        ]
                    }
                },
                {
                    "text": "Profiles",
                    "glyph": "xf1b3@FontAwesome",
                    "menu": {
                        "items": [
                            {
                                "text": "Profile Components",
                                "glyph": "xf12e@FontAwesome",
                                "itemId": "cProfileComponents"
                            },
                            {
                                "text": "Profiles",
                                "glyph": "xf1b3@FontAwesome",
                                "itemId": "cProfiles"
                            }
                        ]
                    }
                },
                {
                    "text": "Tools",
                    "glyph": "xf204@FontAwesome",
                    "menu": {
                        "items": [
                            {
                                "text": "RADIUS client",
                                "glyph": "xf10c@FontAwesome",
                                "itemId": "cRadiusClient"
                            },
                            {
                                "text": "Password manager",
                                "glyph": "xf023@FontAwesome",
                                "itemId": "cPassword"
                            },
                            {
                                "text": "Logfile viewer",
                                "glyph": "xf044@FontAwesome",
                                "itemId": "cLogViewer"
                            },
                            {
                                "text": "Debug output",
                                "glyph": "xf188@FontAwesome",
                                "itemId": "cDebug"
                            },
                            {
                                "text": "Translation manager",
                                "glyph": "xf0ac@FontAwesome",
                                "itemId": "cI18n"
                            },
                            {
                                "text": "Rights manager",
                                "glyph": "xf084@FontAwesome",
                                "itemId": "cAcos"
                            },
                            {
                                "text": "IP Pools",
                                "glyph": "xf1c0@FontAwesome",
                                "itemId": "cIpPools"
                            }
                        ]
                    }
                },
                {
                    "text": "Permanent Users",
                    "glyph": "xf007@FontAwesome",
                    "menu": {
                        "items": [
                            {
                                "text": "Permanent Users",
                                "glyph": "xf007@FontAwesome",
                                "itemId": "cPermanentUsers"
                            },
                            {
                                "text": "BYOD Manager",
                                "glyph": "xf10a@FontAwesome",
                                "itemId": "cDevices"
                            },
                            {
                                "text": "Top-ups",
                                "glyph": "xf0f4@FontAwesome",
                                "itemId": "cTopUps"
                            }
                        ]
                    }
                },
                {
                    "text": "Vouchers",
                    "glyph": "xf145@FontAwesome",
                    "itemId": "cVouchers"
                },
                {
                    "text": "Dynamic login pages",
                    "glyph": "xf0d0@FontAwesome",
                    "itemId": "cDynamicDetails"
                },
                {
                    "text": "Activity monitor",
                    "glyph": "xf0e7@FontAwesome",
                    "itemId": "cActivityMonitor"
                },
                {
                    "xtype": "menuseparator"
                },
                {
                    "text": "APdesk",
                    "glyph": "xf0c2@FontAwesome",
                    "itemId": "cAccessPoints"
                },
                {
                    "text": "MESHdesk",
                    "glyph": "xf20e@FontAwesome",
                    "itemId": "cMeshes"
                }
            ],
            "user": {
                "id": "44",
                "username": "****",
                "group": "Administrators",
                "cls": "admin"
            },
            "urlWallpaper": "\/rd\/resources\/images\/wallpapers\/1.jpg",
            "shortcuts": []
        },
        "success": true
    }
        log (ext-all-rtl-debug.js:8735)
        raise (ext-all-rtl-debug.js:2365)
        raise (ext-all-rtl-debug.js:2450)
        decode (ext-all-rtl-debug.js:49348)
        handleResponse (ext-all-rtl-debug.js:151196)
        processResponse (ext-all-rtl-debug.js:150733)
        onSuccess (ext-all-rtl-debug.js:151159)
        callback (ext-all-rtl-debug.js:8174)
        onComplete (ext-all-rtl-debug.js:24674)
        onStateChange (ext-all-rtl-debug.js:24631)
        (anonymous function) (ext-all-rtl-debug.js:6404)
    
    [Error] TypeError: undefined is not an object (evaluating 'action.result.message.message')
    formFail (Application.js:228)
    callback (ext-all-rtl-debug.js:8174)
    afterAction (ext-all-rtl-debug.js:158344)
    onSuccess (ext-all-rtl-debug.js:151168)
    callback (ext-all-rtl-debug.js:8174)
    onComplete (ext-all-rtl-debug.js:24674)
    onStateChange (ext-all-rtl-debug.js:24631)
    (anonymous function) (ext-all-rtl-debug.js:6404)
    
     
  • Dirk van der Walt

    Hi,

    Probably a bit of both that causes the hassles.

    I started with a VM built of Ubuntu 16.04 a while back and also got to this point.

    Check if you can silence the CakePHP app (rd_cake) in terms of debug info :

    Change

    */
        Configure::write('debug', 2);
        //Configure::write('debug', 0);
    
    /**
    

    To

    */
        //Configure::write('debug', 2);
        Configure::write('debug', 0);
    
    /**
    

    in /usr/share/nginx/html/cake2/rd_cake/Config/core.php

    Let us know if that helps

     

    Last edit: Dirk van der Walt 2016-09-15
  • Justin F. Hallett

    very nice, that fixed the login issue and it looks like over all things are working. There are some oddities in the layout but mostly just visual at this point. I'll keep trying to use it like this for a bit and see if I run into anything else. I'll update here if I find any other issues with it.

    EDIT: the big visual thing I see right off the bat is you get 2 title bars in windows, the first one with the buttons and icon, then a second one under that with a different colour, larger icon and the actual title of the window in it. Again not a big deal but thought maybe I shoudl mention what visual issue I was talking about ;) See example

    EDIT2: the visiual issue isn't one at all looks liek it just changed in r1891, so disregard please.

     

    Last edit: Justin F. Hallett 2016-09-15
  • Justin F. Hallett

    not sure if this is php7 related, going to try it on php5, I just upgraded from r1860 to r1891 recently so might be that as well. When I select BYOD the window is empty and I see and error in the console

    [Error] Failed to load resource: the server responded with a status of 500 (Internal Server Error) (index.json, line 0)
    

    The response is

    {
        "name": "An Internal Error Has Occurred.",
        "message": "An Internal Error Has Occurred.",
        "url": "\/cake2\/rd_cake\/devices\/index.json?_dc=1473963775003&amp;page=1&amp;start=0&amp;limit=100&amp;sort=user&amp;dir=ASC&amp;token=552d538e-0d70-4c33-8658-713ba9baf6a0&amp;sel_language=4_4"
    }
    

    EDIT: not php7, seems like it's just broken in the r1891 or I missed a db upgrade?

    EDIT2: Looking at the error.log I see this

    2016-09-15 12:42:00 Warning: Warning (2): Declaration of User::afterSave($created) should be compatible with Model::afterSave($created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/User.php, line 0]
    Trace:
    include - CORE/Cake/Core/App.php, line 547
    App::load() - CORE/Cake/Core/App.php, line 547
    spl_autoload_call - [internal], line ??
    class_exists - [internal], line ??
    ClassRegistry::init() - CORE/Cake/Utility/ClassRegistry.php, line 146
    TokenAuthComponent::find_token_owner() - APP/Controller/Component/TokenAuthComponent.php, line 51
    TokenAuthComponent::check_if_valid() - APP/Controller/Component/TokenAuthComponent.php, line 31
    AaComponent::user_for_token() - APP/Controller/Component/AaComponent.php, line 16
    DevicesController::menu_for_grid() - APP/Controller/DevicesController.php, line 1133
    ReflectionMethod::invokeArgs() - [internal], line ??
    Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
    Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
    Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
    [main] - APP/webroot/index.php, line 92
    
    2016-09-15 12:42:00 Warning: Warning (2): Declaration of LimitBehavior::beforeSave($model) should be compatible with ModelBehavior::beforeSave(Model $model, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Behavior/LimitBehavior.php, line 0]
    Trace:
    include - CORE/Cake/Core/App.php, line 547
    App::load() - CORE/Cake/Core/App.php, line 547
    spl_autoload_call - [internal], line ??
    class_exists - [internal], line ??
    BehaviorCollection::load() - CORE/Cake/Model/BehaviorCollection.php, line 120
    BehaviorCollection::init() - CORE/Cake/Model/BehaviorCollection.php, line 66
    Model::__construct() - CORE/Cake/Model/Model.php, line 774
    ReflectionClass::newInstance() - [internal], line ??
    ClassRegistry::init() - CORE/Cake/Utility/ClassRegistry.php, line 169
    TokenAuthComponent::find_token_owner() - APP/Controller/Component/TokenAuthComponent.php, line 51
    TokenAuthComponent::check_if_valid() - APP/Controller/Component/TokenAuthComponent.php, line 31
    AaComponent::user_for_token() - APP/Controller/Component/AaComponent.php, line 16
    DevicesController::menu_for_grid() - APP/Controller/DevicesController.php, line 1133
    ReflectionMethod::invokeArgs() - [internal], line ??
    Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
    Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
    Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
    [main] - APP/webroot/index.php, line 92
    
    2016-09-15 12:42:00 Warning: Warning (2): Declaration of User::afterSave($created) should be compatible with Model::afterSave($created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/User.php, line 0]
    Trace:
    include - CORE/Cake/Core/App.php, line 547
    App::load() - CORE/Cake/Core/App.php, line 547
    spl_autoload_call - [internal], line ??
    class_exists - [internal], line ??
    ClassRegistry::init() - CORE/Cake/Utility/ClassRegistry.php, line 146
    TokenAuthComponent::find_token_owner() - APP/Controller/Component/TokenAuthComponent.php, line 51
    TokenAuthComponent::check_if_valid() - APP/Controller/Component/TokenAuthComponent.php, line 31
    AaComponent::user_for_token() - APP/Controller/Component/AaComponent.php, line 16
    AppController::_ap_right_check() - APP/Controller/AppController.php, line 107
    DevicesController::index() - APP/Controller/DevicesController.php, line 111
    ReflectionMethod::invokeArgs() - [internal], line ??
    Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
    Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
    Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
    [main] - APP/webroot/index.php, line 92
    
    2016-09-15 12:42:00 Warning: Warning (2): Declaration of LimitBehavior::beforeSave($model) should be compatible with ModelBehavior::beforeSave(Model $model, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Behavior/LimitBehavior.php, line 0]
    Trace:
    include - CORE/Cake/Core/App.php, line 547
    App::load() - CORE/Cake/Core/App.php, line 547
    spl_autoload_call - [internal], line ??
    class_exists - [internal], line ??
    BehaviorCollection::load() - CORE/Cake/Model/BehaviorCollection.php, line 120
    BehaviorCollection::init() - CORE/Cake/Model/BehaviorCollection.php, line 66
    Model::__construct() - CORE/Cake/Model/Model.php, line 774
    ReflectionClass::newInstance() - [internal], line ??
    ClassRegistry::init() - CORE/Cake/Utility/ClassRegistry.php, line 169
    TokenAuthComponent::find_token_owner() - APP/Controller/Component/TokenAuthComponent.php, line 51
    TokenAuthComponent::check_if_valid() - APP/Controller/Component/TokenAuthComponent.php, line 31
    AaComponent::user_for_token() - APP/Controller/Component/AaComponent.php, line 16
    AppController::_ap_right_check() - APP/Controller/AppController.php, line 107
    DevicesController::index() - APP/Controller/DevicesController.php, line 111
    ReflectionMethod::invokeArgs() - [internal], line ??
    Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
    Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
    Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
    [main] - APP/webroot/index.php, line 92
    
    2016-09-15 12:42:00 Warning: Warning (2): Declaration of Device::afterSave($created) should be compatible with Model::afterSave($created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Device.php, line 0]
    Trace:
    include - CORE/Cake/Core/App.php, line 547
    App::load() - CORE/Cake/Core/App.php, line 547
    spl_autoload_call - [internal], line ??
    class_exists - [internal], line ??
    ClassRegistry::init() - CORE/Cake/Utility/ClassRegistry.php, line 146
    Controller::loadModel() - CORE/Cake/Controller/Controller.php, line 741
    Controller::__isset() - CORE/Cake/Controller/Controller.php, line 368
    Controller::__get() - CORE/Cake/Controller/Controller.php, line 406
    DevicesController::index() - APP/Controller/DevicesController.php, line 133
    ReflectionMethod::invokeArgs() - [internal], line ??
    Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
    Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
    Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
    [main] - APP/webroot/index.php, line 92
    
    2016-09-15 12:42:00 Warning: Warning (2): Declaration of PermanentUser::afterSave($created) should be compatible with Model::afterSave($created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/PermanentUser.php, line 0]
    Trace:
    include - CORE/Cake/Core/App.php, line 547
    App::load() - CORE/Cake/Core/App.php, line 547
    spl_autoload_call - [internal], line ??
    class_exists - [internal], line ??
    ClassRegistry::init() - CORE/Cake/Utility/ClassRegistry.php, line 146
    Model::_constructLinkedModel() - CORE/Cake/Model/Model.php, line 1077
    Model::__isset() - CORE/Cake/Model/Model.php, line 886
    ContainableBehavior::containments() - CORE/Cake/Model/Behavior/ContainableBehavior.php, line 340
    ContainableBehavior::beforeFind() - CORE/Cake/Model/Behavior/ContainableBehavior.php, line 123
    ObjectCollection::trigger() - CORE/Cake/Utility/ObjectCollection.php, line 128
    CakeEventManager::dispatch() - CORE/Cake/Event/CakeEventManager.php, line 243
    Model::buildQuery() - CORE/Cake/Model/Model.php, line 3084
    Model::find() - CORE/Cake/Model/Model.php, line 2998
    DevicesController::index() - APP/Controller/DevicesController.php, line 133
    ReflectionMethod::invokeArgs() - [internal], line ??
    Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
    Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
    Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
    [main] - APP/webroot/index.php, line 92
    
    2016-09-15 12:42:00 Warning: Warning (2): Declaration of DeviceNote::beforeDelete() should be compatible with Model::beforeDelete($cascade = true) in [/var/www/cakephp-2.8.8/rd_cake/Model/DeviceNote.php, line 0]
    Trace:
    include - CORE/Cake/Core/App.php, line 547
    App::load() - CORE/Cake/Core/App.php, line 547
    spl_autoload_call - [internal], line ??
    class_exists - [internal], line ??
    ClassRegistry::init() - CORE/Cake/Utility/ClassRegistry.php, line 146
    Model::_constructLinkedModel() - CORE/Cake/Model/Model.php, line 1077
    Model::__isset() - CORE/Cake/Model/Model.php, line 886
    ContainableBehavior::containments() - CORE/Cake/Model/Behavior/ContainableBehavior.php, line 340
    ContainableBehavior::beforeFind() - CORE/Cake/Model/Behavior/ContainableBehavior.php, line 123
    ObjectCollection::trigger() - CORE/Cake/Utility/ObjectCollection.php, line 128
    CakeEventManager::dispatch() - CORE/Cake/Event/CakeEventManager.php, line 243
    Model::buildQuery() - CORE/Cake/Model/Model.php, line 3084
    Model::find() - CORE/Cake/Model/Model.php, line 2998
    DevicesController::index() - APP/Controller/DevicesController.php, line 133
    ReflectionMethod::invokeArgs() - [internal], line ??
    Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
    Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
    Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
    [main] - APP/webroot/index.php, line 92
    
    2016-09-15 12:42:00 Error: [PDOException] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'User.username' in 'order clause'
    Request URL: /cake2/rd_cake/devices/index.json?_dc=1473964920912&page=1&start=0&limit=100&sort=user&dir=ASC&token=552d538e-0d70-4c33-8658-713ba9baf6a0&sel_language=4_4
    Stack Trace:
    #0 /var/www/cakephp-2.8.8/lib/Cake/Model/Datasource/DboSource.php(468): PDOStatement->execute(Array)
    #1 /var/www/cakephp-2.8.8/lib/Cake/Model/Datasource/DboSource.php(434): DboSource->_execute('SELECT `Device`...', Array)
    #2 /var/www/cakephp-2.8.8/lib/Cake/Model/Datasource/DboSource.php(671): DboSource->execute('SELECT `Device`...', Array, Array)
    #3 /var/www/cakephp-2.8.8/lib/Cake/Model/Datasource/DboSource.php(1120): DboSource->fetchAll('SELECT `Device`...', Array)
    #4 /var/www/cakephp-2.8.8/lib/Cake/Model/Model.php(3031): DboSource->read(Object(Device), Array)
    #5 /var/www/cakephp-2.8.8/lib/Cake/Model/Model.php(3003): Model->_readDataSource('all', Array)
    #6 /var/www/cakephp-2.8.8/rd_cake/Controller/DevicesController.php(134): Model->find('all', Array)
    #7 [internal function]: DevicesController->index()
    #8 /var/www/cakephp-2.8.8/lib/Cake/Controller/Controller.php(491): ReflectionMethod->invokeArgs(Object(DevicesController), Array)
    #9 /var/www/cakephp-2.8.8/lib/Cake/Routing/Dispatcher.php(193): Controller->invokeAction(Object(CakeRequest))
    #10 /var/www/cakephp-2.8.8/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(DevicesController), Object(CakeRequest))
    #11 /var/www/cakephp-2.8.8/rd_cake/webroot/index.php(92): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
    #12 {main}
    2016-09-15 12:42:01 Warning: Warning (2): Declaration of User::afterSave($created) should be compatible with Model::afterSave($created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/User.php, line 0]
    Trace:
    include - CORE/Cake/Core/App.php, line 547
    App::load() - CORE/Cake/Core/App.php, line 547
    spl_autoload_call - [internal], line ??
    class_exists - [internal], line ??
    ClassRegistry::init() - CORE/Cake/Utility/ClassRegistry.php, line 146
    TokenAuthComponent::find_token_owner() - APP/Controller/Component/TokenAuthComponent.php, line 51
    TokenAuthComponent::check_if_valid() - APP/Controller/Component/TokenAuthComponent.php, line 31
    AaComponent::user_for_token() - APP/Controller/Component/AaComponent.php, line 16
    AppController::_ap_right_check() - APP/Controller/AppController.php, line 107
    DevicesController::index() - APP/Controller/DevicesController.php, line 111
    ReflectionMethod::invokeArgs() - [internal], line ??
    Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
    Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
    Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
    [main] - APP/webroot/index.php, line 92
    
    2016-09-15 12:42:01 Warning: Warning (2): Declaration of LimitBehavior::beforeSave($model) should be compatible with ModelBehavior::beforeSave(Model $model, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Behavior/LimitBehavior.php, line 0]
    Trace:
    include - CORE/Cake/Core/App.php, line 547
    App::load() - CORE/Cake/Core/App.php, line 547
    spl_autoload_call - [internal], line ??
    class_exists - [internal], line ??
    BehaviorCollection::load() - CORE/Cake/Model/BehaviorCollection.php, line 120
    BehaviorCollection::init() - CORE/Cake/Model/BehaviorCollection.php, line 66
    Model::__construct() - CORE/Cake/Model/Model.php, line 774
    ReflectionClass::newInstance() - [internal], line ??
    ClassRegistry::init() - CORE/Cake/Utility/ClassRegistry.php, line 169
    TokenAuthComponent::find_token_owner() - APP/Controller/Component/TokenAuthComponent.php, line 51
    TokenAuthComponent::check_if_valid() - APP/Controller/Component/TokenAuthComponent.php, line 31
    AaComponent::user_for_token() - APP/Controller/Component/AaComponent.php, line 16
    AppController::_ap_right_check() - APP/Controller/AppController.php, line 107
    DevicesController::index() - APP/Controller/DevicesController.php, line 111
    ReflectionMethod::invokeArgs() - [internal], line ??
    Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
    Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
    Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
    [main] - APP/webroot/index.php, line 92
    
    2016-09-15 12:42:01 Warning: Warning (2): Declaration of Device::afterSave($created) should be compatible with Model::afterSave($created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Device.php, line 0]
    Trace:
    include - CORE/Cake/Core/App.php, line 547
    App::load() - CORE/Cake/Core/App.php, line 547
    spl_autoload_call - [internal], line ??
    class_exists - [internal], line ??
    ClassRegistry::init() - CORE/Cake/Utility/ClassRegistry.php, line 146
    Controller::loadModel() - CORE/Cake/Controller/Controller.php, line 741
    Controller::__isset() - CORE/Cake/Controller/Controller.php, line 368
    Controller::__get() - CORE/Cake/Controller/Controller.php, line 406
    DevicesController::index() - APP/Controller/DevicesController.php, line 133
    ReflectionMethod::invokeArgs() - [internal], line ??
    Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
    Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
    Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
    [main] - APP/webroot/index.php, line 92
    
    2016-09-15 12:42:01 Warning: Warning (2): Declaration of PermanentUser::afterSave($created) should be compatible with Model::afterSave($created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/PermanentUser.php, line 0]
    Trace:
    include - CORE/Cake/Core/App.php, line 547
    App::load() - CORE/Cake/Core/App.php, line 547
    spl_autoload_call - [internal], line ??
    class_exists - [internal], line ??
    ClassRegistry::init() - CORE/Cake/Utility/ClassRegistry.php, line 146
    Model::_constructLinkedModel() - CORE/Cake/Model/Model.php, line 1077
    Model::__isset() - CORE/Cake/Model/Model.php, line 886
    ContainableBehavior::containments() - CORE/Cake/Model/Behavior/ContainableBehavior.php, line 340
    ContainableBehavior::beforeFind() - CORE/Cake/Model/Behavior/ContainableBehavior.php, line 123
    ObjectCollection::trigger() - CORE/Cake/Utility/ObjectCollection.php, line 128
    CakeEventManager::dispatch() - CORE/Cake/Event/CakeEventManager.php, line 243
    Model::buildQuery() - CORE/Cake/Model/Model.php, line 3084
    Model::find() - CORE/Cake/Model/Model.php, line 2998
    DevicesController::index() - APP/Controller/DevicesController.php, line 133
    ReflectionMethod::invokeArgs() - [internal], line ??
    Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
    Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
    Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
    [main] - APP/webroot/index.php, line 92
    
    2016-09-15 12:42:01 Warning: Warning (2): Declaration of DeviceNote::beforeDelete() should be compatible with Model::beforeDelete($cascade = true) in [/var/www/cakephp-2.8.8/rd_cake/Model/DeviceNote.php, line 0]
    Trace:
    include - CORE/Cake/Core/App.php, line 547
    App::load() - CORE/Cake/Core/App.php, line 547
    spl_autoload_call - [internal], line ??
    class_exists - [internal], line ??
    ClassRegistry::init() - CORE/Cake/Utility/ClassRegistry.php, line 146
    Model::_constructLinkedModel() - CORE/Cake/Model/Model.php, line 1077
    Model::__isset() - CORE/Cake/Model/Model.php, line 886
    ContainableBehavior::containments() - CORE/Cake/Model/Behavior/ContainableBehavior.php, line 340
    ContainableBehavior::beforeFind() - CORE/Cake/Model/Behavior/ContainableBehavior.php, line 123
    ObjectCollection::trigger() - CORE/Cake/Utility/ObjectCollection.php, line 128
    CakeEventManager::dispatch() - CORE/Cake/Event/CakeEventManager.php, line 243
    Model::buildQuery() - CORE/Cake/Model/Model.php, line 3084
    Model::find() - CORE/Cake/Model/Model.php, line 2998
    DevicesController::index() - APP/Controller/DevicesController.php, line 133
    ReflectionMethod::invokeArgs() - [internal], line ??
    Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
    Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
    Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
    [main] - APP/webroot/index.php, line 92
    
    2016-09-15 12:42:01 Error: [PDOException] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'User.username' in 'order clause'
    Request URL: /cake2/rd_cake/devices/index.json?_dc=1473964921023&page=1&start=0&limit=100&sort=user&dir=ASC&token=552d538e-0d70-4c33-8658-713ba9baf6a0&sel_language=4_4
    Stack Trace:
    #0 /var/www/cakephp-2.8.8/lib/Cake/Model/Datasource/DboSource.php(468): PDOStatement->execute(Array)
    #1 /var/www/cakephp-2.8.8/lib/Cake/Model/Datasource/DboSource.php(434): DboSource->_execute('SELECT `Device`...', Array)
    #2 /var/www/cakephp-2.8.8/lib/Cake/Model/Datasource/DboSource.php(671): DboSource->execute('SELECT `Device`...', Array, Array)
    #3 /var/www/cakephp-2.8.8/lib/Cake/Model/Datasource/DboSource.php(1120): DboSource->fetchAll('SELECT `Device`...', Array)
    #4 /var/www/cakephp-2.8.8/lib/Cake/Model/Model.php(3031): DboSource->read(Object(Device), Array)
    #5 /var/www/cakephp-2.8.8/lib/Cake/Model/Model.php(3003): Model->_readDataSource('all', Array)
    #6 /var/www/cakephp-2.8.8/rd_cake/Controller/DevicesController.php(134): Model->find('all', Array)
    #7 [internal function]: DevicesController->index()
    #8 /var/www/cakephp-2.8.8/lib/Cake/Controller/Controller.php(491): ReflectionMethod->invokeArgs(Object(DevicesController), Array)
    #9 /var/www/cakephp-2.8.8/lib/Cake/Routing/Dispatcher.php(193): Controller->invokeAction(Object(CakeRequest))
    #10 /var/www/cakephp-2.8.8/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(DevicesController), Object(CakeRequest))
    #11 /var/www/cakephp-2.8.8/rd_cake/webroot/index.php(92): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
    #12 {main}
    2016-09-15 12:42:01 Warning: Declaration of Na::beforeDelete() should be compatible with Model::beforeDelete($cascade = true) in [/var/www/cakephp-2.8.8/rd_cake/Model/Na.php, line 8]
    2016-09-15 12:42:01 Warning: Declaration of LimitBehavior::beforeSave($model) should be compatible with ModelBehavior::beforeSave(Model $model, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Behavior/LimitBehavior.php, line 308]
    2016-09-15 12:42:01 Warning: Declaration of Voucher::beforeSave() should be compatible with Model::beforeSave($options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Voucher.php, line 374]
    2016-09-15 12:42:01 Warning: Declaration of Voucher::afterSave($created) should be compatible with Model::afterSave($created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Voucher.php, line 374]
    2016-09-15 12:42:01 Warning: Declaration of LimitBehavior::beforeSave($model) should be compatible with ModelBehavior::beforeSave(Model $model, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Behavior/LimitBehavior.php, line 308]
    2016-09-15 12:42:01 Warning: Declaration of PermanentUser::afterSave($created) should be compatible with Model::afterSave($created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/PermanentUser.php, line 359]
    2016-09-15 12:42:01 Warning: Declaration of Device::afterSave($created) should be compatible with Model::afterSave($created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Device.php, line 199]
    2016-09-15 12:42:01 Warning: Declaration of Na::beforeDelete() should be compatible with Model::beforeDelete($cascade = true) in [/var/www/cakephp-2.8.8/rd_cake/Model/Na.php, line 109]
    2016-09-15 12:42:01 Warning: Declaration of LimitBehavior::beforeSave($model) should be compatible with ModelBehavior::beforeSave(Model $model, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Behavior/LimitBehavior.php, line 308]
    2016-09-15 12:42:01 Warning: Division by zero in [/var/www/cakephp-2.8.8/rd_cake/Console/Command/AccountingShell.php, line 230]
    2016-09-15 12:42:01 Warning: Declaration of User::afterSave($created) should be compatible with Model::afterSave($created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/User.php, line 174]
    2016-09-15 12:42:01 Warning: Declaration of MyAclBehavior::afterSave($model, $created) should be compatible with AclBehavior::afterSave(Model $model, $created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Behavior/MyAclBehavior.php, line 41]
    2016-09-15 12:43:01 Warning: Declaration of Na::beforeDelete() should be compatible with Model::beforeDelete($cascade = true) in [/var/www/cakephp-2.8.8/rd_cake/Model/Na.php, line 8]
    2016-09-15 12:43:01 Warning: Declaration of Voucher::beforeSave() should be compatible with Model::beforeSave($options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Voucher.php, line 374]
    2016-09-15 12:43:01 Warning: Declaration of Voucher::afterSave($created) should be compatible with Model::afterSave($created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Voucher.php, line 374]
    2016-09-15 12:43:01 Warning: Declaration of LimitBehavior::beforeSave($model) should be compatible with ModelBehavior::beforeSave(Model $model, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Behavior/LimitBehavior.php, line 308]
    2016-09-15 12:43:01 Warning: Declaration of LimitBehavior::beforeSave($model) should be compatible with ModelBehavior::beforeSave(Model $model, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Behavior/LimitBehavior.php, line 308]
    2016-09-15 12:43:01 Warning: Declaration of PermanentUser::afterSave($created) should be compatible with Model::afterSave($created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/PermanentUser.php, line 359]
    2016-09-15 12:43:01 Warning: Declaration of Device::afterSave($created) should be compatible with Model::afterSave($created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Device.php, line 199]
    2016-09-15 12:43:01 Warning: Declaration of Na::beforeDelete() should be compatible with Model::beforeDelete($cascade = true) in [/var/www/cakephp-2.8.8/rd_cake/Model/Na.php, line 109]
    2016-09-15 12:43:01 Warning: Declaration of LimitBehavior::beforeSave($model) should be compatible with ModelBehavior::beforeSave(Model $model, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Behavior/LimitBehavior.php, line 308]
    2016-09-15 12:43:01 Warning: Division by zero in [/var/www/cakephp-2.8.8/rd_cake/Console/Command/AccountingShell.php, line 230]
    2016-09-15 12:43:01 Warning: Declaration of User::afterSave($created) should be compatible with Model::afterSave($created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/User.php, line 174]
    2016-09-15 12:43:01 Warning: Declaration of MyAclBehavior::afterSave($model, $created) should be compatible with AclBehavior::afterSave(Model $model, $created, $options = Array) in [/var/www/cakephp-2.8.8/rd_cake/Model/Behavior/MyAclBehavior.php, line 41]
    
     

    Last edit: Justin F. Hallett 2016-09-15
  • Dirk van der Walt

    Lots of warnings!
    I guess PHP7 is forcing us to code in an extra proper way :-D

    The error though us on the order clause of the byod applet. Try and order by any of the other columns e.g. the MAC Address instead of the owner.

    Perhaps that will bring the list back to be displayed.

     
  • Justin F. Hallett

    Does not help I've clicked every col to see, also i've notice that in my activity monitor all rows have lost the username as well and now shows the macaddress without [-.:] as the username. Very odd still debugging. I noticed the sort issue as well, was trying to figure out why User.username would be missing :\

    This is what I see when I click on MAC Address with the warnings removed

    2016-09-15 13:00:53 Error: [PDOException] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'User.data_used' in 'field list'
    Request URL: /cake2/rd_cake/devices/index.json?_dc=1473966052965&page=1&start=0&limit=100&sort=name&dir=ASC&token=552d538e-0d70-4c33-8658-713ba9baf6a0&sel_language=4_4
    Stack Trace:
    #0 /var/www/cakephp-2.8.8/lib/Cake/Model/Datasource/DboSource.php(468): PDOStatement->execute(Array)
    #1 /var/www/cakephp-2.8.8/lib/Cake/Model/Datasource/DboSource.php(434): DboSource->_execute('SELECT `Realm`....', Array)
    #2 /var/www/cakephp-2.8.8/lib/Cake/Model/Datasource/DboSource.php(671): DboSource->execute('SELECT `Realm`....', Array, Array)
    #3 /var/www/cakephp-2.8.8/lib/Cake/Model/Datasource/DboSource.php(1120): DboSource->fetchAll('SELECT `Realm`....', Array)
    #4 /var/www/cakephp-2.8.8/lib/Cake/Model/Model.php(3031): DboSource->read(Object(Realm), Array)
    #5 /var/www/cakephp-2.8.8/lib/Cake/Model/Model.php(3003): Model->_readDataSource('first', Array)
    #6 /var/www/cakephp-2.8.8/lib/Cake/Model/Datasource/DboSource.php(602): Model->find('first', Array)
    #7 /var/www/cakephp-2.8.8/lib/Cake/Model/Model.php(827): DboSource->query('findByName', Array, Object(Realm))
    #8 /var/www/cakephp-2.8.8/rd_cake/Controller/DevicesController.php(177): Model->__call('findByName', Array)
    #9 [internal function]: DevicesController->index()
    #10 /var/www/cakephp-2.8.8/lib/Cake/Controller/Controller.php(491): ReflectionMethod->invokeArgs(Object(DevicesController), Array)
    #11 /var/www/cakephp-2.8.8/lib/Cake/Routing/Dispatcher.php(193): Controller->invokeAction(Object(CakeRequest))
    #12 /var/www/cakephp-2.8.8/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(DevicesController), Object(CakeRequest))
    #13 /var/www/cakephp-2.8.8/rd_cake/webroot/index.php(92): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
    #14 {main}
    

    Is there a way to see the SQL call so I can run it by hand?

    EDIT: Okay I ran a few of the sqls to add the cols back in that rd_new_permanent_users_after_migration.sql removes and I can log back in now and my BYOD works now if I filter by MAC Address. Not user though.

    EDIT2: got BYOD working 100% now, was an issue in the new policy.conf provided in r1891 I seem to be 100% now minus all the warnings and that I have to turn off debug like you suggested, sorry about the noise in this thread.

     

    Last edit: Justin F. Hallett 2016-09-15
  • Justin F. Hallett

    Also just so you know in DeviceController.php for that original sort issue, i changed

                if($this->request->query['sort'] == 'user'){
                    $sort = 'User.username';
    

    to

                if($this->request->query['sort'] == 'user'){
                    $sort = 'PermanentUser.username';
    

    And now sorting by user in BYOD works as it should.

    As for my changes in policy.conf I need to allow xxxxx-xxxxx for username and callingstation as some of my gear sends it in that format, specifically my cisco WLC and my DELL n3k.

    policy.conf diff

    --- policy.conf.orig
    +++ policy.conf.working
    @@ -24,7 +24,7 @@
        # Rewrite called station id attribute into a standard format.
        #
        rewrite_calling_station_id {
    -               if(request:Calling-Station-Id =~ /([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})/i){
    +               if(request:Calling-Station-Id =~ /([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:.]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:.]?([0-9a-f]{2})[-:]?([0-9a-f]{2})/i){
                        update request {
                                Calling-Station-Id := "%{1}-%{2}-%{3}-%{4}-%{5}-%{6}"
                        }
    @@ -369,7 +369,7 @@
         RADIUSdesk_main {
    
             # Check if MAC username and set the MAC username to the convention AA-BB-CC-DD-12...
    -        if(request:User-Name =~ /^([0-9a-f]{2})[-:]+([0-9a-f]{2})[-:]+([0-9a-f]{2})[-:]+([0-9a-f]{2})[-:]+([0-9a-f]{2})[-:]+([0-9a-f]{2})$/i){
    +        if(request:User-Name =~ /^([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:.]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:.]?([0-9a-f]{2})[-:]?([0-9a-f]{2})$/i){
                 update request {
                     User-Name := "%{1}-%{2}-%{3}-%{4}-%{5}-%{6}"
                 }
    @@ -583,7 +583,7 @@
            rewrite.calling_station_id
    
             #See if we it is perhaps a device and if we then need to change to the username
    -        if(request:User-Name =~ /^([0-9a-f]{2})[-:]+([0-9a-f]{2})[-:]+([0-9a-f]{2})[-:]+([0-9a-f]{2})[-:]+([0-9a-f]{2})[-:]+([0-9a-f]{2})$/i){
    +        if(request:User-Name =~ /^([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:.]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:.]?([0-9a-f]{2})[-:]?([0-9a-f]{2})$/i){
             #if(request:User-Name =~ /([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})/i){
    
                 update control {
    

    just incase you were curious and wanted to add these. Otherwise at least I logged it some place for myself ;)

     
  • Justin F. Hallett

    other then those 2 changes everythign seems good on php7. No other issues thus far.

    BTW is the https://sourceforge.net/p/radiusdesk/code/ broken I used to be able to see the svn from there as of this weekend I can no longer see it.

     
  • Justin F. Hallett

    Okay so not over for PHP7 just yet, here is a new error when trying to add a new perm user

    2016-09-27 14:23:08 Error: Fatal Error (64): Cannot use 'String' as class name as it is reserved in [/var/www/cakephp-2.8.8/lib/Cake/Utility/String.php, line 26]
    2016-09-27 14:23:08 Error: [InternalErrorException] Internal Server Error
    Request URL: /cake2/rd_cake/permanent_users/add.json
    Stack Trace:
    #0 /var/www/cakephp-2.8.8/lib/Cake/Error/ErrorHandler.php(213): ErrorHandler::handleFatalError(64, 'Cannot use 'Str...', '/var/www/cakeph...', 26)
    #1 /var/www/cakephp-2.8.8/lib/Cake/Core/App.php(970): ErrorHandler::handleError(64, 'Cannot use 'Str...', '/var/www/cakeph...', 26, Array)
    #2 /var/www/cakephp-2.8.8/lib/Cake/Core/App.php(943): App::_checkFatalError()
    #3 [internal function]: App::shutdown()
    #4 {main}
    
     
  • Justin F. Hallett

    Now that I post it, it looks phpcake issue, has phpcake 3.x been tested yet? can I try that branch?

     

    Last edit: Justin F. Hallett 2016-09-27
  • Justin F. Hallett

    I really need to figure out how to add a user, any ideas I can try here?

    I've opened an issue with cakephp here https://github.com/cakephp/cakephp/issues/9559 but was wondering if you had an ideas while I waited for them. Maybe not requiring or using 'String' class from cakephp? I'm not familliar with cakephp that much so it's hard for me to keep digging.

     

    Last edit: Justin F. Hallett 2016-10-03
  • Justin F. Hallett

    This is from teh cakephp team

    The String class has already been deprecated and CakeText is provided instead to avoid error on PHP 7. There are no usages of String anymore in core itself, so update your app code to use CakeText instead of String.

    Object has also been replaced with CakeObject.

     
  • Justin F. Hallett

    I haven't tested yet but I assuem it's the calls to

    App::uses('String', 'Utility');
    

    in Model/User.php and Model/PermanentUser.php ?

    EDIT:
    Tested it, I changed

    Model/User.php and Model/PermanentUser.php

    if((isset($this->data['PermanentUser']['token']))&&($this->data['PermanentUser']['token']=='')){
        App::uses('String', 'Utility');
        $this->data['PermanentUser']['token'] = String::uuid();
    }else{ //If it is not set at all
        App::uses('String', 'Utility');
        $this->data['PermanentUser']['token'] = String::uuid();
    }
    

    to

    if((isset($this->data['PermanentUser']['token']))&&($this->data['PermanentUser']['token']=='')){
        App::uses('CakeText', 'Utility');
        $this->data['PermanentUser']['token'] = CakeText::uuid();
    }else{ //If it is not set at all
        App::uses('CakeText', 'Utility');
        $this->data['PermanentUser']['token'] = CakeText::uuid();
    }
    

    And it works now!!

     

    Last edit: Justin F. Hallett 2016-10-03
  • Justin F. Hallett

    Post awaiting moderation.
  • Justin F. Hallett

    Okay I can not figure out why it's bailing with the new update, it looks like it loops through a bunch of them and all have read, then it hits one that returns on update and delete, but I stepped through the code and it's all returning from line 1594, so how read isn't there is just beyond me. The function returns an array with all 3, but when it's checks it which is directly after it, it's not there :. I'm at a loss but curently my RD is unsuable which is bad cause I only use BYOD :\

    EDIT

    I added $action_flags['read'] = false; to line 174 just to make sure it's defined, and it seems to work now, I changed it to true, and ran it and got 69 records, changed it back to false (which is what the default shoudl be) and got 69 records, so I'm not sure why it was failing at all but seems safe to have it set to false as a default.

     

    Last edit: Justin F. Hallett 2016-10-24

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.