pfSense Forum

pfSense English Support => Captive Portal => Topic started by: deajan on March 18, 2016, 08:25:26 am

Title: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on March 18, 2016, 08:25:26 am
29 Nov 2016:
- Added watchdog install
26 May 2016:
- Added new pkg procedure for 2.3 final and post 2.3 releases


Hello,

I've written a captive portal wrapper that creates the FreeeRADIUS user account and logs in in one step, all with bootstrap responsive code and validation, with configurable language that suits for hotels and public wifi providers.
Here's the full howto:

(http://netpower.fr/sites/default/files/soft/img/pfcp-0.4.png)

1 Introduction

pfSense-cp-auth-onestep is a project that aims to provide a captive portal interface for pfSense 2.x (currently tested on 2.2.x and 2.3-beta) that doesn't require the creation of a user account.

In fact, when a user registers, it creates the RADIUS user account and then logs in with that account.

A demo can be found at the following address:http://pfcp.netpower.fr (http://pfcp.netpower.fr)
The latest doc can be found here: http://netpower.fr/pfcp-pfSense-auth-onestep (http://netpower.fr/pfcp-pfSense-auth-onestep)

Initial work based on the excellent work of khan: https://forum.pfsense.org/index.php?topic=57260.0 (https://forum.pfsense.org/index.php?topic=57260.0)

2 Preparation of pfSense

In order to work, pfSense needs the following packages: FreeRADIUS, Cron.

Also, some upstream packages are required in order to work.

First we need to fetch some upstream packages:

Additional steps for pfSense 2.3

The repository management has changed in pfSense 2.3, and by default the FreeBSD repository is disabled.

You must edit the file /usr/local/etc/pkg/repos/pfSense.conf and set the following value:

Code: [Select]
FreeBSD: { enabled: yes }
Additional steps after 2.3 final release

You must also edit file /usr/local/etc/pkg/repos/FreeBSD.conf and set the following value:

Code: [Select]
FreeBSD: { enabled: yes }
ATTENTION: Once the packages are installed with pkg command, please set this value to 'no' again so updates won't interfere with pfSense normal functionality.

Installation of packages:

Code: [Select]
pkg
pkg update
pkg install nano git

If your pkg doesn't find the packages, you may need to reinit the pkg database with

Code: [Select]
rm -f /var/db/pkg/*.sqlite
After this, pkg update should reinitialize the pkg database.

2.1 Installation of MySQL

Although MySQL should be installed on a separate machine, it's convenient to have a single pfSense box doing the whole authentication.

Installation of MySQL isn't supported by pfSense, so you'll have to redo the following steps after every update.

2.1.1 pfSense 2.2 steps

MySQL installation

Code: [Select]
pkg install mysql56-server
pkg install compat8x-amd64

PHP support

Code: [Select]
touch /etc/php_dynamodules/mysql
/etc/rc.php_ini_setup

The following command should output mysql and mysqlnd.

Code: [Select]
php -m | grep mysql
2.1.2 pfSense 2.3 steps

MySQL installation

Code: [Select]
pkg install mysql56-server
pkg install compat9x-amd64
pkg install php56-mysql

PHP support

The following command should output mysql and mysqlnd.

Code: [Select]
php -m | grep mysql
2.1.3 Common steps

We need to allow the MySQL service to start.

Code: [Select]
echo 'mysql_enable="YES"' > /etc/rc.conf
Also, pfSense won't start services unless their name finishes by “.sh”

Code: [Select]
mv /usr/local/etc/rc.d/mysql-server /usr/local/etc/rc.d/mysql-server.sh
2.1.4 MySQL startup fix

For whatever, pfSense won't start MySQL sometimes. If you have a tip, please tell.

In order to fix this, create the following file /usr/local/bin/mysql_relaunch.sh

Code: [Select]
#!/usr/bin/env sh 

service /mysql-server.sh status > /dev/null
if [ $? != 0 ]; then
        service mysql-server.sh start
fi

Render the file executable

Code: [Select]
chmod +x /usr/local/bin/mysql_relaunch.sh
Install the cron package and add the following entry:

Code: [Select]
*/1 * * * * root /usr/local/bin/mysql_relaunch.sh
After this, we may launch the mysql service

Code: [Select]
service mysql-server.sh start
Also, as FreeRADIUS may start before mysql and fail, install watchdog service and set it up to restart FreeRADIUS.

Secure your installation by running the following command and change your root password

Code: [Select]
/usr/local/bin/mysql_secure_installation
Optionnaly, you may create the following password file /root/.my.cnf

Code: [Select]
[client]
password="YourMySQLrootPassword"

2.2 FreeRADIUS setup

2.2.1 FreeRADIUS installation

Install the FreeRADIUS2 package via System > Packages > Available

In Services > FreeRADIUS > Users

Add a user called: testu

Set it's password: testp

in Services > FreeRADIUS > NAS / Clients

Add a NAS user:

IP: 127.0.0.1

Client Shortname: tester

Shared Secret: SuperTest (replace this with a good password)

In Services > FreeRADIUS > Interface

Add the interface the RADIUS server should listen on: 127.0.0.1

You can now check in Status > System Logs that the server is active

Quote
Sep 29 14:54:50   radiusd[10330]: Loaded virtual server <default>
Sep 29 14:54:50   radiusd[13493]: Ready to process requests.

Connect to pfSense via ssh or console and check if FreeRADIUS authenticates (replace SuperTest with your Shared Secret):

Code: [Select]
radtest testu testp 127.0.0.1:1812 0 SuperTest
The answer should look like:

Quote
Sending Access-Request of id 108 to 127.0.0.1 port 1812
        User-Name = "testu"
        User-Password = "testp"
        NAS-IP-Address = 192.168.1.1
        NAS-Port = 0
        Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=108, length=20

Check authentication in Status > System Logs

Code: [Select]
Sep 29 15:04:51 radiusd[22223]: Login OK: [testu] (from client pfSense port 0)
#TIP: See https://doc.pfsense.org/index.php/Testing_FreeRADIUS for tuning and troubleshooting

2.2.2 MySQL FreeRADIUS integration

First we need to create the RADIUS database. Launch the “mysql” program. If you didn't create the /root/.my.cnf password file, launch “mysql -p” and execute the following statements:

Code: [Select]
CREATE DATABASE  `radius`;
exit

We also have to get a copy of the sql files needed for the captive portal.

You can fetch them via wget at http://netpower.fr/sites/default/files/soft/bin/pfSense-cp-auth-onestep.gz (http://netpower.fr/sites/default/files/soft/bin/pfSense-cp-auth-onestep.gz) or directly via git:

Code: [Select]
cd /root
git clone https://github.com/deajan/pfSense-cp-auth-onestep
cd /root/pfSense-cp-auth-onestep/sql

We need to integrate every .sql file into the radius database. Please execute the admin.sql file at last because it contains definitions for the other files. Add “-p” to myql if you don't have created the password file.

Before running those commands, modify the admin.sql file in order to replace the default password 'radpass'. (Use vi or nano if installed).

Code: [Select]
mysql radius < cui.sql
mysql radius < nas.sql
mysql radius < radippool.sql
mysql radius < schema.sql
mysql radius < wimax.sql
mysql radius < reg_users.sql
mysql radius < admin.sql

Activate SQL support in Services > FreeRADIUS > SQL:

Enable SQL Support: Enable

Enable SQL Authorization: Enable

Enable SQL Accounting: Enable

Enable SQL Session: Enable

Enable SQL Post-Auth: Enable

Server IP Address --> 127.0.0.1

Server Port --> 3306

Server Database -> radius

Server User -> radius

Server Password -> radpass (replace with your database password).

MySQL authentication test

Execute the following command (replace SuperTest with your Shared Secret):

Code: [Select]
radtest testu testp 127.0.0.1:1812 0 SuperTest
The radpostauth table should contain the authentication info:

Code: [Select]
mysql -p -e "SELECT * FROM radpostauth;" radius
Quote
+----+----------+-------+---------------+---------------------+
| id | username | pass  | reply         | authdate            |
+----+----------+-------+---------------+---------------------+
|  1 | testu    | testp | Access-Accept | 2015-09-29 15:13:24 |
+----+----------+-------+---------------+---------------------+

2.3 Enable captive portal

2.3.1 Setup

Grab a copy of the pfSense-pfcp-auth-onestep files via github or via the following link http://netpower.fr/sites/default/files/soft/bin/pfSense-cp-auth-onestep.gz (http://netpower.fr/sites/default/files/soft/bin/pfSense-cp-auth-onestep.gz)

Uncompress the file and edit captiveportal-config.php to meet your settings, especially the database password.

Create a new zone in Services > Captive Portal . Example “PUBLICWIFI”

In Services > Captive Portal > File Manager, upload all the files from pfSense-pfcp-auth-onestep beginning with “captiveportal-*”

The following files need to be uploaded:

Quote
captiveportal-bootstrap.min.css
captiveportal-bootstrap.min.js
captiveprotal-jquery.validate.js
captiveportal-jquery-1.11.3.min.js
captiveportal-background.jpg
captiveportal-sidelogo.png
captiveportal-check_readio_sheet.png
captiveportal-termsofuse.html
captiveportal-config.php

#TIP: I had trouble with uploading the files in pfSense 2.2.6. After every 3 files, I had to restart WebConfigurator via ssh.

We Can now enable the captive portal on the LAN interface or whatever interface you need.

We also need to activate RADIUS authentication:

IP: 127.0.0.1

Port: 1812

Shared Secret: SuperTest (or your Shared Secret)

Radius Protocol: PAP

Account Check:

Send RADIUS accounting packets: Enable

Port: 1813

Accounting updates: stop/start accounting (FreeRADIUS if available)

RADIUS NAS IP attribue: LAN IP (or whatever interface you selected)

Portal page contesnts: Upload file ozy-captive.php

Redirection URL: Whatever you'd like, example: http://www.google.com

2.3.2 Testing

Once enabled, you can open a browser and enter any domain. You should end on the captive portal page.

You may access directly to the captive portal via http://[pfSenseIP]:8002

#TIP: Your computer should use DHCP and use the pfSense IP as DNS server or the redirection won't work.

If the redirection still doesn't work, check that the DNS Resolver service is running without the forwarding mode.

Also, if your computer already has the domain in DNS cache, you may have to flush dns cache.

On Linux:

Code: [Select]
service nscd restart
On Windows:

Code: [Select]
ipconfig /flushdns
At least, close and reopen your browser so it would make a new DNS query.

Fell free to help improve this howto.

Regards,
Ozy.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: Ivart on April 18, 2016, 09:12:24 pm
Thanks deajan for the post with detailed information to implement self signed captive portal. My CP was working fine in 2.2 now I can´t install needed packages.
pkg version (pkg -v) is 1.6.2, pkg install mysql56-server creates a loop with these messages
Code: [Select]
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
Updating pfSense-core repository catalogue...
pfSense-core repository is up-to-date.
Updating pfSense repository catalogue...
pfSense repository is up-to-date.
All repositories are up-to-date.
New version of pkg detected; it needs to be installed first.
Checking integrity... done (0 conflicting)
The most recent version of packages are already installed
I´ve tried pkg install pkg-1.7.2 with the same result
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on April 20, 2016, 03:13:50 am
Hello,

This is more a pfSense than a captive portal problem.
Are you still running V2.2 ?

Check the contents of /usr/local/etc/pkg/pfSense.conf and see if FreeBSD is enabled (disable it after installing mysql).
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: wsdenis on April 29, 2016, 10:24:54 pm
Thanks so much Deajan for this code! I just wanted to give a heads up that I ran into an issue with the firmware 2.3-RELEASE. When data was submitted I was getting a Fatal error: Call to undefined function mysql_connect(). I was pushing this data to a remote Mysql server.

After looking around I found out from a post that php56-mysql needs to be installed manually on 2.3 with
Code: [Select]
pkg install php56-mysql See this post https://forum.pfsense.org/index.php?topic=105598.0 (https://forum.pfsense.org/index.php?topic=105598.0).

Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on April 30, 2016, 05:42:42 am
I think I wrote about this in section 2.1.2.
Anyway, thanks for the feedback.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: wsdenis on May 02, 2016, 08:32:16 am
Ahhh I see your right. I must have missed that some how. Anyway thanks again!
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: novensiles on May 16, 2016, 10:18:28 am
Hallo,

I did all fine but get

PHP ERROR: Type: 1, File: /var/etc/captiveportal_oberemuehle.html, Line: 126, Message: Call to undefined function mysql_connect()

after typed in registring datas and send it.


php56-mysql  is Installed

All Packages Updated + Upgraded
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: jmonline on May 18, 2016, 06:03:20 am
On a brand new pfsense 2.3-RELEASE (amd64)

I have edited /usr/local/etc/pkg/repos/pfSense.conf and set the following value:

Code: [Select]
FreeBSD: { enabled: yes }
I have then run :

Code: [Select]
pkg update
Then:
Code: [Select]
pkg install nano git
This then results in:
Code: [Select]
pkg install nano git
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
Updating pfSense-core repository catalogue...
pfSense-core repository is up-to-date.
Updating pfSense repository catalogue...
pfSense repository is up-to-date.
All repositories are up-to-date.
New version of pkg detected; it needs to be installed first.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be REINSTALLED:
        pkg-1.6.2 [pfSense]

2 MiB to be downloaded.

Proceed with this action? [y/N]: y
Fetching pkg-1.6.2.txz: 100%    2 MiB 632.9kB/s    00:04
Checking integrity... done (0 conflicting)
[1/1] Reinstalling pkg-1.6.2...
You may need to manually remove /usr/local/etc/pkg.conf if it is no longer needed.
[1/1] Extracting pkg-1.6.2: 100%
Message from pkg-1.6.2:
If you are upgrading from the old package format, first run:

  # pkg2ng
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
Updating pfSense-core repository catalogue...
pfSense-core repository is up-to-date.
Updating pfSense repository catalogue...
pfSense repository is up-to-date.
All repositories are up-to-date.
New version of pkg detected; it needs to be installed first.
Checking integrity... done (0 conflicting)
The most recent version of packages are already installed
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
Updating pfSense-core repository catalogue...
pfSense-core repository is up-to-date.
Updating pfSense repository catalogue...
pfSense repository is up-to-date.
All repositories are up-to-date.
New version of pkg detected; it needs to be installed first.

This then loops over and over and does not stop.

The same then happens if I run
Code: [Select]
pkg install mysql56-server
What am I missing please?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: nimamhd on May 18, 2016, 10:16:49 am
This is the bug of pkg and will fix in pkg 1.7.2:

https://github.com/freebsd/pkg/issues/1303

"" pkg infinite loop with multiple repos containing different versions of pkg ""

you can comment out all other repo and install what you want, then restore the configuration to default.

after install, the pkg will update to the last version that may cause the pfsense package system stop working, to resolve this:

run:

"pkg delete -f pkg" and install it again with pfsense repo.

Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: abebraham on May 22, 2016, 03:06:30 am
Hello Ozy, thank you so much for taking the time to do this. I can not stress how helpful this is!

I know this is a lot to ask but if anyone is considering to make a how to video I would really appreciate this. I am not so fluent in this type of configuration. Thank you!
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: beewolf on May 26, 2016, 07:48:54 am
I have set the FreeBSD: { enabled: yes } but when I try to install the mysql56-server I get:

Updating pfSense-core repository catalogue...
pfSense-core repository is up-to-date.
Updating pfSense repository catalogue...
pfSense repository is up-to-date.
All repositories are up-to-date.
pkg: No packages available to install matching 'mysql56-server' have been found in the repositories

Almost as if it is not looking in the FreeBSD repo.

I have restarted after enabling FreeBSD and gone back in to check that it is enabled.

Any ideas?  Thanks
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on May 26, 2016, 03:57:26 pm
Hi,

I've updated the captive portal code a couple of days ago with some bug fixes and minor improvements.
Sorry for not having answered earlier, been in holidays :)

