HAProxy php errors 2.4.5
-
Hey, I get this in the "Fronted" tab of HAProxy
Warning: Illegal string offset 'ipport' in /usr/local/www/haproxy/haproxy_listeners.php on line 262 Warning: Illegal string offset 'type' in /usr/local/www/haproxy/haproxy_listeners.php on line 263 Warning: Cannot assign an empty string to a string offset in /usr/local/www/haproxy/haproxy_listeners.php on line 263
https://i.imgur.com/4zOyngw.png
I tested with both the normal package and the devel one and I get the same issue.
Anything I can do to make it work on 2.4.5?
-
@hexine
Me wonders, how did you end up in that state.? Did you only install haproxy on a clean pfSense installation? Or was it an upgrade from a previous configuration? Did you add a new frontend and if so in what order?Both haproxy packages are (nearly) identical at the moment.. I havn't seen that error myself though recently. As these string offset issues (most?) of them were fixed for 2.4.4 as it already checks more strictly than before..
-
@piba
It's" an upgrade from a previous configuration" and obviously this badly "patched-up" (not the one responsible for it..) installation is the issue but I can't really afford to make a clean install since this router is in a remote location.If someone has any pointers that would help me fix the PHP installation or whatever is causing the issue, I would be very grateful.
-
https://www.netgate.com/docs/pfsense/install/upgrade-troubleshooting.html#forced-pkg-reinstall but be prepared for a bit of traveling.
-
@hexine
The issue is likely caused by a somewhat messed up configuration somewhere. Do you have a configuration backup from before the upgrade when haproxy was still working? I wonder what the <haproxy> part of that configuration looks like..
As currently it looks like the frontend with name A and description A and without address is kinda 'broken', you could perhaps delete it and configured it fresh.?p.s. i can make the PHP 'not' throw an error on it with a few minor changes, but still it wouldn't 'properly' work..
diff --git a/net/pfSense-pkg-haproxy-devel/files/usr/local/www/haproxy/haproxy_listeners.php b/net/pfSense-pkg-haproxy-devel/files/usr/local/www/haproxy/haproxy_listeners.php index 859ba65697cb..275b318ce75d 100644 --- a/net/pfSense-pkg-haproxy-devel/files/usr/local/www/haproxy/haproxy_listeners.php +++ b/net/pfSense-pkg-haproxy-devel/files/usr/local/www/haproxy/haproxy_listeners.php @@ -256,6 +256,7 @@ function js_callback(req) { $a_frontend_grouped = array(); foreach($a_frontend as &$frontend2) { + getarraybyref($frontend2); $mainfrontend = get_primaryfrontend($frontend2); $mainname = $mainfrontend['name']; $ipport = get_frontend_ipport($frontend2, true);
-
This post is deleted!