Error on Deploy: PHP Deprecated: implode(): in phar:///usr/bin/wp/php/WP_CLI/DocParser.php on line 75

Hi everyone, did anyone run into this error on deploy?

PHP Deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters in phar:///usr/bin/wp/php/WP_CLI/DocParser.php on line 75

It just appeared today for the first time and not sure what’s going on.

System info:
Ansible 2.7.2; Darwin
Trellis 1.0.0: December 27th, 2018

Thanks,
Kris

1 Like

It actually errors? Because it’s just a deprecation so it shouldn’t matter for now :thinking:

I’m going to assume you need a newer WP-CLI version though as it’s likely quite old if you haven’t updated separate from that Trellis version from a year ago.

You can bump this: https://github.com/roots/trellis/blob/b7ecfeb8590a46283f231e8606bf2e05ea20c3f6/roles/wp-cli/defaults/main.yml#L2

Thanks @swalkinshaw unfortunately yeah, deploy fails completely. So I tried updating WP-CLI and update the project to the latest Trellis. However am now unable to re-provision as there’s an (unrelated?) issue with Composer:

TASK [composer : Update Composer to latest version (if configured).] **************************************************************************************************
System info:
  Ansible 2.8.4; Darwin
  Trellis 1.3.0: December 7th, 2019
---------------------------------------------------
non-zero return code
   Downloading (100%)cting...)



  [RuntimeException]
  SHA384 is not supported by your openssl extension, could not verify the
phar file integrity


self-update [-r|--rollback] [--clean-backups] [--no-progress] [--update-keys]
[--stable] [--preview] [--snapshot] [--set-channel-only] [--] [<version>]
fatal: [www.artun.ee]: FAILED! => {"changed": true, "cmd": ["php", "/usr/local/bin/composer", "self-update"], "delta": "0:00:01.403400", "end": "2019-12-15 07:42:46.199447", "rc": 1, "start": "2019-12-15 07:42:44.796047", "stderr_lines": ["   Downloading (connecting...)\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\bDownloading (100%)         \b\b\b\b\b\b\b\b\b", "", "                                                                                               ", "  [RuntimeException]                                                                           ", "  SHA384 is not supported by your openssl extension, could not verify the phar file integrity  ", "                                                                                               ", "", "self-update [-r|--rollback] [--clean-backups] [--no-progress] [--update-keys] [--stable] [--preview] [--snapshot] [--set-channel-only] [--] [<version>]"], "stdout": "Updating to version 1.9.1 (stable channel).", "stdout_lines": ["Updating to version 1.9.1 (stable channel)."]}

EDIT: Found some discussion here:

Logging into the remote server, followed by manual sudo rm -f /usr/local/bin/composer allowed me to finish the re-provision, then restarted the remote server. However, the original WP-CLI problem remains the same.

EDIT2: On further investigation, it seems while the re-provision finished successfully (green), it didn’t actually re-provision as the old version of PHP (php7.1-fpm.service) is still running (the latest Trellis has PHP 7.3…), according to logs:

    State: degraded
 Jobs: 0 queued