@novensiles: can you give the output of "php -m" ?
@abebraham: sorry, but I think the text howto is enough. It's also easier to update it than to update a video. Feel free to ask for help here on the forum or github.
@beewolf: Repo files slightly changed between 2.3-RC and 2.3 final. I've updated the doc for this.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: beewolf on May 27, 2016, 05:16:42 am
Many thanks for that - all installed fine with those changes but I am getting the following error on trying to log in:

PHP ERROR: Type 1, File /var/etc/captiveortal_guest_wifi.html, Line 127, Message: Call to undefined functionmysql_connect()

Probably something I have done but am struggling to find what exactly.  Any ideas?  Thanks
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on May 27, 2016, 05:25:18 am
What's your output of php -m ?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: beewolf on May 27, 2016, 05:37:59 am
[2.3.1-RELEASE][root@pfSense.skh]/root/pfsense-cp-auth-onestep/sql: php -m
[PHP Modules]
bcmath
bz2
Core
ctype
curl
date
dom
ereg
filter
gettext
hash
json
ldap
libxml
mbstring
mcrypt
mhash
mysql
mysqlnd
openssl
pcntl
pcre
PDO
pdo_sqlite
pfSense
posix
radius
readline
Reflection
rrd
session
shmop
SimpleXML
sockets
SPL
sqlite3
ssh2
standard
suhosin
sysvmsg
sysvsem
sysvshm
tokenizer
xdebug
xml
xmlreader
xmlwriter
Zend OPcache
zlib
zmq

[Zend Modules]
Xdebug
Zend OPcache
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on May 27, 2016, 06:17:47 am
It seems that the mysql extension is there.
Can you please restart php-fpm ? And if it does not work, restart pfSense ?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: beewolf on May 28, 2016, 02:59:24 am
Yes, thank you that worked - I should have tried that first!!

