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)
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.
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&page=1&start=0&limit=100&sort=user&dir=ASC&token=552d538e-0d70-4c33-8658-713ba9baf6a0&sel_language=4_4"
}
EDIT: not php7, seems like it's just broken in the r1891 or I missed a db upgrade?
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
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 ;)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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)
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
To
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
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
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
The response is
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
Last edit: Justin F. Hallett 2016-09-15
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.
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
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
Also just so you know in DeviceController.php for that original sort issue, i changed
to
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
just incase you were curious and wanted to add these. Otherwise at least I logged it some place for myself ;)
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.
Okay so not over for PHP7 just yet, here is a new error when trying to add a new perm user
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
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
This is from teh cakephp team
I haven't tested yet but I assuem it's the calls to
in Model/User.php and Model/PermanentUser.php ?
EDIT:
Tested it, I changed
Model/User.php and Model/PermanentUser.php
to
And it works now!!
Last edit: Justin F. Hallett 2016-10-03
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