Giter VIP home page Giter VIP logo

Comments (55)

MiguelVis avatar MiguelVis commented on July 25, 2024 1

@m00zi

After some checking, I have determined you are running an old version of Daloradius.

The GLOBAL part in your query is now SESSION, allowing non ROOT users to change the sql mode for the application:

$dbSocket->query("SET SESSION sql_mode = '';");

Please, download the master branch located here at GitHub, and make the changes you need to the Daloradius configuration file library/daloradius.conf.php.

DO NOT SUBSTITUTE it by your current configuration file, because there are new configuration variables.

All should go ok.

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

Re-opening for issue to be pinned at the top for everyone to consult

from daloradius.

Riply avatar Riply commented on July 25, 2024

Thanks for this man.
I'm still getting the error, but at least I'm that little bit closer!

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

@Riply np. what error are you getting?

from daloradius.

Riply avatar Riply commented on July 25, 2024

(:

On the http://xxxxyyyzzzz/dologin.php page, I'm getting:

Database connection error
Error Message: DB Error: connect failed

Even after making your suggested changes.

edit:

Ah. Having a look at the debug..
root@auth1:/var/log/mysql# tail -f error.log
2016-08-19T06:44:04.894817Z 18 [Note] Access denied for user 'radiusauth'@'localhost' (using password: YES)

edit:

Confirmed working! Thanks for the tutorial mate! I had not given sufficient priv to the user xD

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

@Riply which version of daloRADIUS? MySQL? PHP? etc can you provide these details?
In a nutshell it seems you don't have the correct settings to connect to the MySQL database in library/daloradius.conf.php

from daloradius.

Riply avatar Riply commented on July 25, 2024

It was even worse that that - I had the wrong user stipulated in the library/daloradius.conf.php.. it didn't have permissions to use the DB.

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

Ok thanks for the update. Just noticed now that you updated your previous comment.

from daloradius.

amlluch avatar amlluch commented on July 25, 2024

Now I can access to Daloradius after applying the changes but I can't change any value of the database. If I try change a reply value for a user or anything else I get an error 500. I have read that may be an error with pear-db. Has anyone the same issue?

Thanks in advance

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

@amlluch never heard of it... not even on the forums on SF.

from daloradius.

NCKCN avatar NCKCN commented on July 25, 2024

Liran, Same exact thing here as amlluch with Apache throwing a 500 error. Everything appeared to work initially. Was able to add a new User, add a new Profile, add an Filter-ID Attribute to that Profile. Then nothing can be written to the database...
Ubuntu 16.04.2
daloRADIUS version 0.9.9
MySQL version 5.7.13
Apache version 2.4.18
PHP version7.0.8

Thanks

#Edit
Liran, I did notice a warning on "pear install DB", Ubuntu stated this was being Deprecated. "WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"

from daloradius.

amlluch avatar amlluch commented on July 25, 2024

More on this ... I can add a new user but I can't change any value. I can't clear sessions disconnected but hanged on the data base. Not sure if this helps.

from daloradius.

NCKCN avatar NCKCN commented on July 25, 2024

amlluch, exact same here. Apache always throws a PHP error such as: "PHP Fatal error: Uncaught Error: Call to undefined function split() in /var/www/html/mng-rad-profiles-edit.php:53\nStack trace:\n#0 {main}\n thrown in /var/www/html/mng-rad-profiles-edit.php on line 53, referer: https://radius.nck-wifi.com/mng-rad-profiles-edit.php?profile=NCK-WiFi-Guest".

Tried the pear/MDB2 and that broke everything.

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

Can you revert back to the Pear DB driver and then continue testing?
The issue with split is that it's deprecated in PHP 7:
image

I'll evaluate what's the required effort to refactor the split function to fix this.

from daloradius.

NCKCN avatar NCKCN commented on July 25, 2024

Liran, already switched back to Pear DB. Thanks for the quick response!

from daloradius.

amlluch avatar amlluch commented on July 25, 2024

when I try to delete a user staled, on /var/log/apache2/error.log I get:

[Fri Aug 26 10:48:12.451397 2016] [:error] [pid 14461] [client xxx.xx.xx.xxx:59869] PHP Fatal error: Uncaught Error: Call to undefined function split() in /var/www/daloradius/mng-del.php:157\nStack trace:\n#0 {main}\n thrown in /var/www/daloradius/mng-del.php on line 157, referer: http://radius.anonymousvpn.es/rep-online.php?usernameOnline=

May be this could help.

from daloradius.

amlluch avatar amlluch commented on July 25, 2024

Ok ... finally I fixed the error changing at line 157 of /var/www/daloradius/mng-del.php from split('||', $value) to explode('||', $value)

The point is that there are many erros with php7. I get errors in more places, mainly using "split" function. I am trying to change that for fixing it.

from daloradius.

NCKCN avatar NCKCN commented on July 25, 2024

amlluch, I think Liran is working on fixing the PHP code for an updated release of the daloRADIUS if I understood his post correctly? I'll bet he'll get back with us an put out a new version with all the corrected old split functions. Since he's the one who knows all the "under the hood" stuff, I'll wait for this input. In the meantime, Liran, let us know if you need us to test anything on our end. :)

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