All seems to be working now in a test environment - just one thing, Freeradius needs to be started manually after a restart.  Is this usual?  Would it be possible to add the service to the MySQL cron job so it definitely starts automatically?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on May 28, 2016, 04:12:54 am
I'll add a note about rebooting to the guide.

As for the freeradius service, it depends on mysql service.
As there is no loading order, sometimes freeradius loads before mysql and may fail.

In order to get FreeRADIUS working all the time, I've setup the watchdog package to restart failing services.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: beewolf on May 29, 2016, 11:50:41 am
Many thanks - all working now.

Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: novensiles on June 03, 2016, 07:57:35 am
[PHP Modules]
bcmath
bz2
Core
ctype
curl
date
dom
ereg
filter
gettext
hash
json
ldap
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_sqlite
pfSense
posix
radius
readline
Reflection
rrd
session
shmop
SimpleXML
sockets
SPL
sqlite3
ssh2
standard
suhosin
sysvmsg
sysvsem
sysvshm
tokenizer
xdebug
xml
xmlreader
xmlwriter
Zend OPcache
zlib
zmq

[Zend Modules]
Xdebug
Zend OPcache
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on June 03, 2016, 10:04:46 am
As stated above, you have the php mysql extension.
Please restart php-fpm from console and try again.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: beewolf on June 06, 2016, 10:49:45 am
My system has been running fine for a week - I had to restart to get the cables sorted neatly and now whatever I do I cant get Freeradius to start.  There is another post here:

https://forum.pfsense.org/index.php?topic=109775.msg611138#msg611138

with similar symptoms to what I am getting and I have tried the suggestions in that but no difference.

I realise that this is probably a freeradius/pfsense problem but really need some help sorting it - I don't want to have to rebuild again!

Many thanks
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: abebraham on July 18, 2016, 12:39:07 pm
is it possible to use a node.js file for the captive portal? Or using mongodb?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: Gertjan on July 19, 2016, 04:40:47 am
is it possible to use a node.js file for the captive portal? Or using mongodb?
and why posting the same question twice ? https://forum.pfsense.org/index.php?topic=115337.0
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: nhimcoi30889 on July 20, 2016, 10:31:30 pm
Hello Deajan,
Thank for guideline detail .
I have a problem when install
This is log :
Code: [Select]
Warning: Illegal string offset 'alias' in /etc/inc/util.inc on line 1684 Call Stack: 0.0583 234136 1. {main}() /usr/local/www/services_captiveportal.php:0 0.0584 234576 2. require_once('/etc/inc/functions.inc') /usr/local/www/services_captiveportal.php:66 0.0586 234952 3. require_once('/etc/inc/interfaces.inc') /etc/inc/functions.inc:170 0.0591 254296 4. require_once('/etc/inc/gwlb.inc') /etc/inc/interfaces.inc:61 0.0591 254928 5. require_once('/etc/inc/config.inc') /etc/inc/gwlb.inc:54 0.0595 265032 6. parse_config() /etc/inc/config.inc:218 0.0598 372400 7. alias_make_table() /etc/inc/config.lib.inc:185 Warning: Cannot modify header information - headers already sent by (output started at /etc/inc/util.inc:1684) in /usr/local/www/guiconfig.inc on line 72 Call Stack: 0.0583 234136 1. {main}() /usr/local/www/services_captiveportal.php:0 0.0618 938296 2. require_once('/usr/local/www/guiconfig.inc') /usr/local/www/services_captiveportal.php:75 0.0618 958632 3. header() /usr/local/www/guiconfig.inc:72 Warning: Cannot modify header information - headers already sent by (output started at /etc/inc/util.inc:1684) in /usr/local/www/guiconfig.inc on line 73 Call Stack: 0.0583 234136 1. {main}() /usr/local/www/services_captiveportal.php:0 0.0618 938296 2. require_once('/usr/local/www/guiconfig.inc') /usr/local/www/services_captiveportal.php:75 0.0620 958760 3. header() /usr/local/www/guiconfig.inc:73 Warning: Cannot modify header information - headers already sent by (output started at /etc/inc/util.inc:1684) in /usr/local/www/guiconfig.inc on line 74 Call Stack: 0.0583 234136 1. {main}() /usr/local/www/services_captiveportal.php:0 0.0618 938296 2. require_once('/usr/local/www/guiconfig.inc') /usr/local/www/services_captiveportal.php:75 0.0621 958696 3. header() /usr/local/www/guiconfig.inc:74 Warning: Cannot modify header information - headers already sent by (output started at /etc/inc/util.inc:1684) in /usr/local/www/guiconfig.inc on line 75 Call Stack: 0.0583 234136 1. {main}() /usr/local/www/services_captiveportal.php:0 0.0618 938296 2. require_once('/usr/local/www/guiconfig.inc') /usr/local/www/services_captiveportal.php:75 0.0622 958696 3. header() /usr/local/www/guiconfig.inc:75 Warning: Cannot modify header information - headers already sent by (output started at /etc/inc/util.inc:1684) in /usr/local/www/guiconfig.inc on line 78 Call Stack: 0.0583 234136 1. {main}() /usr/local/www/services_captiveportal.php:0 0.0618 938296 2. require_once('/usr/local/www/guiconfig.inc') /usr/local/www/services_captiveportal.php:75 0.0623 958696 3. header() /usr/local/www/guiconfig.inc:78 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /etc/inc/util.inc:1684) in /etc/inc/auth.inc on line 1573 Call Stack: 0.0583 234136 1. {main}() /usr/local/www/services_captiveportal.php:0 0.0618 938296 2. require_once('/usr/local/www/guiconfig.inc') /usr/local/www/services_captiveportal.php:75 0.0624 959088 3. require_once('/etc/inc/authgui.inc') /usr/local/www/guiconfig.inc:79 0.0812 1242720 4. session_auth() /etc/inc/authgui.inc:62 0.0812 1244776 5. session_start() /etc/inc/auth.inc:1573 Warning: Cannot modify header information - headers already sent by (output started at /etc/inc/util.inc:1684) in /usr/local/www/services_captiveportal.php on line 87 Call Stack: 0.0583 234136 1. {main}() /usr/local/www/services_captiveportal.php:0 0.0821 1277104 2. header() /usr/local/www/services_captiveportal.php:87
At the moment, i cant access Service/Captive Portal ( this show above ).
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: nhimcoi30889 on July 20, 2016, 11:13:08 pm
I found on log crash of pfsense as :
Code: [Select]
Crash report begins.  Anonymous machine information:

amd64
10.3-RELEASE
FreeBSD 10.3-RELEASE #6 05adf0a(RELENG_2_3_0): Mon Apr 11 18:52:07 CDT 2016     root@ce23-amd64-builder:/builder/pfsense-230/tmp/obj/builder/pfsense-230/tmp/FreeBSD-src/sys/pfSense

Crash report details:

PHP Errors:
[21-Jul-2016 11:09:49 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:49 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/ecl.php:0
[21-Jul-2016 11:09:49 Asia/Ho_Chi_Minh] PHP   2. require_once() /etc/ecl.php:34
[21-Jul-2016 11:09:49 Asia/Ho_Chi_Minh] PHP   3. require_once() /etc/inc/functions.inc:170
[21-Jul-2016 11:09:49 Asia/Ho_Chi_Minh] PHP   4. require_once() /etc/inc/interfaces.inc:61
[21-Jul-2016 11:09:49 Asia/Ho_Chi_Minh] PHP   5. require_once() /etc/inc/gwlb.inc:54
[21-Jul-2016 11:09:49 Asia/Ho_Chi_Minh] PHP   6. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:09:49 Asia/Ho_Chi_Minh] PHP   7. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:09:50 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:50 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.bootup:0
[21-Jul-2016 11:09:50 Asia/Ho_Chi_Minh] PHP   2. require_once() /etc/rc.bootup:33
[21-Jul-2016 11:09:50 Asia/Ho_Chi_Minh] PHP   3. require_once() /etc/inc/pkg-utils.inc:58
[21-Jul-2016 11:09:50 Asia/Ho_Chi_Minh] PHP   4. require_once() /etc/inc/service-utils.inc:56
[21-Jul-2016 11:09:50 Asia/Ho_Chi_Minh] PHP   5. require_once() /etc/inc/captiveportal.inc:58
[21-Jul-2016 11:09:50 Asia/Ho_Chi_Minh] PHP   6. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:09:50 Asia/Ho_Chi_Minh] PHP   7. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.linkup:0
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP   2. require_once() /etc/rc.linkup:34
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP   3. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP   4. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.bootup:0
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP   2. parse_config_bootup() /etc/rc.bootup:162
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP   3. parse_config() /etc/inc/config.lib.inc:309
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP   4. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.bootup:0
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP   2. parse_config_bootup() /etc/rc.bootup:162
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP   3. alias_make_table() /etc/inc/config.lib.inc:328
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.linkup:0
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP   2. require_once() /etc/rc.linkup:34
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP   3. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:09:51 Asia/Ho_Chi_Minh] PHP   4. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.bootup:0
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP   2. interfaces_configure() /etc/rc.bootup:250
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP   3. interface_configure() /etc/inc/interfaces.inc:1112
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP   4. interface_netgraph_needed() /etc/inc/interfaces.inc:3425
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.bootup:0
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP   2. interfaces_configure() /etc/rc.bootup:250
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP   3. interface_configure() /etc/inc/interfaces.inc:1112
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP   4. interface_netgraph_needed() /etc/inc/interfaces.inc:3425
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.bootup:0
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP   2. openvpn_resync_all() /etc/rc.bootup:261
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP   3. openvpn_create_dirs() /etc/inc/openvpn.inc:1309
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.bootup:0
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP   2. filter_configure_sync() /etc/rc.bootup:268
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP   3. filter_nat_rules_generate() /etc/inc/filter.inc:297
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP   4. filter_nat_rules_automatic_tonathosts() /etc/inc/filter.inc:2093
[21-Jul-2016 11:09:52 Asia/Ho_Chi_Minh] PHP   5. get_staticroutes() /etc/inc/filter.inc:1594
[21-Jul-2016 11:09:53 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:53 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/sshd:0
[21-Jul-2016 11:09:53 Asia/Ho_Chi_Minh] PHP   2. require_once() /etc/sshd:33
[21-Jul-2016 11:09:53 Asia/Ho_Chi_Minh] PHP   3. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:09:53 Asia/Ho_Chi_Minh] PHP   4. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:09:54 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:54 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.bootup:0
[21-Jul-2016 11:09:54 Asia/Ho_Chi_Minh] PHP   2. system_routing_configure() /etc/rc.bootup:299
[21-Jul-2016 11:09:54 Asia/Ho_Chi_Minh] PHP   3. system_staticroutes_configure() /etc/inc/system.inc:657
[21-Jul-2016 11:09:54 Asia/Ho_Chi_Minh] PHP   4. get_staticroutes() /etc/inc/system.inc:667
[21-Jul-2016 11:09:54 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:54 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.bootup:0
[21-Jul-2016 11:09:54 Asia/Ho_Chi_Minh] PHP   2. services_unbound_configure() /etc/rc.bootup:308
[21-Jul-2016 11:09:54 Asia/Ho_Chi_Minh] PHP   3. sync_unbound_service() /etc/inc/services.inc:2194
[21-Jul-2016 11:09:54 Asia/Ho_Chi_Minh] PHP   4. unbound_generate_config() /etc/inc/unbound.inc:489
[21-Jul-2016 11:09:54 Asia/Ho_Chi_Minh] PHP   5. unbound_acls_config() /etc/inc/unbound.inc:169
[21-Jul-2016 11:09:54 Asia/Ho_Chi_Minh] PHP   6. filter_nat_rules_automatic_tonathosts() /etc/inc/unbound.inc:766
[21-Jul-2016 11:09:54 Asia/Ho_Chi_Minh] PHP   7. get_staticroutes() /etc/inc/filter.inc:1594
[21-Jul-2016 11:09:55 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:55 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.bootup:0
[21-Jul-2016 11:09:55 Asia/Ho_Chi_Minh] PHP   2. filter_configure_sync() /etc/rc.bootup:337
[21-Jul-2016 11:09:55 Asia/Ho_Chi_Minh] PHP   3. filter_nat_rules_generate() /etc/inc/filter.inc:297
[21-Jul-2016 11:09:55 Asia/Ho_Chi_Minh] PHP   4. filter_nat_rules_automatic_tonathosts() /etc/inc/filter.inc:2093
[21-Jul-2016 11:09:55 Asia/Ho_Chi_Minh] PHP   5. get_staticroutes() /etc/inc/filter.inc:1594
[21-Jul-2016 11:09:56 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:56 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.dyndns.update:0
[21-Jul-2016 11:09:56 Asia/Ho_Chi_Minh] PHP   2. require_once() /etc/rc.dyndns.update:31
[21-Jul-2016 11:09:56 Asia/Ho_Chi_Minh] PHP   3. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:09:56 Asia/Ho_Chi_Minh] PHP   4. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:09:56 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:56 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.banner:0
[21-Jul-2016 11:09:56 Asia/Ho_Chi_Minh] PHP   2. require_once() /etc/rc.banner:32
[21-Jul-2016 11:09:56 Asia/Ho_Chi_Minh] PHP   3. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:09:56 Asia/Ho_Chi_Minh] PHP   4. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:09:59 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:09:59 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.start_packages:0
[21-Jul-2016 11:09:59 Asia/Ho_Chi_Minh] PHP   2. require_once() /etc/rc.start_packages:31
[21-Jul-2016 11:09:59 Asia/Ho_Chi_Minh] PHP   3. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:09:59 Asia/Ho_Chi_Minh] PHP   4. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.conf_mount_rw:0
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   2. require_once() /etc/rc.conf_mount_rw:31
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   3. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   4. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/index.php:0
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/index.php:73
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   4. include_once() /etc/inc/authgui.inc:55
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   5. require_once() /etc/inc/auth.inc:63
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   6. parse_config() /etc/inc/config.gui.inc:92
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   7. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/index.php:0
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/index.php:73
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   4. display_login_form() /etc/inc/authgui.inc:63
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   5. require_once() /etc/inc/authgui.inc:198
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   6. require_once() /etc/inc/shaper.inc:62
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   7. require_once() /etc/inc/functions.inc:170
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   8. require_once() /etc/inc/interfaces.inc:61
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   9. require_once() /etc/inc/gwlb.inc:54
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP  10. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP  11. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/index.php:0
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/index.php:73
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   4. display_login_form() /etc/inc/authgui.inc:63
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   5. filter_generate_optcfg_array() /etc/inc/authgui.inc:199
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/index.php:0
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/index.php:73
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   4. display_login_form() /etc/inc/authgui.inc:63
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   5. filter_generate_optcfg_array() /etc/inc/authgui.inc:199
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/index.php:0
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/index.php:73
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   4. include_once() /etc/inc/authgui.inc:55
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   5. require_once() /etc/inc/auth.inc:63
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   6. parse_config() /etc/inc/config.gui.inc:92
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   7. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/index.php:0
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/index.php:73
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   4. display_login_form() /etc/inc/authgui.inc:63
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   5. require_once() /etc/inc/authgui.inc:198
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   6. require_once() /etc/inc/shaper.inc:62
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   7. require_once() /etc/inc/functions.inc:170
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   8. require_once() /etc/inc/interfaces.inc:61
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   9. require_once() /etc/inc/gwlb.inc:54
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP  10. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP  11. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/index.php:0
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/index.php:73
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   4. display_login_form() /etc/inc/authgui.inc:63
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   5. filter_generate_optcfg_array() /etc/inc/authgui.inc:199
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/index.php:0
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/index.php:73
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   4. display_login_form() /etc/inc/authgui.inc:63
[21-Jul-2016 11:10:01 Asia/Ho_Chi_Minh] PHP   5. filter_generate_optcfg_array() /etc/inc/authgui.inc:199
[21-Jul-2016 11:10:02 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:02 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.conf_mount_ro:0
[21-Jul-2016 11:10:02 Asia/Ho_Chi_Minh] PHP   2. require_once() /etc/rc.conf_mount_ro:31
[21-Jul-2016 11:10:02 Asia/Ho_Chi_Minh] PHP   3. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:10:02 Asia/Ho_Chi_Minh] PHP   4. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:02 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:02 Asia/Ho_Chi_Minh] PHP   1. {main}() /etc/rc.banner:0
[21-Jul-2016 11:10:02 Asia/Ho_Chi_Minh] PHP   2. require_once() /etc/rc.banner:32
[21-Jul-2016 11:10:02 Asia/Ho_Chi_Minh] PHP   3. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:10:02 Asia/Ho_Chi_Minh] PHP   4. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/index.php:0
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/index.php:73
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   4. include_once() /etc/inc/authgui.inc:55
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   5. require_once() /etc/inc/auth.inc:63
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   6. parse_config() /etc/inc/config.gui.inc:92
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   7. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/index.php:0
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/index.php:73
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   4. include_once() /etc/inc/authgui.inc:55
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   5. get_configured_ip_addresses() /etc/inc/auth.inc:201
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   6. require_once() /etc/inc/util.inc:1399
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   7. require_once() /etc/inc/interfaces.inc:61
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   8. require_once() /etc/inc/gwlb.inc:54
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   9. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP  10. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/index.php:0
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/index.php:73
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   4. include_once() /etc/inc/authgui.inc:55
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   5. require_once() /etc/inc/auth.inc:63
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   6. parse_config() /etc/inc/config.gui.inc:92
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   7. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/index.php:0
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/index.php:73
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   4. include_once() /etc/inc/authgui.inc:55
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   5. get_configured_ip_addresses() /etc/inc/auth.inc:201
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   6. require_once() /etc/inc/util.inc:1399
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   7. require_once() /etc/inc/interfaces.inc:61
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   8. require_once() /etc/inc/gwlb.inc:54
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP   9. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:10:05 Asia/Ho_Chi_Minh] PHP  10. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/widgets/widgets/system_information.widget.php:0
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/widgets/widgets/system_information.widget.php:58
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   3. require_once() /etc/inc/functions.inc:170
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   4. require_once() /etc/inc/interfaces.inc:61
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   5. require_once() /etc/inc/gwlb.inc:54
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   6. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   7. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/widgets/widgets/system_information.widget.php:0
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/widgets/widgets/system_information.widget.php:59
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   3. header() /usr/local/www/guiconfig.inc:72
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/widgets/widgets/system_information.widget.php:0
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/widgets/widgets/system_information.widget.php:59
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   3. header() /usr/local/www/guiconfig.inc:73
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/widgets/widgets/system_information.widget.php:0
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/widgets/widgets/system_information.widget.php:59
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   3. header() /usr/local/www/guiconfig.inc:74
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/widgets/widgets/system_information.widget.php:0
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/widgets/widgets/system_information.widget.php:59
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   3. header() /usr/local/www/guiconfig.inc:75
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/widgets/widgets/system_information.widget.php:0
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/widgets/widgets/system_information.widget.php:59
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   3. header() /usr/local/www/guiconfig.inc:78
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/widgets/widgets/system_information.widget.php:0
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/widgets/widgets/system_information.widget.php:59
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   4. session_auth() /etc/inc/authgui.inc:62
[21-Jul-2016 11:10:10 Asia/Ho_Chi_Minh] PHP   5. session_start() /etc/inc/auth.inc:1573
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/getstats.php:0
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/getstats.php:69
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP   4. include_once() /etc/inc/authgui.inc:55
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP   5. require_once() /etc/inc/auth.inc:63
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP   6. parse_config() /etc/inc/config.gui.inc:92
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP   7. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/getstats.php:0
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/getstats.php:69
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP   4. include_once() /etc/inc/authgui.inc:55
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP   5. get_configured_ip_addresses() /etc/inc/auth.inc:201
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP   6. require_once() /etc/inc/util.inc:1399
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP   7. require_once() /etc/inc/interfaces.inc:61
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP   8. require_once() /etc/inc/gwlb.inc:54
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP   9. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:10:17 Asia/Ho_Chi_Minh] PHP  10. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/getstats.php:0
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/getstats.php:69
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP   4. include_once() /etc/inc/authgui.inc:55
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP   5. require_once() /etc/inc/auth.inc:63
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP   6. parse_config() /etc/inc/config.gui.inc:92
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP   7. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/getstats.php:0
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP   2. require_once() /usr/local/www/getstats.php:69
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP   4. include_once() /etc/inc/authgui.inc:55
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP   5. get_configured_ip_addresses() /etc/inc/auth.inc:201
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP   6. require_once() /etc/inc/util.inc:1399
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP   7. require_once() /etc/inc/interfaces.inc:61
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP   8. require_once() /etc/inc/gwlb.inc:54
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP   9. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:10:28 Asia/Ho_Chi_Minh] PHP  10. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/crash_reporter.php:0
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP   2. require() /usr/local/www/crash_reporter.php:63
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP   4. include_once() /etc/inc/authgui.inc:55
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP   5. require_once() /etc/inc/auth.inc:63
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP   6. parse_config() /etc/inc/config.gui.inc:92
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP   7. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/crash_reporter.php:0
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP   2. require() /usr/local/www/crash_reporter.php:63
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP   4. include_once() /etc/inc/authgui.inc:55
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP   5. get_configured_ip_addresses() /etc/inc/auth.inc:201
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP   6. require_once() /etc/inc/util.inc:1399
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP   7. require_once() /etc/inc/interfaces.inc:61
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP   8. require_once() /etc/inc/gwlb.inc:54
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP   9. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:10:31 Asia/Ho_Chi_Minh] PHP  10. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/crash_reporter.php:0
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP   2. require() /usr/local/www/crash_reporter.php:63
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP   4. include_once() /etc/inc/authgui.inc:55
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP   5. require_once() /etc/inc/auth.inc:63
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP   6. parse_config() /etc/inc/config.gui.inc:92
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP   7. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/crash_reporter.php:0
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP   2. require() /usr/local/www/crash_reporter.php:63
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP   4. include_once() /etc/inc/authgui.inc:55
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP   5. get_configured_ip_addresses() /etc/inc/auth.inc:201
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP   6. require_once() /etc/inc/util.inc:1399
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP   7. require_once() /etc/inc/interfaces.inc:61
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP   8. require_once() /etc/inc/gwlb.inc:54
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP   9. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:11:13 Asia/Ho_Chi_Minh] PHP  10. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/crash_reporter.php:0
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP   2. require() /usr/local/www/crash_reporter.php:63
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP   4. include_once() /etc/inc/authgui.inc:55
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP   5. require_once() /etc/inc/auth.inc:63
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP   6. parse_config() /etc/inc/config.gui.inc:92
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP   7. alias_make_table() /etc/inc/config.lib.inc:185
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP Stack trace:
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP   1. {main}() /usr/local/www/crash_reporter.php:0
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP   2. require() /usr/local/www/crash_reporter.php:63
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP   3. require_once() /usr/local/www/guiconfig.inc:79
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP   4. include_once() /etc/inc/authgui.inc:55
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP   5. get_configured_ip_addresses() /etc/inc/auth.inc:201
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP   6. require_once() /etc/inc/util.inc:1399
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP   7. require_once() /etc/inc/interfaces.inc:61
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP   8. require_once() /etc/inc/gwlb.inc:54
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP   9. parse_config() /etc/inc/config.inc:218
[21-Jul-2016 11:11:16 Asia/Ho_Chi_Minh] PHP  10. alias_make_table() /etc/inc/config.lib.inc:185


