Roots Discourse

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

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.