Hey guys @amlluch , @NCKCN
I fixed the issues in this PR #8 - can you please test the fix there? you need to checkout that branch locally and test it. Will you handle doing that?

It should fix the PHP7 errors with the split function because I replaced all occurrences of it.
I need someone to confirm that it's fixed so I can merge it to the master branch.

from daloradius.

NCKCN avatar NCKCN commented on July 25, 2024

Liran,
Updated the 18 files, restarted and I see no errors. Doing some more thorough testing and let you know if I do see any anomalies. Are they any specific functions/features you want tested? Excellent work my friend!

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

Awesome! thanks for the feedback @NCKCN
Would be great if you can generally just test through-out the functionality and see if there are PHP7 related issues and I'll be happy to apply some more fixes.

Happy to help :)

from daloradius.

NCKCN avatar NCKCN commented on July 25, 2024

Liran,
I've pretty much threw everything that I have configured for my part, and seems to be working like a champ. Granted, I don't have all the bells and whistles, but functioning exactly as my PHP5.6 install. I'd say you have the split error exploded >;0

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

LOL

Cool, so thanks a lot in helping test this out.

On Aug 28, 2016 01:48, "NCKCN" [email protected] wrote:

Liran,
I've pretty much threw everything that I have configured for my part, and
seems to be working like a champ. Granted, I don't have all the bells and
whistles, but functioning exactly as my PHP5.6 install. I'd say you have
the split error exploded >;0


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AATT05t3DYFm__2fSNpMqzfNZnTbU1VYks5qkL7agaJpZM4JIV7d
.

from daloradius.

hmachine1999 avatar hmachine1999 commented on July 25, 2024

its help me solve troubles,thx

from daloradius.

amlluch avatar amlluch commented on July 25, 2024

Hi Liran ... everything was working more or less fine but after making a dist-upgrade I get again next error:

Database connection error
Error Message: DB Error: connect failed

Not sure what can I do

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

That's very vague, I can't really understand what is going on.
Possibly your database is down? the db has changed? access details (user/pass) changed?

from daloradius.

bredis avatar bredis commented on July 25, 2024

lirantal, thank you.
For its setting the problem figured out all the instructions on the Ubuntu.
Everything works, thank you.https://github.com/lirantal/daloradius/issues/11

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

@bredis awesome, happy you got it working! :)

from daloradius.

plnavarro76 avatar plnavarro76 commented on July 25, 2024

It works for me. Thanks!! Ubuntu 16.04 server.

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

Great, happy to hear

from daloradius.

zukimonster avatar zukimonster commented on July 25, 2024

I'm getting the following:
PHP Parse error: syntax error, unexpected ';', expecting ',' or ')' in /var/www/html/daloradius/library/opendb.php

I've got PHP 7.0.15 cli, and apache2 is using php 7.

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

@zukimonster you omitted the most important debug info - which line is it complaining about? :)

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

@zukimonster I can't find any such static code analysis issues on that file.
Can you make sure you pulled the latest code from the master branch and try again? If it happens please be more verbose in the error you provide

from daloradius.

zukimonster avatar zukimonster commented on July 25, 2024

[:error] [pid 29920] [client ip:port] PHP Parse error: syntax error, unexpected ';', expecting ',' or ')' in /var/www/html/daloradius/library/opendb.php on line 97, referer: http://server.ip/daloradius/login.php