Filename: /var/crash/minfree
2048
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on July 21, 2016, 07:03:38 am
@nhimcoi30889 Sorry to hear. But the error doesn't suggest the problem comes from the captiveportal files I've written.
What pfSense version are you running ?
Can you reproduce the error on a VM ?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on July 21, 2016, 07:18:08 am
is it possible to use a node.js file for the captive portal? Or using mongodb?

MySQL is used because of the FreeRADIUS authentication.
You may adapt the php script to whatever database your RADIUS server uses.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: nhimcoi30889 on July 21, 2016, 12:22:31 pm
@nhimcoi30889 Sorry to hear. But the error doesn't suggest the problem comes from the captiveportal files I've written.
What pfSense version are you running ?
Can you reproduce the error on a VM ?
Hi deajan,
my issue resolved by rollback pfsense ver 2.2.6 (issue on ver >= 2.3 )
i have a question more. i found this on captiveportal-config.php file
Code: [Select]
$confirmationCode = "0000";If i want this code generate via mysql ?
For example, i gen about 100 codes map with 100 email and storage on database. When user input their email and confirmationCode after they access internet
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on July 21, 2016, 12:50:57 pm
@nhimcoi30889 This captive portal isn't supposed to work that way. It's an "no account setup" portal page.

If you want to use it the way you describe, you should create the radius accounts you want with the confirmation code as password, and remove the part where the radius account is created from the main CP file.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: nhimcoi30889 on July 21, 2016, 07:15:23 pm
Hi Deajan,
I can to create account on Radius with format email address ?
For example : test@abc.com
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on July 22, 2016, 02:56:23 am
@nhimcoi30889 Sorry but your sentence makes no sense to me. If your question was if radius supports emails as usernames, the answer is yes.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: nhimcoi30889 on July 28, 2016, 07:29:42 pm
HI deajan,
today i just upgrade from 2.2.6 to 2.3.1 Release
After upgraded, i start mysql againt but show error :
Code: [Select]
[2.3.1-RELEASE][admin@pfSense.it.mt]/root: service mysql-server.sh start
Starting mysql.
Bad -c option
/usr/local/etc/rc.d/mysql-server.sh: WARNING: failed to start mysql
Can u help me?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on July 29, 2016, 04:34:24 am
Upgrades in 2.2.X are destructive for MySQL installation because they basically reinstalls a full OS.
Only 2.3.X upgrade series won't destroy anything because they work fine grained.

