POSTGRESQL extension for PHP

  • Here is the scenario.

    I was developing a customized wireless internet access system with pfsense.  I am using a postgresql database server on another box and pfsense captive portal on another box.

    I know that when you add a user in pfsense captive portal, it is stored in a file in pfsense server. if a user logs in to captiveportal, the details of his login is also stored in a file call captiveportal.db.

    Here is how my customized wireless system works.

    when a user want to access internet, i will redirect it to my website login. i will check his username, password, then if valid i will also check his/her internet access account. if the user has still remaining hours of internet access (coz we gave each user a 50hrs internet access time) then that is only the time he will be granted to access the internet.

    What i want to happen is when the captiveportal allows the user to the firewall, i will run php scripts in pfsense that will connect to my database server and logs the starting time, the last activity time and eventually logs that total hours of access so i can track his/her internet access hours history using my database.

    the problem is i dont see and i can not find the extension which is needed to connect to posgresql database from the pfsense box.
    If the extension is there, i can directly connect to my database server and logs everything by just adding some php scripts in /usr/local/captiveportal.index.php and my problem is solve.
    But that is until i find the extension….

    Any ideas about this matter would be a great help for me to solve my problem.


Log in to reply