Customizing portal
-
Hey, I'll try to explain what i want to achieve and why in the best possible manner.
I'm organizing an LAN-Party and have been until now been using static IP's for our visitors, which has been structured 10.100.table.seat (IE. 10.100.1.1 or 10.100.2.30) so we can track who's ip is on what seat and such. Which has been fine but, we need to coach our participants how to set static ip's, so i'd like to use dhcp instead.
So i thought of using the captive portal function, but i'd like to use the portal just as it is, with a few modifications. I'd like to have additional fields, one that the user has to specify it's name and another field that specifies which seat the user has.
So what i'd like to get from the captive portal on submit is:
Mac
IP
Name and Seat.So question is, is this possible, and how would you recommend me tackling this situation?
Thanks!
-
I don't know if you have any programming skills and if you have any SQL servers in your network . If you do then it can be done
-
Yeah, well i think i've got a solution.
However i can't get my php script to connect to my external database..
Well i get the following error "Fatal error: Call to undefined function mysqli_connect()"
But i did not have time to troubleshoot it last night. But i don't understand why that piece of code would not work, i used the exact bit of code for database connection before i uploaded it to the pfsense box. So i'm thinking there's something wrong with the pfsense http server or php extensions or something. -
Yeah. Instead of trying to get pfSense to do everything, it might be easier to refer to another more generic web server (with apache, php, mysql, etc) and refer to it in the Pre-authentication redirect URL in captive portal. It can gather and store the data then submit the proper fields back to the captive portal which is presumably set to "no authentication" and you're done.
I've never done it, but that's what I'd try first.
-
…..
Well i get the following error "Fatal error: Call to undefined function mysqli_connect()"
....Troubleshooting wouldn't take long if you called this function: phpinfo();
You will discover that PHP as it executes on pfSEnse, has NOT, by default, MySQL (client) support activated.I don't recall how, but there is a trick to activate it.
(it's on this forum).