line 97: $dbSocket->query("SET GLOBAL sql_mode = ";");

edit:
oops, the second quotation mark should be two single apostrophes. I had used code from another how-to website. I'll fix it and try that.

from daloradius.

zukimonster avatar zukimonster commented on July 25, 2024

Now I'm getting:

Database connection error
Error Message: DB Error: connect failed

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

can you check your database details to figure it out?
would be good if you can also look into mysql log or anything else that gives an idea for why the connection failed.

from daloradius.

amuiruri avatar amuiruri commented on July 25, 2024

@lirantal I am new in github, where can I download all daloradius files working with php7 without errors ??

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

if you're new to git/github and you don't know how to clone a project you can also just click the green button and choose to download a .zip file of the current 'master' branch. unzip it can continue regularly...
daloradius-download

from daloradius.

amuiruri avatar amuiruri commented on July 25, 2024

Thanks @lirantal

from daloradius.

bhesterberg78 avatar bhesterberg78 commented on July 25, 2024

Your php7 trick worked, I can now log into daloradius and navigate it. It seems I can create a new user as well, but when I go to "List Users" under "Users Management", I get the following error...
Error Message: DB Error: unknown error
Debug info: SELECT distinct(radcheck.username),radcheck.value, radcheck.id,radusergroup.groupname as groupname, attribute FROM radcheck LEFT JOIN radusergroup ON radcheck.username=radusergroup.username WHERE (Attribute='Auth-Type') or (Attribute LIKE '%-Password') GROUP BY UserName [nativecode=1055 ** Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'radius.radcheck.value' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by]

Can anyone help with this?

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

Not sure about that, sorry. Either the schema doesn't match anymore the query or it's related to the sql_mode we set.

Can you investigate and let me know if you find a fix for it?

from daloradius.

Sailing74 avatar Sailing74 commented on July 25, 2024

Running into the same issue.
The error message some other place is Database error Error Message: DB Error: unknown error Debug info: SET GLOBAL sql_mode = ''; [nativecode=1227 ** Access denied; you need (at least one of) the SUPER privilege(s) for this operation]
That gave me a pretty good hint. Apparently, the user I was using did not have sufficient rights for the work around. I granted all rights to the user, and the error messages - including the one reported by @bhesterberg78 - are gone. Maybe this helps someone.

from daloradius.

Sailing74 avatar Sailing74 commented on July 25, 2024

Ok, now I'm running into other php7 related issues reported here, mostly regarding split () so far. I'm using 0.9.9 currently. Which branch should I check out? Master? Feature/daloradius-php7-support?

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

just master, that should be compatible with php7.
let me know which issues you're having.

from daloradius.

Carlospenate avatar Carlospenate commented on July 25, 2024

It works for me, thanks!

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

Awesome :-)

from daloradius.

crgl2002 avatar crgl2002 commented on July 25, 2024

Liran, Thans for such a good work.
Ive followed PR #8 fix and got a problem, cannot disconnect users. The error One of NAS Address, NAS Port or NAS Secret fields were left empty
Looking at apache error log:
Undefined index: customAttributes in /var/www/daloradius-0.9-9/config-maint-disconnect-user.php on line 194
Undefined variable: customAttributes in /var/www/daloradius-0.9-9/config-maint-disconnect-user.php on line 195
What Im doing wrong or missing?
Thanks.

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

Hey @crgl2002

Looks like they are just warnings.
Regardless seems you're using the tar'ed package downloaded from SF so I suggest cloning the master's branch repository here and working with that instead.

from daloradius.

crgl2002 avatar crgl2002 commented on July 25, 2024

Hi Liran, may be they are but the user is not disconnected. This started to happen after I updated to php7. I m new to github, downloading the .zip file and unzip it will keep all actual configs? Thanks.

from daloradius.

lirantal avatar lirantal commented on July 25, 2024

So you can download the zip from GitHub too and try it.
Don't forget to make a backup of the existing daloRADIUS directory and then just copy over the config files

from daloradius.

m00zi avatar m00zi commented on July 25, 2024

same here

from daloradius.

MiguelVis avatar MiguelVis commented on July 25, 2024

Hi @m00zi

What's your problem exactly?

from daloradius.

m00zi avatar m00zi commented on July 25, 2024

Hi, I hade the DB error issue, after jumping between stackoverflow and github finaly I was able to login to GUI, but now in the GUI's header I have this error:

Error Message: DB Error: unknown error
Debug info: SET GLOBAL sql_mode = ''; [nativecode=1227 ** Access denied; you need (at least one of) the SUPER privilege(s) for this operation]```

from daloradius.

MiguelVis avatar MiguelVis commented on July 25, 2024

@m00zi

It's related to the privileges of the user you are using to access the database.

It was already commented and solved in this same thread

Running into the same issue.
The error message some other place is Database error Error Message: DB Error: unknown error Debug info: SET GLOBAL sql_mode = ''; [nativecode=1227 ** Access denied; you need (at least one of) the SUPER privilege(s) for this operation]
That gave me a pretty good hint. Apparently, the user I was using did not have sufficient rights for the work around. I granted all rights to the user, and the error messages - including the one reported by @bhesterberg78 - are gone. Maybe this helps someone.

from daloradius.

brbrow avatar brbrow commented on July 25, 2024

This tutorial shows how to Install Daloradius install using php7 on ubuntu linux.

from daloradius.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.