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

    Haproxy Fatal Error

    Scheduled Pinned Locked Moved pfSense Packages
    9 Posts 6 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
      cuvy
      last edited by

      Hi there,

      I'm trying to install HAProxy 1.5 and I get this error when it gets to Loading package instructions…

      Fatal error: Can't use function return value in write context in /usr/local/pkg/haproxy.inc on line 1161

      I'm not sure what that means exactly.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • P
        phil.davis
        last edited by

        That line is:

        if (!empty(haproxy_getocspurl($filename))) {
        

        The currently used PHP in pfSense should be able to handle using empty() to directly test the return value of a function, like that.

        What version of pfSense are you using?

        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

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

          I'm running 2.1.5-RELEASE

          1 Reply Last reply Reply Quote 0
          • D
            doktornotor Banned
            last edited by

            Hmmm, good luck.

            1 Reply Last reply Reply Quote 0
            • P
              PiBa
              last edited by

              Should get fixed in a few days..
              Regards PiBa-NL

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

                I'm on 2.1.4 and getting the same problem although mine just stays stuck on loading package instructions, I can't remove the package either now. :/

                Any ETA on a fix?

                thanks

                matt

                1 Reply Last reply Reply Quote 0
                • P
                  phil.davis
                  last edited by

                  For the fatal error you just need to change haproxy.inc code:

                  if (!empty(haproxy_getocspurl($filename))) {
                  

                  to:

                  $ocspurl = haproxy_getocspurl($filename);
                  if (!empty($ocspurl)) {
                  

                  Assuming there are not other badly broken things in the package when run on pfSense 2.1.5.

                  The complete pull request of changes to the package is https://github.com/pfsense/pfsense-packages/pull/1015
                  To implement that before it gets committed to the official repo you would have to make all those changes to the corresponding files on your system. That is not so automated, because the places where the file live in the repo and where they are put on a real system by the package install are different paths. But if you understand that and can find the relevant files to change, then you can test it all out.

                  Only do stuff like that on a test system where you can break it and take time out to reverse or fix what you did!

                  As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                  If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

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

                    Many Thanks!

                    It works on pfsense 2.15.

                    Johann

                    1 Reply Last reply Reply Quote 0
                    • P
                      PiBa
                      last edited by

                      Funny it works a few hours before the pkg v0.29 pullrequest was merged. ;D
                      Anyway if you do run into any other issue with haproxy let me know. I do intend to keep it working on 2.1.x for some time to come.. However the binaries wont be updated anymore, so you are (slightly?) at risk there! Still i don't regularly check my fixes&changes on 2.1, so it might happen again that i break it. :o sorry in advance.. :-[

                      Regards,
                      PiBa-NL

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