2.4.5_1 PHP Error installing HAProxy
-
Afternoon all, trying to newly add HAProxy and or HaProxy-devel to an udpate 2.4.5_1 machine.
So far I've reinstalled, with the config.xml in place to redo the packages. Removed what I thought might be conflicting packages, pfBlocker, snort, etc.Ran a complete in place re-install per: https://docs.netgate.com/pfsense/en/latest/troubleshooting/upgrades.html#forced-pkg-reinstall
TLDR:
PHP ERROR: Type: 1, File: /usr/local/pkg/haproxy/haproxy_upgrade_config.inc, Line: 241, Message: Uncaught Error: Cannot use string offset as an array in
HaProxy or HaPRoxy-dev seem to be the only packages throwing an error like this on the system.
Number of packages to be installed: 3 The process will require 4 MiB more space. 957 KiB to be downloaded. [1/3] Fetching pfSense-pkg-haproxy-0.61.txz: .......... done [2/3] Fetching haproxy18-1.8.25.txz: .......... done [3/3] Fetching lua53-5.3.5_3.txz: .......... done Checking integrity... done (0 conflicting) [1/3] Installing lua53-5.3.5_3... [1/3] Extracting lua53-5.3.5_3: ......... done [2/3] Installing haproxy18-1.8.25... [2/3] Extracting haproxy18-1.8.25: ........ done [3/3] Installing pfSense-pkg-haproxy-0.61... [3/3] Extracting pfSense-pkg-haproxy-0.61: .......... done Saving updated package information... done. Loading package configuration... done. Configuring package components... Loading package instructions... Custom commands... Executing custom_php_install_command()... Fatal error: Uncaught Error: Cannot use string offset as an array in /usr/local/pkg/haproxy/haproxy_upgrade_config.inc:241 Stack trace: #0 /usr/local/pkg/haproxy/haproxy.inc(646): haproxy_upgrade_config() #1 /etc/inc/pkg-utils.inc(770) : eval()'d code(1): haproxy_custom_php_install_command() #2 /etc/inc/pkg-utils.inc(770): eval() #3 /etc/inc/pkg-utils.inc(858): eval_once('haproxy_custom_...') #4 /etc/rc.packages(74): install_package_xml('haproxy') #5 {main} thrown in /usr/local/pkg/haproxy/haproxy_upgrade_config.inc on line 241 PHP ERROR: Type: 1, File: /usr/local/pkg/haproxy/haproxy_upgrade_config.inc, Line: 241, Message: Uncaught Error: Cannot use string offset as an array in /usr/local/pkg/haproxy/haproxy_upgrade_config.inc:241 Stack trace: #0 /usr/local/pkg/haproxy/haproxy.inc(646): haproxy_upgrade_config() #1 /etc/inc/pkg-utils.inc(770) : eval()'d code(1): haproxy_custom_php_install_command() #2 /etc/inc/pkg-utils.inc(770): eval() #3 /etc/inc/pkg-utils.inc(858): eval_once('haproxy_custom_...') #4 /etc/rc.packages(74): install_package_xml('haproxy') #5 {main} thrownpkg-static: POST-INSTALL script failed >>> Cleaning up cache... done. Success
Where do I go from here?
-
@entropywrench said in 2.4.5_1 PHP Error installing HAProxy:
etching pfSense-pkg-haproxy-0.61.txz
Your not running dev?
I am running haproxy-devel which is .62 and not having any problems.
-
@johnpoz I've tried to install both, same error
Here's the output of Dev's failed install:
>>> Installing pfSense-pkg-haproxy-devel... Updating pfSense-core repository catalogue... pfSense-core repository is up to date. Updating pfSense repository catalogue... pfSense repository is up to date. All repositories are up to date. The following 3 package(s) will be affected (of 0 checked): New packages to be INSTALLED: haproxy: 2.0.14 [pfSense] lua53: 5.3.5_3 [pfSense] pfSense-pkg-haproxy-devel: 0.62 [pfSense] Number of packages to be installed: 3 The process will require 4 MiB more space. 1 MiB to be downloaded. [1/3] Fetching pfSense-pkg-haproxy-devel-0.62.txz: .......... done [2/3] Fetching haproxy-2.0.14.txz: .......... done [3/3] Fetching lua53-5.3.5_3.txz: .......... done Checking integrity... done (0 conflicting) [1/3] Installing lua53-5.3.5_3... [1/3] Extracting lua53-5.3.5_3: ......... done [2/3] Installing haproxy-2.0.14... [2/3] Extracting haproxy-2.0.14: ........ done [3/3] Installing pfSense-pkg-haproxy-devel-0.62... [3/3] Extracting pfSense-pkg-haproxy-devel-0.62: .......... done Saving updated package information... done. Loading package configuration... done. Configuring package components... Loading package instructions... Custom commands... Executing custom_php_install_command()... Fatal error: Uncaught Error: Cannot use string offset as an array in /usr/local/pkg/haproxy/haproxy_upgrade_config.inc:241 Stack trace: #0 /usr/local/pkg/haproxy/haproxy.inc(654): haproxy_upgrade_config() #1 /etc/inc/pkg-utils.inc(770) : eval()'d code(1): haproxy_custom_php_install_command() #2 /etc/inc/pkg-utils.inc(770): eval() #3 /etc/inc/pkg-utils.inc(858): eval_once('haproxy_custom_...') #4 /etc/rc.packages(74): install_package_xml('haproxy-devel') #5 {main} thrown in /usr/local/pkg/haproxy/haproxy_upgrade_config.inc on line 241 PHP ERROR: Type: 1, File: /usr/local/pkg/haproxy/haproxy_upgrade_config.inc, Line: 241, Message: Uncaught Error: Cannot use string offset as an array in /usr/local/pkg/haproxy/haproxy_upgrade_config.inc:241 Stack trace: #0 /usr/local/pkg/haproxy/haproxy.inc(654): haproxy_upgrade_config() #1 /etc/inc/pkg-utils.inc(770) : eval()'d code(1): haproxy_custom_php_install_command() #2 /etc/inc/pkg-utils.inc(770): eval() #3 /etc/inc/pkg-utils.inc(858): eval_once('haproxy_custom_...') #4 /etc/rc.packages(74): install_package_xml('haproxy-devel') #5 {main} thrownpkg-static: POST-INSTALL script failed >>> Cleaning up cache... done. Success
Line 241-ish:
224 if ($configversion < "00.32") { 225 $frontends = array(); 226 if (is_array($config['installedpackages']['haproxy']['ha_backends']['item'])) { 227 foreach ($config['installedpackages']['haproxy']['ha_backends']['item'] as &$frontend) { 228 $primaryfrontend = get_primaryfrontend($frontend); 229 $fe_name = $primaryfrontend['name']; 230 $frontends[$fe_name][] = &$frontend; 231 } 232 233 foreach ($frontends as $primary) { 234 $acl_count = array(); 235 foreach ($primary as &$frontend){ 236 $acl_use = array(); 237 if (!is_array($frontend['a_actionitems'])) { 238 $frontend['a_actionitems'] = array(); 239 } 240 if (!is_array($frontend['a_actionitems']['item'])) { 241 $frontend['a_actionitems']['item'] = array(); 242 } 243 $a_actions = &$frontend['a_actionitems']['item']; 244 if (!is_array($a_actions)) { 245 $a_actions = array(); 246 } 247
-
@entropywrench
If you check the content of the file /conf/config.xml file do you have the <installedpackages> and <haproxy> items in there? If so can you post the content (of that <haproxy> tag until the </haproxy> tag) here? (change the domain names/passwords/ip's you don't want public..)
Thanks. -
@piba
Here's what I got, currently HAProxy and HAProxy-Dev are not installedThis is what is <installedpackages> dealing with haproxy
<haproxy> <ha_backends> <item></item> </ha_backends> <configversion>00.19</configversion> <ha_pools> <item></item> </ha_pools> </haproxy>
-
@entropywrench
Here are my currently installed packages:pkg info aggregate-1.6_1 Optimise a list of route prefixes to help make nice short filters beep-1.0_1 Beeps a certain duration and pitch out of the PC Speaker bind-tools-9.14.12 Command line tools from BIND: delv, dig, host, nslookup... bind914-9.14.12 BIND DNS suite with updated DNSSEC and DNS64 bsnmp-regex-0.6_2 bsnmpd module allowing creation of counters from log files bsnmp-ucd-0.4.4 bsnmpd module that implements parts of UCD-SNMP-MIB bwi-firmware-kmod-3.130.20 Broadcom AirForce IEEE 802.11 Firmware Kernel Module ca_root_nss-3.51 Root certificate bundle from the Mozilla Project check_reload_status-0.0.8 run various pfSense scripts on event. choparp-20150613 Simple proxy arp daemon clog-1.0.1_1 Circular log support for FreeBSD syslogd cpdup-1.20 Comprehensive filesystem mirroring and backup program cpustats-0.1_1 cpustats curl-7.68.0 Command line tool and library for transferring data with URLs daq-2.2.2_2 Data Acquisition abstraction library for snort 2.9+ devcpu-data-1.28 Intel and AMD CPUs microcode updates dhcp6-20080615.2_2 KAME DHCP6 client, server, and relay dhcpleases-0.3_2 read dhpcd.lease file and add it to hosts file dhcpleases6-0.1_2 read dhpcd6.leases file and trigger command on modification dmidecode-3.2 Tool for dumping DMI (SMBIOS) contents in human-readable format dnsmasq-2.80_4,1 Lightweight DNS forwarder, DHCP, and TFTP server dpinger-3.0 IP device monitoring tool expat-2.2.8 XML 1.0 parser written in C expiretable-0.6_1 Utility to remove entries from the pf(4) table based on their age filterdns-2.0_3 filterdns filterlog-0.1_5 filterlog freetype2-2.10.1 Free and portable TrueType font rendering engine gettext-runtime-0.20.1 GNU gettext runtime libraries and programs giflib-5.2.1 Tools and library routines for working with GIF images glib-2.56.3_7,1 Some useful routines of C programming (current stable version) gmp-6.1.2_1 Free library for arbitrary precision arithmetic grepcidr-2.0 Filter IP addresses matching IPv4 CIDR/network specification hostapd-2.9 IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator icu-65.1,1 International Components for Unicode (from IBM) iftop-1.0.p4 Display bandwidth usage on an interface by host igmpproxy-0.2.1_1,1 Multicast forwarding IGMP proxy indexinfo-0.3.1 Utility to regenerate the GNU info page index iperf3-3.7 Improved tool to measure TCP and UDP bandwidth ipmitool-1.8.18_2 CLI to manage IPMI systems isc-dhcp44-client-4.4.1_1 The ISC Dynamic Host Configuration Protocol client isc-dhcp44-relay-4.4.1 The ISC Dynamic Host Configuration Protocol relay isc-dhcp44-server-4.4.1_4 ISC Dynamic Host Configuration Protocol server jbigkit-2.1_1 Lossless compression for bi-level images such as scanned pages, faxes jpeg-turbo-2.0.3 SIMD-accelerated JPEG codec which replaces libjpeg json-c-0.14 JSON (JavaScript Object Notation) implementation in C ldns-1.7.1_1 Library for programs conforming to DNS RFCs and drafts libargon2-20190702 Memory hard password hashing program and library libdaemon-0.14_1 Lightweight C library that eases the writing of UNIX daemons libdnet-1.13_3 Simple interface to low level networking routines libedit-3.1.20191211,1 Command line editor library libevent-2.1.11 API for executing callback functions on events or timeouts libffi-3.2.1_3 Foreign Function Interface libgcrypt-1.8.5 General purpose cryptographic library based on the code from GnuPG libgd-2.2.5_2,1 Graphics library for fast creation of images libgpg-error-1.36 Common error values for all GnuPG components libiconv-1.14_11 Character set conversion library libidn2-2.3.0_1 Implementation of IDNA2008 internationalized domain names libltdl-2.4.6 System independent dlopen wrapper liblz4-1.9.2,1 LZ4 compression library, lossless and very fast libmaxminddb-1.4.2 Library for the MaxMind DB file format used for GeoIP2 libmcrypt-2.5.8_3 Multi-cipher cryptographic library (used in PHP) libnghttp2-1.40.0 HTTP/2.0 C Library libpcap-1.9.1_1 Ubiquitous network traffic capture library libssh2-1.8.2,3 Library implementing the SSH2 protocol libucl-0.8.1 Universal configuration library parser libunistring-0.9.10_1 Unicode string library libxml2-2.9.10 XML parser library for GNOME libxslt-1.1.34 The XSLT C library for GNOME libzmq4-4.3.1_1 ZeroMQ core library (Version 4) lighttpd-1.4.54 Secure, fast, compliant, and flexible Web Server links-2.16_2,1 Lynx-like text WWW browser lmdb-0.9.24_1,1 OpenLDAP Lightning Memory-Mapped Database lua-resty-core-0.1.17 New FFI-based Lua API for OpenResty NGINX Lua modules lua-resty-lrucache-0.09 Lua-land LRU cache based on the LuaJIT FFI lua52-5.2.4 Small, compilable scripting language providing easy access to C code luajit-openresty-2.1.20190912_2 Just-In-Time Compiler for Lua (OpenResty branch) lzo2-2.10_1 Portable speedy, lossless data compression library minicron-0.0.2 very small cron miniupnpd-2.1.20190210,1 UPnP IGD implementation which uses pf/ipf mobile-broadband-provider-info-20190618_1 Service mobile broadband provider database mpd5-5.8_10 Multi-link PPP daemon based on netgraph(4) neon-0.30.2_4 HTTP and WebDAV client library for Unix systems net-snmp-5.7.3_20,1 Extendable SNMP implementation nettle-3.5.1_1 Low-level cryptographic library nginx-1.16.1_11,2 Robust and small WWW server nmap-7.80 Port scanning utility for large networks norm-1.5r6 NACK-Oriented Reliable Multicast (NORM) ntp-4.2.8p14 The Network Time Protocol Distribution nut-2.7.4_13 Network UPS Tools oniguruma-6.9.3 Regular expressions library compatible with POSIX/GNU/Perl openldap-client-2.4.48 Open source LDAP client implementation openvpn-2.4.9 Secure IP/Ethernet tunnel daemon openvpn-auth-script-1.0.0.3 Generic script-based deferred auth plugin for OpenVPN openvpn-client-export-2.5.0 OpenVPN Client Export p7zip-16.02_2 File archiver with high compression ratio pcre-8.43_2 Perl Compatible Regular Expressions library perl5-5.30.1 Practical Extraction and Report Language pfSense-2.4.5_1 Meta package to install pfSense required ports pfSense-Status_Monitoring-1.7.11_2 pfSense Status Monitoring pfSense-base-2.4.5_1 pfSense core files pfSense-default-config-2.4.5_1 pfSense default config pfSense-kernel-pfSense-2.4.5_1 pfSense kernel (pfSense) pfSense-pkg-RRD_Summary-2.0 pfSense package RRD_Summary pfSense-pkg-Status_Traffic_Totals-2.3.1 Traffic Totals using the vnStat database pfSense-pkg-System_Patches-1.2_4 pfSense package System_Patches pfSense-pkg-acme-0.6.9_2 ACME package for pfSense pfSense-pkg-bind-9.14_9 BIND DNS suite with updated DNSSEC and DNS64 pfSense-pkg-iftop-0.17_2 pfSense package iftop pfSense-pkg-iperf-3.0.2_5 pfSense package iperf pfSense-pkg-nmap-1.4.4_1 pfSense package nmap pfSense-pkg-nut-2.7.4_7 Network UPS Tools pfSense-pkg-openvpn-client-export-1.5_4 pfSense package openvpn-client-export pfSense-pkg-pfBlockerNG-2.1.4_22 pfSense package pfBlockerNG pfSense-pkg-snort-4.1.2_2 pfSense package snort pfSense-rc-2.4.5_1 pfSense rc script and rc.initial shell pfSense-repo-2.4.5_4 Setup pfSense pkg(8) repositories pfSense-upgrade-0.87 pfSense upgrade script pftop-0.7_9 Utility for real-time display of statistics for pf php72-7.2.29 PHP Scripting Language php72-bcmath-7.2.29 The bcmath shared extension for php php72-bz2-7.2.29 The bz2 shared extension for php php72-ctype-7.2.29 The ctype shared extension for php php72-curl-7.2.29 The curl shared extension for php php72-dom-7.2.29 The dom shared extension for php php72-filter-7.2.29 The filter shared extension for php php72-ftp-7.2.29 The ftp shared extension for php php72-gettext-7.2.29 The gettext shared extension for php php72-hash-7.2.29 The hash shared extension for php php72-intl-7.2.29 The intl shared extension for php php72-json-7.2.29 The json shared extension for php php72-ldap-7.2.29 The ldap shared extension for php php72-mbstring-7.2.29 The mbstring shared extension for php php72-opcache-7.2.29 The opcache shared extension for php php72-openssl-7.2.29 The openssl shared extension for php php72-openssl_x509_crl-1.2 PHP Class to create openssl Certificate Revocation List (CRL) php72-pcntl-7.2.29 The pcntl shared extension for php php72-pdo-7.2.29 The pdo shared extension for php php72-pdo_sqlite-7.2.29 The pdo_sqlite shared extension for php php72-pear-1.10.6 PEAR framework for PHP php72-pear-Auth_RADIUS-1.1.0_4 PEAR wrapper classes for the RADIUS PECL php72-pear-Cache_Lite-1.7.16,1 PEAR fast and safe little cache system php72-pear-Crypt_CHAP-1.5.0 PEAR class for generating CHAP packets php72-pear-HTTP_Request2-2.3.0,1 PEAR classes providing an easy way to perform HTTP requests php72-pear-Mail-1.4.1,1 PEAR class that provides multiple interfaces for sending emails php72-pear-Net_Growl-2.7.0 Send notifications to Growl php72-pear-Net_IPv6-1.3.0.b2_2 Check and validate IPv6 addresses php72-pear-Net_SMTP-1.9.0 PEAR class that provides an implementation of the SMTP protocol php72-pear-Net_Socket-1.0.14 PEAR Network Socket Interface php72-pear-Net_URL2-2.2.1 PEAR Class for parsing and handling URL php72-pear-XML_RPC2-1.1.4 XML-RPC client/server library php72-pecl-mcrypt-1.0.3 PHP extension for mcrypt, removed in PHP 7.2 php72-pecl-radius-1.4.0.b1 Radius client library for PHP php72-pecl-rrd-2.0.1_1 PHP bindings to rrd tool system php72-pecl-ssh2-1.1.2 PECL extension to the libssh2 library php72-pecl-zmq-1.1.3_3 PHP bindings for ZeroMQ php72-pfSense-module-0.65 Library for getting useful info php72-posix-7.2.29 The posix shared extension for php php72-readline-7.2.29 The readline shared extension for php php72-session-7.2.29 The session shared extension for php php72-shmop-7.2.29 The shmop shared extension for php php72-simplepie-1.5.1_1 Simple Atom/RSS parsing library for PHP php72-simplexml-7.2.29 The simplexml shared extension for php php72-sockets-7.2.29 The sockets shared extension for php php72-sqlite3-7.2.29 The sqlite3 shared extension for php php72-sysvmsg-7.2.29 The sysvmsg shared extension for php php72-sysvsem-7.2.29 The sysvsem shared extension for php php72-sysvshm-7.2.29 The sysvshm shared extension for php php72-tokenizer-7.2.29 The tokenizer shared extension for php php72-xml-7.2.29 The xml shared extension for php php72-xmlreader-7.2.29 The xmlreader shared extension for php php72-xmlwriter-7.2.29 The xmlwriter shared extension for php php72-zlib-7.2.29 The zlib shared extension for php pkg-1.15.6 Package manager png-1.6.37 Library for manipulating PNG images py37-ply-3.11 Python Lex-Yacc py37-setuptools-41.4.0_1 Python packages installer python37-3.7.7 Interpreted object-oriented programming language qstats-0.2 read dhpcd.lease file and add it to hosts file radvd-2.18_2 Linux/BSD IPv6 router advertisement daemon rate-0.9_1 Traffic analysis command-line utility readline-8.0.1 Library for editing command lines as they are typed relayd-5.5.20140810_5 OpenBSD relay daemon rrdtool-1.7.2_1 Round Robin Database Tools scponly-4.8.20110526_4 Tiny shell that only permits scp and sftp smartmontools-7.0_2 S.M.A.R.T. disk monitoring tools snort-2.9.16.1 Lightweight network intrusion detection system socat-1.7.3.3_1 Multipurpose relay and more sqlite3-3.30.1 SQL database engine in a C library ssh_tunnel_shell-0.1_1 SSH tunnel shell sshguard-2.4.0_4,1 Protect hosts from brute-force attacks against SSH and other services strongswan-5.8.4 Open Source IKEv2 IPsec-based VPN solution tiff-4.1.0 Tools and library routines for working with TIFF images uclcmd-0.1_3 Command line tool for working with UCL config files unbound-1.10.1 Validating, recursive, and caching DNS resolver vnstat-2.4 Console-based network traffic monitor voucher-0.1_2 Voucher support vstr-1.0.15_1 General purpose string library for C webp-1.0.3_1 Google WebP image format conversion tool whois-5.2.17 Marco d'Itri whois client wol-0.7.1_4 Tool to wake up Wake-On-LAN compliant computers wpa_supplicant-2.9 Supplicant (client) for WPA/802.1x protocols wrapalixresetbutton-0.0.7 Utility to detect platform reset button state for use in scripting xinetd-2.3.15_2 Replacement for inetd with better control and logging zip-3.0_1 Create/update ZIP files compatible with PKZIP
-
@entropywrench
That config looks pretty empty.. but not empty enough to be 'clean'.. Somehow the upgrade script trips over it...Can you run this from diagnostics\commandprompt "execute PHP commands":
unset($config['installedpackages']['haproxy']); write_config("fix haproxy install, remove empty config"); print("config fixed?");
After that try to install again?
-
@piba said in 2.4.5_1 PHP Error installing HAProxy:
unset($config['installedpackages']['haproxy']);
write_config("fix haproxy install, remove empty config");
print("config fixed?");By Jove Sir, I think you got it.
I was able to install HaProxy.