In order to get things working again, you have to uninstall and reinstall mysql. Keep in mind that directions to install  mysql for 2.3.x aren't the same as for 2.2.x.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: nhimcoi30889 on July 29, 2016, 09:30:10 pm
Hi Deajan,
I tried remove old mysql and reinstall new version but problem the same
Can you give solution ?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: nhimcoi30889 on July 31, 2016, 10:04:41 am
Hi deajan,
can you help me ?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on August 04, 2016, 01:49:08 pm
How am I supposed to know what happens with your setup without even knowing what you did to uninstall / reinstall mysql ?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: nhimcoi30889 on August 10, 2016, 05:28:57 am
Hi Deajan,
Do you try with pfsense 2.3.2 ?
I tried , the first it working normally
But after reboot mysql not working, and FreeRadius2 dont working
This is log when i start FreeRadius2
Code: [Select]
Aug 10 17:14:04 radiusd 57335 rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
Aug 10 17:14:04 radiusd 57335 rlm_sql (sql): Attempting to connect to radius@127.0.0.1:3306/radius
Aug 10 17:14:04 radiusd 57335 rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
Aug 10 17:14:04 radiusd 57335 rlm_sql_mysql: Starting connect to MySQL server for #0
Aug 10 17:15:19 radiusd 57335 rlm_sql_mysql: Couldn't connect socket to MySQL server radius@127.0.0.1:radius
Aug 10 17:15:19 radiusd 57335 rlm_sql_mysql: Mysql error 'Can't connect to MySQL server on '127.0.0.1' (60)'
Aug 10 17:15:19 radiusd 57335 rlm_sql (sql): Failed to connect DB handle #0
Aug 10 17:15:19 radiusd 57335 rlm_sql (sql): There are no DB handles to use! skipped 5, tried to connect 0
Aug 10 17:15:19 radiusd 57335 Failed to load clients from SQL.
Aug 10 17:15:19 radiusd 57335 rlm_sql (sql): Closing sqlsocket 4
Aug 10 17:15:19 radiusd 57335 rlm_sql (sql): Closing sqlsocket 3
Aug 10 17:15:19 radiusd 57335 rlm_sql (sql): Closing sqlsocket 2
Aug 10 17:15:19 radiusd 57335 rlm_sql (sql): Closing sqlsocket 1
Aug 10 17:15:19 radiusd 57335 rlm_sql (sql): Closing sqlsocket 0
Aug 10 17:15:19 radiusd 57335 /usr/local/etc/raddb/sql.conf[2]: Instantiation failed for module "sql"
Aug 10 17:15:19 radiusd 57335 /usr/local/etc/raddb/sites-enabled/default[185]: Failed to find "sql" in the "modules" section.
Aug 10 17:15:19 radiusd 57335 /usr/local/etc/raddb/sites-enabled/default[185]: Failed to parse "sql" entry.
Aug 10 17:15:19 radiusd 57335 /usr/local/etc/raddb/sites-enabled/default[69]: Errors parsing authorize section.
Aug 10 17:15:19 radiusd 57335 Failed to load virtual server <default>

This is error when connect mysql
Code: [Select]
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I tried add manual file my.cnf to /usr/local/etc/mysql/my.cnf but dont working
Can you give some recomment ?
Tks bro
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: caraffandee on August 11, 2016, 03:25:38 pm
Hi Deajan.
Firstly a big thank for this great howto. Detailed and comprehensive.
Now, I apologize, I'm a newbee about pfSense (although an experienced Linux/PHP/DB/ecc. programmer), so my question might be trivial.
The network I'm trying to setup with your captive portal feature has a router (Zyxel) with REDIUS support. The router is also configured to act as DHCP server for my local network. Actually my pfSense machine/installation will be used ONLY for RADIUS/CaptivePortal authentication. In other words, my pfSense installation is configured in "appliance" mode, i.e. with the only one eth interface (WAN) enabled. I've configured the router to assign a static IP to my pfSense server.
The point now is this. When I create a CP zone in the WebConfigurator, at the bottom of the page I read the following hint:
Quote
Don't forget to enable the DHCP server on the captive portal interface! Make sure that the default/maximum DHCP lease time is higher than the hard timeout entered on this page. Also, the DNS Forwarder or Resolver must be enabled for DNS lookups by unauthenticated clients to work.
What about the DHCP server on the CP interface? Do I need to disable the router's DHCP server, in order to have pfSense assign all the mess, or is there another way to configure the DNS resolver?
Thanks again for the great howto and any suggestion you'll give.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on August 31, 2016, 10:28:18 am
Sorry for the late reply.
As long as the DNS is pfSense, I think you can use whatever DHCP server you like.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on August 31, 2016, 10:29:15 am
@nhimcoi30889

I'm pretty sure that you have two instances of mysql running. Check with ps aux.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: astatine on October 12, 2016, 03:57:25 am
Hi deajan,

First thank you very much for this perfect HOWTO.

But I got a problem when i import the admin.sql script. Please have a look below:

Code: [Select]
mysql radius < admin.sql
ERROR 1064 (42000) at line 31: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PRIVIELGES' at line 1

Do you have any idea how to fix it? I am running a brand new pfsense 2.3 on a PC. Thank you in advance.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on October 12, 2016, 05:08:52 am
There was a typo in admin.sql, should read PRIVILEGES and not PRIVIELGES.
Corrected on github. You may redownload the latest archive at https://github.com/deajan/pfSense-cp-auth-onestep/archive/master.zip
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: astatine on October 12, 2016, 09:05:44 am
There was a typo in admin.sql, should read PRIVILEGES and not PRIVIELGES.
Corrected on github. You may redownload the latest archive at https://github.com/deajan/pfSense-cp-auth-onestep/archive/master.zip

Merci!!! Problem solved!!
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: xAm56 on October 27, 2016, 08:42:17 am
Hello deajan,

First thank you a lot for your work, the system works great !

I try to use your template only with the "room number" field  to log in on the portal.

I successfully disable the others fields (familyName, surName, emailAddress and newsletter) but when i validate the form, I've a blank page.

However, I pass the portal and I can access to the web but the result is not very clean

Could you please explain me which modifications I have to make in ozy-captive.php and perhaps in captiveportal-config.php .

Thanks in advance !
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on October 29, 2016, 08:03:24 am
Hello xAm56,

As far as I remember, the username is a combination of emailAdress and roomNumber and password is a combination of familyName and surName, in order to get some degree of randomness.
Basically, only using room number would mean that Radius records would not be unique.

I'll have a to push an update until monday which adds the language parameter in the url.
I'll try to check your usecase in the same time.

Regards,
Orsiris.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on October 30, 2016, 04:19:46 am
Have a look at the latest commits on github at https://github.com/deajan/pfSense-cp-auth-onestep/releases/tag/v0.44
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: saygon on November 01, 2016, 11:54:13 am
Hi @deajan and thank you for your amazing work!

Unfortunately I'm not able to run mysql server.
I have made a clean install of pfSense 2.3, configured wan and lan, internet works. I'm also able to install all what do you mentioned on this guide.
Each time I try start mysql server it comes some error:
Code: [Select]
[2.3.2-RELEASE][admin@pfSense.localdomain]/root: service mysql-server.sh start
Starting mysql.
Bad -c option
/usr/local/etc/rc.d/mysql-server.sh: WARNING: failed to start mysql
I have already research on Google regarding to this error, but don't found nothing useful.
Please let me know if you need some additional info or log output.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on November 01, 2016, 03:50:55 pm
@saygon I remember having dealt with that error while developping this project.
Don't remember the exact root cause... probably a bad mysql version installed.

Remove and reinstall the version corresponding to your setup.
If the problem still occurs, post the content of your mysql_server.sh file, and mysql -v output.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: astatine on November 03, 2016, 02:33:08 am
Quote
+----+----------+-------+---------------+---------------------+
| id | username | pass  | reply         | authdate            |
+----+----------+-------+---------------+---------------------+
|  1 | testu    | testp | Access-Accept | 2015-09-29 15:13:24 |
+----+----------+-------+---------------+---------------------+

Hello deajan,

would you please tell me , how can I set MD5 encrypt here for user password?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on November 03, 2016, 06:32:24 am
@astatine Your question isn't in the scope of this howto. Please make your own question regarding FreeRADIUS + MySQL setup only.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: joel.dq on November 04, 2016, 04:39:00 pm
Hello !

I'm new to pfSense and forum. I was tasked to set up this type of access for an organization and I'm having a small trouble that  I probably think it's pretty stupid but can't make it work.

I followed the instructions to the letter and I got the captive portal working as is- No modification of the files except for mysql password etc.

On the LAN PC I get successfully forwarded to the Captive Portal but as soon as I press Connect nothing happens, the form is cleared (as if new connection) and remain there.

I tried to see if the PHP inserted something in the radius DB but I found nothing there and for the life of me I can't find in the logs, or where in the logs, I can tail if there are connectivity errors with mysql +  php etc.

I do want t thank you though, the guide is very detailed and I was able to set everything up quick. I just now need to to make that work.

Thanks !
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on November 09, 2016, 04:33:51 am
Hello joel.dq,

Can you activate debug mode in captiveportal-config.php ?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: joel.dq on November 10, 2016, 05:22:48 pm
I think I did already. Where should I see that logging?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on November 11, 2016, 03:07:44 am
There's no logging, it's about getting the error messages onscreen.
What version of the captive portal code are you using ? What user input do you ask for to connect ?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: joel.dq on November 12, 2016, 05:34:51 pm
There's no logging, it's about getting the error messages onscreen.
What version of the captive portal code are you using ? What user input do you ask for to connect ?

Hello


I'm using 2.3.2-RELEASE-p1 version. 

The inputs I'm asking are

