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

    No mysql extensions compiled into the php?

    Scheduled Pinned Locked Moved Captive Portal
    4 Posts 2 Posters 1.7k 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.
    • I Offline
      islandwifibill
      last edited by

      Be gentle!!!  lol

      I was rather shocked to get the error message :
      Fatal error: Call to undefined function mysql_connect() in /var/etc/captiveportal-logout.html on line 22
      when testing a popup customization.  It would appear that mysql extensions are NOT compiled into the pfSense php installation?

      Can that be correct?  And who, exactly, discussed that concept with a stripper while three sheets in the wind and actually showed up to work next day to implement this wonderful idea?  Grin

      Or am I wrong…

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

        We do not use mysql in the base system, so we don't include/enable the module by default. It's there though, you just have to enable it.

        touch /etc/php_dynamodules/mysql
        /etc/rc.php_ini_setup
        /etc/rc.restart_webgui
        

        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
        • I Offline
          islandwifibill
          last edited by

          Thank you so much jimp!

          Yes, I had done a php -m and found the module, then manually added into php.ini however this would not have survived a reboot, I think.  I was looking around for a method like this.

          I'm coming from the linux world with system5 and all that jazz.  pfSense is my first real taste of BSD.  few differences.  ;)

          Nice job.

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

            That's not a BSD-ism, on a full FreeBSD install that all works practically identical to Linux.

            It's the way we handle PHP that is special. We only load what we need, since we have to target smaller platforms that have less memory.

            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
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.