Failed: 1 units
Since: Sun 2019-12-15 08:26:22 UTC; 20min ago
CGroup: /
β”œβ”€init.scope
β”‚ └─1 /sbin/init splash $vt_handoff quiet console=hvc0 pti=off spectre_v2=off l1tf=off nospec_store_bypass_disable no_stf_barrier elevator=noop
β”œβ”€system.slice
β”‚ β”œβ”€dbus.service
β”‚ β”‚ └─674 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
β”‚ β”œβ”€cron.service
β”‚ β”‚ └─664 /usr/sbin/cron -f
β”‚ β”œβ”€lvm2-lvmetad.service
β”‚ β”‚ └─286 /sbin/lvmetad -f
β”‚ β”œβ”€php7.1-fpm.service
β”‚ β”‚ β”œβ”€ 826 php-fpm: master process (/etc/php/7.1/fpm/php-fpm.conf)
β”‚ β”‚ β”œβ”€ 1238 php-fpm: pool www
β”‚ β”‚ β”œβ”€ 1239 php-fpm: pool www
β”‚ β”‚ β”œβ”€13469 php-fpm: pool wordpress
β”‚ β”‚ β”œβ”€26701 php-fpm: pool wordpress
β”‚ β”‚ └─27926 php-fpm: pool wordpress
β”‚ β”œβ”€mariadb.service
β”‚ β”‚ └─1032 /usr/sbin/mysqld --basedir=/usr
β”‚ β”œβ”€fail2ban.service
β”‚ β”‚ └─1216 /usr/bin/python3 /usr/bin/fail2ban-server -s /var/run/fail2ban/fail2ban.sock -p /var/run/fail2ban/fail2ban.pid -x -b
β”‚ β”œβ”€unattended-upgrades.service
β”‚ β”‚ └─822 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
β”‚ β”œβ”€memcached.service
β”‚ β”‚ └─814 /usr/bin/memcached -U 0 -m 64 -p 11211 -u memcache -l 127.0.0.1 -c 1024
β”‚ β”œβ”€nginx.service
β”‚ β”‚ β”œβ”€1204 nginx: master process /usr/sbin/nginx -g daemon on; master_process on
β”‚ β”‚ β”œβ”€1205 nginx: worker process
β”‚ β”‚ β”œβ”€1206 nginx: worker process
β”‚ β”‚ β”œβ”€1207 nginx: worker process
β”‚ β”‚ β”œβ”€1208 nginx: worker process
β”‚ β”‚ β”œβ”€1209 nginx: worker process
β”‚ β”‚ β”œβ”€1210 nginx: worker process
β”‚ β”‚ β”œβ”€1211 nginx: worker process
β”‚ β”‚ β”œβ”€1212 nginx: worker process
β”‚ β”‚ └─1213 nginx: cache manager process
β”‚ β”œβ”€accounts-daemon.service
β”‚ β”‚ └─656 /usr/lib/accountsservice/accounts-daemon
β”‚ β”œβ”€system-serial\x2dgetty.slice
β”‚ β”‚ └─serial-getty@hvc0.service
β”‚ β”‚ └─1026 /sbin/agetty --keep-baud 115200 38400 9600 hvc0 vt220
β”‚ β”œβ”€systemd-journald.service
β”‚ β”‚ └─240 /lib/systemd/systemd-journald
β”‚ β”œβ”€ssh.service
β”‚ β”‚ └─874 /usr/sbin/sshd -D
β”‚ β”œβ”€systemd-logind.service
β”‚ β”‚ └─666 /lib/systemd/systemd-logind
β”‚ β”œβ”€system-getty.slice
β”‚ β”‚ └─getty@tty1.service
β”‚ β”‚ └─1025 /sbin/agetty --noclear tty1 linux
β”‚ β”œβ”€systemd-udevd.service
β”‚ β”‚ └─327 /lib/systemd/systemd-udevd
β”‚ β”œβ”€irqbalance.service
β”‚ β”‚ └─759 /usr/sbin/irqbalance --pid=/var/run/irqbalance.pid
β”‚ β”œβ”€rsyslog.service
β”‚ β”‚ └─669 /usr/sbin/rsyslogd -n
β”‚ β”œβ”€xe-linux-distribution.service
β”‚ β”‚ β”œβ”€ 1072 /bin/bash /usr/sbin/xe-daemon -p /var/run/xe-daemon.pid
β”‚ β”‚ └─26624 sleep 60
β”‚ └─ntp.service
β”‚ └─870 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 109:116
└─user.slice

EDIT 3:
Tried to re-provision again however now it fails:

Unable to start service php7.3-fpm: Job for php7.3-fpm.service failed because
the control process exited with error code. See β€œsystemctl status
php7.3-fpm.service” and β€œjournalctl -xe” for details.

Any ideas highly appreciated.

Thanks,
Kris

Happy new year everyone! Still struggling with this problem and it’s become a blocker for me to use Trellis unfortunately. Any advice super appreciated. Thanks.

EDIT: I managed to get one step further by manually logging into the remote server and running sudo wp cli update which fixed the WP CLI errors. I’m now able to deploy even though the deploy fails with the following errors (but new code is running on the server).

non-zero return code php7.3-fpm.service is not active, cannot reload. fatal: [www.website.com]: FAILED! => {"changed": true, "cmd": "sudo service php7.3-fpm reload", "delta": "0:00:00.041936", "end": "2020-01-14 12:34:18.339396", "rc": 1, "start": "2020-01-14 12:34:18.297460", "stderr_lines": ["php7.3-fpm.service is not active, cannot reload."], "stdout": "", "stdout_lines": []}

Reprovison fails with a similar error, which makes me slightly hopeful:

> TASK [php : Start php7.3-fpm service] *****************************************************************************************************************************************************************************
> 
> System info:
> 
> Ansible 2.8.4; Darwin
> 
> Trellis 1.3.0: December 7th, 2019
> 
> ---------------------------------------------------
> 
> Unable to start service php7.3-fpm: Job for php7.3-fpm.service failed because
> 
> the control process exited with error code. See "systemctl status
> 
> php7.3-fpm.service" and "journalctl -xe" for details.
> 
> fatal: [www.website.com]: FAILED! => {"changed": false}

I scoured the forum and came up with this post however I’m hesitant running these commands on a live server Change PHP version

Kris

This topic was automatically closed after 42 days. New replies are no longer allowed.