1) Room # (renamed to Age) . I put it because I can read in the code that the room# is used to create the radius account.
2) Name
3) Surname
4) Mail

Debug is enabled

/usr/local/captiveportal: cat captiveportal-config.php | grep DEBUG
DEFINE("DEBUG", true);
DEFINE("DEBUG", true);

What is happening is that I do get the Captive Portal. I fill the details and click Connect. Nothing happens, no error on the screen and simply clears the form as if first reaching the CP page.

http://i.imgur.com/a/TfTn4

and form gets cleared

http://imgur.com/a/Z8Udw

I normally try to debug myself, I have rudimentary php skills to understand what code does, but I'm lost when JS is involved.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on November 16, 2016, 06:00:11 am
Hello,

What version of captiveportal do you use ? Latest from git ?

Can you mail me your captiveportal-config.php file at ozy at netpower dot fr ?

Also, assuming you did a Spanish translation, can you give me that so I add it to git ?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: joel.dq on November 16, 2016, 06:33:40 am
Hello,

What version of captiveportal do you use ? Latest from git ?

Can you mail me your captiveportal-config.php file at ozy at netpower dot fr ?

Also, assuming you did a Spanish translation, can you give me that so I add it to git ?

Latest from GIT. Sending and many thanks for your assistance.

I'll send you the spanish translation a bit later. Modified it outside hotel for educative institute.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on November 16, 2016, 08:51:13 am
Your config file does not come from the latest git, there have been at least 7 commits since your version.
Please UPDATE ALL files before posting about this again.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: joel.dq on November 18, 2016, 07:11:01 am
Your config file does not come from the latest git, there have been at least 7 commits since your version.
Please UPDATE ALL files before posting about this again.

I found the issue.

When I put the terms of use as false, no matter what other options I try with true or false, it won't go on.

$askForTermsOfUse = false;

While the option to put it false is there, apparently it has to always be true to work.

Regards
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on November 18, 2016, 10:29:13 am
Well this was more or less by design, as accepting Terms of use is mandatory.
In the meanwhile, I added askFor[all] parameters, without updating the fact that Terms of Use aren't mandatory anymore.

I've commited a quick and dirty fix you may try.

Regards,
Ozy.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: joel.dq on November 21, 2016, 04:03:48 pm
Well this was more or less by design, as accepting Terms of use is mandatory.
In the meanwhile, I added askFor[all] parameters, without updating the fact that Terms of Use aren't mandatory anymore.

I've commited a quick and dirty fix you may try.

Regards,
Ozy.

I can confirm it now works perfect ! Thanks very much Ozy
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: hsrtreml on November 25, 2016, 09:56:30 am
Hello Ozy, great work. Thank you.

I have couple of questions about authentification and administration:

How do you disable "non" Hotel guests? You solution is free and open for all "participants".
Is it possible to check the room number, before accepting the registration?
Why does in pfSense in FrreRadius section not listing the registrated user? Only within mySQL-database.
Have you thinking about the process to validate "the login" with eMail confirmation by the user or by the hotel?

Thanks so lot for a discussion.
Best regards
Treml
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: lienor on November 28, 2016, 03:55:47 am
Hi Ozy,

Great work on this, thank you! Just some question:

When I reboot my pfsense machine, all credentials are gone. Users will need to re-input and goes back to the landing page. Is that how it should be? Is there anyway the credentials are stored even after every reboot?

Thanks Ozy
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on November 29, 2016, 03:13:30 am
@hsrtreml:

1/ Non hotel guests are excluded via confirmation code (which is basically a stupid code you give the customers at the reception desk)
2/ This is a SELF REGISTERING solution. If you don't need this, you could remove the self registering part and create FreeRADIUS accounts with roomnumber and different passwords per room which you give to the customers
3/ Because pfSense FreeRADIUS UI does not know about the underlying SQL storage, you may open a ticket at redmine.pfsense.org
4/ Well... Confirm the email without having internet ? That's the point of providing wifi, isn't it ?

@lienor:
That's the normal behavior. Unless you know how to play with pfSense's SQLite database where the CP stores identification, you won't be able to change this.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: hsrtreml on November 29, 2016, 07:34:45 am
@hsrtreml:
Thanks for your quick reply.

1/ Non hotel guests are excluded via confirmation code (which is basically a stupid code you give the customers at the reception desk)
Good idea!

2/ This is a SELF REGISTERING solution. If you don't need this, you could remove the self registering part and create FreeRADIUS accounts with roomnumber and different passwords per room which you give to the customers
The point above (1.) will substitute this point.

3/ Because pfSense FreeRADIUS UI does not know about the underlying SQL storage, you may open a ticket at redmine.pfsense.org
ok.

4/ Well... Confirm the email without having internet ? That's the point of providing wifi, isn't it ?
Perhaps an internal network messages to the hotel information system?
btw.
First the customer get internet access after self registration and if the validation is not correct or the time (5 minutes) for confirmation is over, we delete the entry in the SQL-Database?

@lienor:
That's the normal behavior. Unless you know how to play with pfSense's SQLite database where the CP stores identification, you won't be able to change this.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: lienor on November 29, 2016, 08:43:51 am
@hsrtreml:

1/ Non hotel guests are excluded via confirmation code (which is basically a stupid code you give the customers at the reception desk)
2/ This is a SELF REGISTERING solution. If you don't need this, you could remove the self registering part and create FreeRADIUS accounts with roomnumber and different passwords per room which you give to the customers
3/ Because pfSense FreeRADIUS UI does not know about the underlying SQL storage, you may open a ticket at redmine.pfsense.org
4/ Well... Confirm the email without having internet ? That's the point of providing wifi, isn't it ?

@lienor:
That's the normal behavior. Unless you know how to play with pfSense's SQLite database where the CP stores identification, you won't be able to change this.

Thanks Ozy, I have found a way to store the entries by checking Enable Pass-through MAC automatic additions on Captive Portal. Somehow, the entries are still there even after reboot. My only problem is that FreeRADIUS is not starting automatically on restart, I tried all the possible fixes in forums but still failed. Seems like a bug on the new version of PFSense, but not that serious though.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on November 29, 2016, 01:24:33 pm
Be careful with passthrough MAC entries, they are persistent, but will prevent ANY further logins, even if you try to force disconnect them after some period using the CP settings.
As for FreeRADIUS not starting, this is actually a known issue for my setup.

