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

    PHP Warning after a package installation

    Scheduled Pinned Locked Moved Traffic Monitoring
    7 Posts 3 Posters 1.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.
    • D
      ddepaolis
      last edited by

      After I installed package "Ntopng" I had the following message:

      "PHP Warning: PHP Startup: Unable to load dynamic library 'readline.so' (tried: /usr/local/lib/php/20170718/readline.so (Shared object "libreadline.so.7" not found, required by "readline.so"), /usr/local/lib/php/20170718/readline.so.so (/usr/local/lib/php/20170718/readline.so.so: invalid file format)) in Unknown on line 0"

      I'm actally using 2.4.4-RELEASE-p1

      I found a possible solution in this following thread: https://forum.netgate.com/topic/151780/pfblockerng-devel-install-php-startup-errors-failed-to-load-readline-so.
      May I follow same steps to solve my problem ?
      Thanks and regards !

      S 1 Reply Last reply Reply Quote 0
      • S
        SteveITS Galactic Empire @ddepaolis
        last edited by SteveITS

        @ddepaolis if you’re on an old version and didn’t change the version in System/Update then you probably corrupted the package system and dependencies. For instance installed a later PHP version. You probably need to reinstall. See thread https://forum.netgate.com/topic/161797/sg-5100-auto-updated-to-new-packages-but-still-old-pfsense/5?_=1615086362670

        Edit: I don’t think 2.4.4 was available anymore anyway.

        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
        Upvote 👍 helpful posts!

        D 1 Reply Last reply Reply Quote 0
        • D
          ddepaolis @SteveITS
          last edited by

          @teamits said in PHP Warning after a package installation:

          if you’re on an old version and didn’t change the version in System/Update then you probably corrupted the package system and dependencies. For instance installed a later PHP version. You probably need to reinstall.

          Thanks for replying Steve, so according to you I'd need to reinstall all from scratch or simply remove package "Ntopng" ?
          This PFSense is actually on a "production environment" and any changment have to do be done very carefully. That's why it remained on version 2.4.4

          S bmeeksB 2 Replies Last reply Reply Quote 0
          • S
            SteveITS Galactic Empire @ddepaolis
            last edited by

            @ddepaolis I suspect from scratch. Haven’t run into this myself fortunately but the issue is whether the code for 2.5 installed files incompatible with 2.4 and things stop working.

            I wrote this in another post for 2.4.5:
            See https://redmine.pfsense.org/issues/10464. If you can't update pfSense to 21.2 you may need to get a copy of the installer from Netgate and reinstall/restore. If you're trying to stay on 2.4.5, what I would do is:

            *install 2.4.5
            *set to Previous Stable Version in System/Updates
            *install desired packages
            *restore configuration
            *double check Previous Stable Version is still set

            Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
            When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
            Upvote 👍 helpful posts!

            1 Reply Last reply Reply Quote 0
            • bmeeksB
              bmeeks @ddepaolis
              last edited by bmeeks

              @ddepaolis said in PHP Warning after a package installation:

              @teamits said in PHP Warning after a package installation:

              if you’re on an old version and didn’t change the version in System/Update then you probably corrupted the package system and dependencies. For instance installed a later PHP version. You probably need to reinstall.

              Thanks for replying Steve, so according to you I'd need to reinstall all from scratch or simply remove package "Ntopng" ?
              This PFSense is actually on a "production environment" and any changment have to do be done very carefully. That's why it remained on version 2.4.4

              One thing that, unfortunately, pfSense will let you do is install "current version" packages on top of an older version of pfSense. That will then cause things to break, sometimes fatally. It will install newer versions of shared libraries in place of existing older versions that the older version of pfSense you have installed was using. The older pfSense version can't always work with the newer libraries from the newer "current" pfSense version.

              So unless you first go and change that setting @teamits mentioned, if you install or update a pfSense package, that process will pull down files from the newest pfSense release branch (so in this case, that means 2.5.0 CE or 21.02_1 if you have a Netgate appliance) even when you actually have an older pfSense version installed. A number of folks have been hit with this quirk. And it happens pretty much every time a new version of pfSense is released during that window between the initial release date and when the vast majority get their systems updated.

              D 1 Reply Last reply Reply Quote 0
              • D
                ddepaolis @bmeeks
                last edited by

                @bmeeks

                Thanks for reply ! My PFSense is running on a VM so I can do a snapshot anyway before doing any type of workaround. Actually my dashboard shows the possibility to update to version 2.5. But as described in the following video, to update from 2.4.4 to 2.5 directly is not possible: https://www.youtube.com/watch?v=XkNrWWs1vJE ; in that video it's suggested to install 2.4.5 version (intermediate).

                Workaround I mentioned before ( https://forum.netgate.com/topic/151780/pfblockerng-devel-install-php-startup-errors-failed-to-load-readline-so/3 won't produce any result ?

                I'm also thinking to prepare a new PFSense VM (version 2.5) from scratch, restore all settings and swap with the older one... This's a longer solution but maybe safer...

                S 1 Reply Last reply Reply Quote 0
                • S
                  SteveITS Galactic Empire @ddepaolis
                  last edited by

                  @ddepaolis For instance did the package upgrade PHP? Anything else? You’d have to figure out what got upgraded. I would think installing 2.5 in a new VM and restoring your configuration would be the easiest way forward.

                  Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                  When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                  Upvote 👍 helpful posts!

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