I’ve my login in php and it works fine, my problem is that I pretend to check over first the username and password in my database if it exist then the users can login at mikrotik
I pretend to save the login from my users, but I need to integrate this with the login.php but I don’t know where to put it…
I am planning to make a page in php that act like a simple user manager, where i can view,edit delete hot spot user status. i wonder why you are making a single page with 2 source of database(one from mysql and from rb).? have you tried retrieving all you hotspot users using php?
If you want authentication exclusively with your DB, consider using a RADIUS server instead. Ideally something like FreeRADIUS, since it uses MySQL, as does PHP.
You may need to alter your PHP app slightly to meet the DB format of FreeRADIUS, but once you do that, it should be a slam dunk from there - you can let your users authenticate through MikroTik’s login page normally, but set MikroTik to connect to FreeRADIUS, which would in turn influence your DB, which PHP can then tap into.
[quote=“boen_robot”]If you want authentication exclusively with your DB, consider using a RADIUS server instead. Ideally something like FreeRADIUS, since it uses MySQL, as does PHP.
Now when I try to acces with user and password in the log from rb I can see this error “user@hotmail.com (ip)login failed password is not chap encrypted”
'cause I did my system in php in order to add, delete, modify my hostpot’s users all of these work with php and my database, and know I pretend to do my hospot login page in php, it works but I need to integrate with some actions from php on order to work with my database too
Are you sure you’re submitting the right form? The code above is so messy I can’t tell.
Your form is the one that needs to do the CHAP encryption, and pass the result to RouterOS afterwards. One of your forms seems to do it, yet another one doesn’t, but triggers it - a mess I tell you.
Im interested on FreeRadius Server but I cant find any step by step guide on how to test it in windows x86 OS. can you give some links where i can follow? thanks!
It’s not even working with your “login” form, but it’s instead working with your “sendin” form. Where are you getting the $chapid and $chapchallenge from?
Clean it up before you try to debug it. Ideally, start over with a minimal PHP page (i.e. forget about the appearance, frameworks, and any other distractions).