Whenever FreeRADIUS starts before MySQL, it will fail to connect to the database (you'll have logs about this), and will simply fail to start.
A quick workaround is to install Watchdog service and let it check / restart FreeRADIUS.

Btw, if someone knows how to improve the boot order I'd be happy.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: hsrtreml on December 02, 2016, 03:23:19 am
@hsrtreml:

2/ This is a SELF REGISTERING solution. If you don't need this, you could remove the self registering part and create FreeRADIUS accounts with roomnumber and different passwords per room which you give to the customers

@hsrtreml:
One question again: Do you have an easy way to check or validate the room number? Just between a range (100 to 300) or within an array (100, 101, 101, ...).

best regards
Treml
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on December 02, 2016, 06:21:21 am
@hrstreml Could be easily implemented on line 114 of main file, using a global variable containing a range or an array in config file.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: geocbr600rr on December 14, 2016, 02:49:00 am
Hi @deajan and thank you for your amazing work!

Unfortunately I'm not able to run mysql server.
I have made a clean install of pfSense 2.3, configured wan and lan, internet works. I'm also able to install all what do you mentioned on this guide.
Each time I try start mysql server it comes some error:
Code: [Select]
[2.3.2-RELEASE][admin@pfSense.localdomain]/root: service mysql-server.sh start
Starting mysql.
Bad -c option
/usr/local/etc/rc.d/mysql-server.sh: WARNING: failed to start mysql
I have already research on Google regarding to this error, but don't found nothing useful.
Please let me know if you need some additional info or log output.

Hi @saygon I had the same issue... Allow me to write down what I did and works for me!

First I change the default shell access for user mysql
chsh -s /bin/sh mysql

Then edit /etc/rc.subr file
change "su -m" to "su -s" in the file I think you will find it two times in the file!

I don't know if this is a correct way but it works for me..
Thanks
Ps. Many thanks to @deajan for his great work!!
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: hsrtreml on December 16, 2016, 12:27:21 pm
Hello,

if I install sql-server in a separate pfsense (Hardware), where are the entries of the sql-server IP to integrate free radius (of the basic pfsense) with sql-pfsense?

Thanks for your reply.

best regards
Treml
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: dhipo on January 25, 2017, 11:31:29 am
some issue with pfsense 2.3.2-p1

i did an clean install
the redirect page was show (perfect)
i put all parameters (email, name, surname) agree newsletter and terms

clicked connect

and a Blank Screen is presented
with this url http://192.168.1.1:8002/index.php?zone=&redirurl=&language=en
nothing is inserted on mysql tables
and log shows
php-fpm   58240   /index.php: Submission to captiveportal with unknown parameter zone:

any glue ?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: sanketgroup on January 26, 2017, 04:56:08 am
Hi deajan
Thanks for superb detail explanation.

One question: How can i integrate separate MySQL server. I have already MySQL running on different PC (in LAN).
I know about point IP to MySQL server, but

how do i create table structure in my separate sql server.

I downloaded http://netpower.fr/sites/default/files/soft/bin/pfSense-cp-auth-onestep.gz   file from step 2.2.2.
But it is not useful to create structure.

Pls help me.

Thanks
Sanket
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on January 27, 2017, 02:43:42 am
@dhipo Did you set up a correct zone name in pfSense GUI ?
Also, which version have you tried ? Can you try with latest git master tree ?

You asked for a "glue", I can't give you that, but the latest dev snapshot should stick toghether with 2.3.2 without problems :)

@sanketgroup
The archive contains some sql files (in sql directory) that you must run on your mysql server.
Btw, also use latest github sql files because of an error in previous versions.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: sanketgroup on January 27, 2017, 04:08:31 am
where can i find latest github sql files?

I got schema from https://wiki.freeradius.org/config/MySQL-DDL-script
However there were some mismatch in column names.

Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on January 27, 2017, 05:02:03 am
See https://github.com/deajan/pfSense-cp-auth-onestep
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: sanketgroup on January 27, 2017, 05:58:12 am
perfect, this schema worked.
BUT
how can i add internet username and passwords in sql.

for e.g In current setup, user  'testu' has been created PFSense>Services>FreeRadius>Users

if i delete this user here, it does not go to my sql to check the user.
And also i do not know in which table and now i can create users in MySQL.
Pls let me know.

Thanks a lot
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on January 27, 2017, 06:11:47 am
how can i add internet username and passwords in sql.

for e.g In current setup, user  'testu' has been created PFSense>Services>FreeRadius>Users

if i delete this user here, it does not go to my sql to check the user.
And also i do not know in which table and now i can create users in MySQL.
Pls let me know.

Thanks a lot

That's not how this captive portal is supposed to work.
It creates the user accounts on the fly.
If you don't want that behavior, just check the code of ozy-captive.php that creates the user in order to disable it and create them manually in the same manner the code does.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: sanketgroup on January 27, 2017, 07:41:39 am
On ozy-captive.php page.
when i fill in Email, Family Name, Surname and click connect - I get following error.


Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in C:\xampp\htdocs\PFSense-cp-auth\ozy-captive.php:35 Stack trace: #0 C:\xampp\htdocs\PFSense-cp-auth\ozy-captive.php(65): cleanInput('en') #1 {main} thrown in C:\xampp\htdocs\PFSense-cp-auth\ozy-captive.php on line 35

=== Mainly i want to store username password generated from my CRM application to radius database.
I have own CRM application which i can modify to store username password of hotspot users into radius database.
And then captive portal will verify that user in radius mysql database.
But I do not know in which table and column i have to insert usertname password.
And may be their plan like 1gb per day, or 2 hours access etc

Thanks
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: dhipo on January 27, 2017, 11:50:47 am
@deajan

i got the latest git files and works perfect ..

i did some mods on sql tables(more fields, to administrative purposes) and working too

i'm using pf 2.3.2p1

i used toghther Squid and LightSquid to do Reports and work too

great Job

Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: sanketgroup on January 28, 2017, 01:27:40 am
Ok, i found the table name. It is radcheck.
Captive Portal is successfully authenticating username password stored in this table.

Now one question: how do i set usage type to users.

for e.g I want some user to have
1GB per day  or
2 HR access  or
100MB for 2 Hrs
etc.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on February 03, 2017, 02:49:49 am
@sanketgroup This is out of the captive portal discussion but after a short google request I found this one:

Code: [Select]
INSERT INTO radcheck ( id , UserName , Attribute , op , Value ) VALUES ( NULL , 'user', 'user-password', '==', 'user');
INSERT INTO radreply (username, attribute, op, value) VALUES ('user', 'Rate-Limit', '=', '1024k/1024k');

It may be adapted to fit actual radius table scheme, you may find info on how to configure it on freeradius documentation.

Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: ardorin on February 03, 2017, 07:33:35 am
First of all, amazing job, it works perfectly.
However I have a small problem: in french and in spanish accents dont work.
I use UTF-8 in HTML header.
It only works if for example I replace á with &aacute; in the config file
Im also using the files from your github

Is there anything that should be added?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on February 03, 2017, 07:41:19 am
@ardorin Strange, I actually developped this on french computers and did never get any trouble. What navigator do you use to check this ?

Also, can you try to add the following after line 327 ?
Code: [Select]
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: ardorin on February 03, 2017, 08:14:37 am
I tried adding that line and then in both Chrome and Firefox without any luck.
If I type any input in the HTML file with accents, it works, so the HTML header seems fine. The problem are the accents in the strings of the config file, for some reason they are not being coded correctly when introduced in the main file. Characters with accents are being replaced by a question mark.
I did edit your code a bit, but I didnt touch anything of the HTML part.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on February 03, 2017, 08:18:12 am
@ardorin What platform are you running ?
I hope you didn't copy paste some of the code :)
Please check that all files are UTF-8 without BOM encoded.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: ardorin on February 03, 2017, 10:24:33 am
I edited the database part, so those changes I made should not be irrelevant (and that part is working perfectly) 
Yes, every file is UTF without BOM encoded
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: Alexandre4sol on February 03, 2017, 10:39:46 am
Dear, I have the problem "/index.php: Submission to captiveportal with unknown parameter zone:".
I got the newest files and still the error continues.
I looked over the correction post and I also could not solve it.
Home page opens to register the form and fell on a white page with the url: http://192.168.123.1:8002/index.php?zone=&redirurl=&language=en.
In the log the message "/index.php: Submission to captiveportal with unknown parameter zone:"
Can someone help me I'm out of ideas?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on February 04, 2017, 05:52:20 am
@ardorin: out of ideas here. Have tested it on linux / windows, using various languages and systems. Didn't happen to me. Maybe start with a fresh install and try again ?
@Alexandre4sol: Are you running on 2.2 ? Cause zone parameter was introduced in 2.3. Also, what's your exact zone name ?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: Alexandre4sol on February 04, 2017, 06:31:01 am
@deajan: Hi, thanks for helping me out.
I'm using version 2.3.2-RELEASE (i386)
the captive portal zone is "guest"
This is the link to open the registration form. http://192.168.123.1:8002/index.php?zone=guest&redirurl=http%3A%2F%2Fwww.gstatic.com%2Fgenerate_204
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on February 04, 2017, 06:53:38 am
@Alexandre4sol: I think dhipo on this thread did have the same error. Maybe you should talk to him to see how he managed to solve this. As for me I'll have to make some tests because I never encountered that problem.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: guterkerl on February 19, 2017, 03:15:32 pm
Hi had issues with the one downloaded from git.
Code: [Select]
https://codeload.github.com/deajan/pfSense-cp-auth-onestep/zip/master
The old version worked fine but the new one didn't.
Code: [Select]
http://netpower.fr/sites/default/files/soft/bin/pfSense-cp-auth-onestep.gz
Quote
Fatal error: Call to undefined function mysql_real_escape_string() in /var/etc/captiveportal_wifi.html on line 35 Call Stack: 0.0002 226208 1. {main}() /usr/local/captiveportal/index.php:0 0.0170 1469432 2. portal_reply_page() /usr/local/captiveportal/index.php:288 0.0171 1469680 3. get_include_contents() /etc/inc/captiveportal.inc:1944 0.0172 1487664 4. include('/var/etc/captiveportal_wifi.html') /etc/inc/pfsense-utils.inc:2601 0.0277 1500240 5. cleanInput() /var/etc/captiveportal_wifi.html:45 PHP ERROR: Type: 1, File: /var/etc/captiveportal_wifi.html, Line: 35, Message: Call to undefined function mysql_real_escape_string()
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on February 19, 2017, 04:05:39 pm
@guterkerl That's why releases exist on github, in order to not pick up a project at a random moment in the dev process. You should take release v0.46 on github which is latest and functionnal.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: guterkerl on February 20, 2017, 12:48:39 am
oh ok thanks deajan
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: probie on March 02, 2017, 11:57:20 pm
@deajan, I followed your instruction on PFS2.3.3 and it worked like a champ.  I tried to customize to my enviroment and was wondering on I would change the font size of "Hotel WiFi"?
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on March 06, 2017, 07:37:40 pm
@probie Late reply, sorry. You can mod the text size directly in the css of ozy-captive.php. Find the line with
Code: [Select]
.vertical-text and modify font-size to whatever you need.
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: krotin on March 21, 2017, 09:27:50 am
Hi Deajan, Thank you for sharing your work.
My mistake I messed up mysql password during 'secure installation'.

How can I reset it to carry on with your [How To]

Thank you again.

Krotin
Title: Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
Post by: deajan on March 21, 2017, 04:05:14 pm
@krotin google is your friend http://www.pastbedti.me/2008/11/resetrecover-mysql-root-password-in-freebsd/