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

    [SOLVED] PHP.ini points to wrong extensions directory.

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    9 Posts 3 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.
    • C
      cloudz
      last edited by cloudz

      I had been playing with IPv6 settings and couldn't get an IP from the provider anymore so I assumed a reboot would fix that.
      The device didn't come back online after the reboot so I hooked it up to my mac and saw a lot of php extension errors.
      It looks like the php.ini still points to an older release (20131226) instead of the current 20170718 directory.

      I've tried editing the php.ini file but it seems that doesn't survive a reboot so I've now sym-linked 20131226 > 20170718.

      Can anyone tell me how this happened and what I can do to fix it permanently?

      1 Reply Last reply Reply Quote 0
      • GrimsonG
        Grimson Banned
        last edited by

        Sounds more like you installed a current package into an old and unsupported base system, do a fresh install with a current pfSense version.

        1 Reply Last reply Reply Quote 0
        • C
          cloudz
          last edited by

          It's a brand new, shiny, sparkling install. Just received the hardware last week & the system says all it up to date. I've been installing and uninstalling a few packages (Snort, ACME, ntopng, ...) but nothing outside of the regular package manager.

          GrimsonG 1 Reply Last reply Reply Quote 0
          • GrimsonG
            Grimson Banned @cloudz
            last edited by

            @cloudz said in PHP.ini points to wrong extensions directory.:

            It's a brand new, shiny, sparkling install. Just received the hardware last week & the system says all it up to date.

            Official hardware? If not, never trust a preinstalled pfSense, there have been occasion where they were compromised before.

            Show a screenshot from the version information on the dashboard.

            1 Reply Last reply Reply Quote 0
            • C
              cloudz
              last edited by cloudz

              It's a blank PCEngines. Started from scratch with the official image on a USB stick.

              I found where it get the dir from:

              in /etc/rc.php_ini_setup it says

              if pkg info -e php72; then
                      PHP_VER=7
                      EXTENSIONSDIR="/usr/local/lib/php/20170718/"
              else
                      PHP_VER=5
                      EXTENSIONSDIR="/usr/local/lib/php/20131226/"
              fi
              

              and when running :

              [2.4.4-RELEASE][admin@pfSense.mylocal]/root: pkg info -e php72
              Shared object "libssl.so.111" not found, required by "pkg"
              

              So I'll probably need to solve that one.

              GrimsonG 1 Reply Last reply Reply Quote 0
              • GrimsonG
                Grimson Banned @cloudz
                last edited by

                @cloudz said in PHP.ini points to wrong extensions directory.:

                Started from scratch with the official image on a USB stick.

                And from where did this image come, the only official source for pfSense images is: https://www.pfsense.org/download/

                1 Reply Last reply Reply Quote 0
                • C
                  cloudz
                  last edited by

                  Yes. So I succeeded in breaking the thing :)

                  1 Reply Last reply Reply Quote 0
                  • C
                    cloudz
                    last edited by

                    Fixed it by downgrading PKG & running it again.

                    Now the /usr/local/etc/php.ini says :

                    extension_dir=/usr/local/lib/php/20170718/
                    

                    I ran these commands :

                    pkg-static install -f pkg
                    pkg upgrade -f
                    
                    1 Reply Last reply Reply Quote 0
                    • jimpJ
                      jimp Rebel Alliance Developer Netgate
                      last edited by

                      FYI- Looks like you set it to pull updates from the 2.5.0 development snapshots but didn't upgrade to 2.5.0.

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