Haproxy Fatal Error



  • 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!



  • 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?



  • I'm running 2.1.5-RELEASE


  • Banned

    Hmmm, good luck.



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



  • 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



  • 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!



  • Many Thanks!

    It works on pfsense 2.15.

    Johann



  • 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


Log in to reply