Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Latest update left PFSENSE without php-mysql support

    Scheduled Pinned Locked Moved 2.3-RC Snapshot Feedback and Issues - ARCHIVED
    6 Posts 4 Posters 2.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      josepgb
      last edited by

      Hi,

      after this morning update, my captive portal webpage which contains a mysql_connect order, stopped working

      [20-Jan-2016 11:58:46 Europe/Madrid] PHP Fatal error:  Call to undefined function mysql_connect() in /var/etc/captiveportal_cpzone.html on line 23

      Tryin to activate php56-mysql via php_dynamodules without success

      Any idea of what happened in the latest update to amd64 version?

      Thanks

      1 Reply Last reply Reply Quote 0
      • M
        maverick_slo
        last edited by

        Probably (taken from PHP.net):

        Warning

        This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include:

        mysqli_connect()
            PDO::__construct()

        BR,
        Greg

        1 Reply Last reply Reply Quote 0
        • J
          josepgb
          last edited by

          Just installed my virtual machine again using the yesterdays amd64 iso.

          Then I loaded my saved config.xml and upgraded using

          pkg upgrade -f

          from the console. Dunno what happened, but now it works…

          Please someone will be kindly enough to let me know if the new 2.3 version will have support for php connectivity to mysql? This is a crucial point for my captive portal projects, and I need to know if plans are to have native support or it will work as the mess it was in previous versions.

          There are other open source firewalls out there with php-mysql support, but I prefer pfsense. But this is a must have.

          Thanks!

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            The way pkg works it's safe now to leave that off the base system and allow it to be installed manually or as a package dependency. We're trimming out a few similar things.

            You can install it as follows:

            pkg install php56-mysql
            

            And then it will work as you're used to.

            On prior versions of pfSense, doing that was dangerous so we had to build that in or it would never have worked properly. Once all that settles we'll update documentation to reflect the new procedure.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • J
              josepgb
              last edited by

              Thanks Jimp,

              already tried this, but console said that package was not available…

              also I did a pkg search php56 and that one did not popup...

              Now, in my rebuilded machine, if I do a pkg search php56 it shows up. Yes, I know that I should expect this in beta stages :)

              Thanks for your reply, Pfsense Support is awesome as always.

              cheers from Barcelona.

              1 Reply Last reply Reply Quote 0
              • rbgargaR
                rbgarga Developer Netgate Administrator
                last edited by

                @josepgb:

                Thanks Jimp,

                already tried this, but console said that package was not available…

                also I did a pkg search php56 and that one did not popup...

                Now, in my rebuilded machine, if I do a pkg search php56 it shows up. Yes, I know that I should expect this in beta stages :)

                Thanks for your reply, Pfsense Support is awesome as always.

                cheers from Barcelona.

                I've added php56-mysql (which is now deprecated in PHP 7, also added php56-mysqli and php56-pdo_mysql which are better options. Consider to upgrade your code to use one of them.

                Renato Botelho

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.