# macOS Ventura WP-CLI fatal error TypeError: implode()

**URL:** <https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610>\
**Category:** Support\
**Tags:** fatal-error\
**Created:** [August 15, 2023, 3:27pm UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610 "2023-08-15T15:27:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![andfinally](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/andfinally/32/19242_2.png) [@andfinally](https://community.localwp.com/u/andfinally)\
**Post date:** [August 15, 2023, 3:27pm UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/1 "2023-08-15T15:27:32Z")

</div>

# Bug Summary

I can’t run WP-CLI in the site shell. I get `Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/DocParser.php:75`.

# Steps to reproduce

- Install Local on macOS Ventura on an M1 machine.
- Create a WordPress site.
- Open the site shell.
- Try to run WP-CLI: `wp --version`.
- Get the fatal error.

# Environment Info

Describe your environment.

- What Operating System are you using? macOS Ventura
- What versions of site software (Nginx, Apache, PHP, MySQL) is used? nginx, PHP 8.1.9, MySQL 8.0.16, WP 6.3, localhost routing mode.
- What version of Local is installed? 7.1.2+6410

# Supporting info

Please provide your Local Log. See this Community Forum post for instructions on how to do so:  
[local-lightning.log](https://community.localwp.com/uploads/short-url/j0RwP4ziC2X1hx4FtUgFXMs2beu.log) (60.7 KB)

- [How do I retrieve Local’s Log?](https://localwp.com/community/t/how-do-i-retrieve-locals-log-file/3720?u=ben.turner)

Include any screenshots or video recordings of the issue to help others reproduce.

```auto
❯ wp --version
Failed loading /Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-8.1.9+8/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/opcache.so: dlopen(/Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-8.1.9+8/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/opcache.so, 0x0009): tried: '/Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-8.1.9+8/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/opcache.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-8.1.9+8/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/opcache.so' (no such file), '/Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-8.1.9+8/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/opcache.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
Failed loading /Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-8.1.9+8/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so: dlopen(/Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-8.1.9+8/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so, 0x0009): tried: '/Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-8.1.9+8/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-8.1.9+8/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so' (no such file), '/Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-8.1.9+8/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/DocParser.php:75
Stack trace:
#0 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/DocParser.php(75): implode(Array, '\n')
#1 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php(32): WP_CLI\DocParser->get_longdesc()
#2 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(113): WP_CLI\Dispatcher\CompositeCommand->__construct(Object(WP_CLI\Dispatcher\RootCommand), 'cache', Object(WP_CLI\DocParser))
#3 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(45): WP_CLI\Dispatcher\CommandFactory::create_composite_command(Object(WP_CLI\Dispatcher\RootCommand), 'cache', 'Cache_Command')
#4 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php(513): WP_CLI\Dispatcher\CommandFactory::create('cache', 'Cache_Command', Object(WP_CLI\Dispatcher\RootCommand))
#5 phar:///usr/local/bin/wp/vendor/wp-cli/cache-command/cache-command.php(12): WP_CLI::add_command('cache', 'Cache_Command')
#6 phar:///usr/local/bin/wp/vendor/composer/autoload_real.php(66): require('phar:///usr/loc...')
#7 phar:///usr/local/bin/wp/vendor/composer/autoload_real.php(56): composerRequire6501cc48682cc22d1e9df4be5afc251e('8a0ad02df6a5087...', 'phar:///usr/loc...')
#8 phar:///usr/local/bin/wp/vendor/autoload.php(7): ComposerAutoloaderInit6501cc48682cc22d1e9df4be5afc251e::getLoader()
#9 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/AutoloaderStep.php(46): require('phar:///usr/loc...')
#10 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(74): WP_CLI\Bootstrap\AutoloaderStep->process(Object(WP_CLI\Bootstrap\BootstrapState))
#11 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(23): WP_CLI\bootstrap()
#12 phar:///usr/local/bin/wp/php/boot-phar.php(11): include('phar:///usr/loc...')
#13 /usr/local/bin/wp(4): include('phar:///usr/loc...')
#14 {main}
  thrown in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/DocParser.php on line 75

```

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [August 15, 2023, 3:43pm UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/2 "2023-08-15T15:43:18Z")

</div>

Hi @andfinally

Is this a site you just imported into Local from elsewhere or one you were working on previously?

---

<div class="post-metadata">

**Author:** ![andfinally](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/andfinally/32/19242_2.png) [@andfinally](https://community.localwp.com/u/andfinally)\
**Post date:** [August 16, 2023, 4:57pm UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/3 "2023-08-16T16:57:21Z")

</div>

Hi @Nick-B, it’s one I created from scratch. Your question made me wonder if it could be something in a plugin or theme, so I’ve just tried it on a plain Wordpress site with no installed plugins or themes, and no other customisations, and I’m getting the same result.

---

<div class="post-metadata">

**Author:** ![afragen](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/afragen/32/31_2.png) [@afragen](https://community.localwp.com/u/afragen)\
**Post date:** [August 16, 2023, 5:01pm UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/4 "2023-08-16T17:01:39Z")

</div>

What version of WP-CLI displays from the Site Shell?

---

<div class="post-metadata">

**Author:** ![andfinally](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/andfinally/32/19242_2.png) [@andfinally](https://community.localwp.com/u/andfinally)\
**Post date:** [August 16, 2023, 9:02pm UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/5 "2023-08-16T21:02:02Z")

</div>

This is what I get on clicking “Open site shell”. Looking more carefully at the output, it looks like the SSH session isn’t starting. I’m still in my host session, in the site’s directory.

```auto
Last login: Wed Aug 16 21:57:00 on ttys000
/Users/administrator/Library/Application\ Support/Local/ssh-entry/TnqkNkB1r.sh
❯ /Users/administrator/Library/Application\ Support/Local/ssh-entry/TnqkNkB1r.sh
-n -e 
Setting Local environment variables...
----
WP-CLI: WP-CLI 2.7.1
Composer: 2.1.5 2021-07-23
PHP: 8.1.9
MySQL: mysql Ver 8.0.16 for macos10.14 on x86_64 (MySQL Community Server - GPL)
----
Launching shell: /bin/zsh ...
 ~/Local Sites/wordpress/app/public        

```

 ![shell](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/3/a/3a65b3414bf93447dcd1bee90b7cf7ada9647741.jpeg)

---

<div class="post-metadata">

**Author:** ![afragen](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/afragen/32/31_2.png) [@afragen](https://community.localwp.com/u/afragen)\
**Post date:** [August 16, 2023, 11:45pm UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/6 "2023-08-16T23:45:04Z")

</div>

You might try updating WP-CLI.

`wp cli update`

Might help, might not.

---

<div class="post-metadata">

**Author:** ![andfinally](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/andfinally/32/19242_2.png) [@andfinally](https://community.localwp.com/u/andfinally)\
**Post date:** [August 17, 2023, 10:05am UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/7 "2023-08-17T10:05:08Z")

</div>

Thanks Andy, didn’t help, unfortunately – I get the same `Failed loading /Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-8.1.9+8/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/opcache.so:...` output.

When I click on “Open site shell”, I’d expect my terminal to open an SSH session to the WordPress container. But that doesn’t seem to be happening.

---

<div class="post-metadata">

**Author:** ![austinwendt](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/austinwendt/32/13912_2.png) [@austinwendt](https://community.localwp.com/u/austinwendt)\
**Post date:** [August 18, 2023, 2:45pm UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/8 "2023-08-18T14:45:27Z")

</div>

Hi @andfinally - I know you’re on an M1 machine, but are you using the Apple Silicon build of Local or the Intel build?

Second, if you’re on the Apple Silicon build, do you have Rosetta 2 installed on your machine? On my personal machine (technically M2), with the Apple Silicon build and Rosetta 2 installed, I’m not able to replicate the error. `wp --version` executes successfully.

This part of your error message makes me think wires are crossed somewhere:  
`(mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))`

---

<div class="post-metadata">

**Author:** ![andfinally](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/andfinally/32/19242_2.png) [@andfinally](https://community.localwp.com/u/andfinally)\
**Post date:** [August 19, 2023, 10:25am UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/9 "2023-08-19T10:25:37Z")

</div>

Hi @austinwendt, I installed the Silicone build to make sure, and I do have Rosetta 2 – unfortunately I’m still getting the same result. It’s like the SSH session doesn’t start, so when I do `wp --version`, I’m calling it on the host machine, inside the site folder, where I guess WP-CLI isn’t available. Should clicking “Open site shell” get me straight into an SSH session inside the container, or am I supposed to call `ssh` in Terminal to start it?

 ![SCR-20230819-fob](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/4/4/440db680888300cd59dac385f78d718766efc479.jpeg)

---

<div class="post-metadata">

**Author:** ![austinwendt](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/austinwendt/32/13912_2.png) [@austinwendt](https://community.localwp.com/u/austinwendt)\
**Post date:** [August 21, 2023, 6:58pm UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/10 "2023-08-21T18:58:35Z")

</div>

I’ve tried troubleshooting this some more, and I haven’t been able to reproduce… can you try to recreate this screenshot with any of your sites so that I can see what you’re seeing? This is on my M2, Silicon build of Local with Rosetta installed.

You’re correct, opening the site shell and running this command is calling the command on your machine from within the `app/public` directory of the site, and WP-CLI should be accessible here.

When you say “SSH session inside the container”, can you explain more what you mean? Local doesn’t use any containerizing solution, so just want to make sure we’re talking about the same thing.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/c/5/c50fe4aec65e9ee367dbcc85db452fa56466a4d5.jpeg)

---

<div class="post-metadata">

**Author:** ![andfinally](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/andfinally/32/19242_2.png) [@andfinally](https://community.localwp.com/u/andfinally)\
**Post date:** [August 21, 2023, 10:44pm UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/11 "2023-08-21T22:44:37Z")

</div>

Thanks for giving it a go @austinwendt, I’ve tried switching to site domains router mode and also to iTerm2, and tried to reproduce your setup, but I still get the same result. I’ve included two terminals in this screenshot – the top one shows what I get immediately after clicking “Open site shell”, the bottom one shows the error on calling `wp --version`. Very puzzling!

Apologies, I forgot Local doesn’t run in a container – am I right in thinking it’s a VirtualBox VM? I have VirtualBox 6.1 installed, not sure if that might be conflicting with the Local version somehow. I should’ve said “SSH session inside the VM” or “inside the WordPress web server”.

 ![SCR-20230821-wus](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/1/9/19600c5e24de35638a4249d62e929546733af58b.jpeg)

---

<div class="post-metadata">

**Author:** ![ben.turner](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ben.turner/32/5366_2.png) [@ben.turner](https://community.localwp.com/u/ben.turner)\
**Post date:** [August 22, 2023, 2:48pm UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/12 "2023-08-22T14:48:12Z")

</div>

Hey @andfinally, I’ve tried reproducing a bit and not getting the same behavior.

> [@andfinally](#):
>
> am I right in thinking it’s a VirtualBox VM

Local’s Site Shell is a regular shell with some additions to the PATH and other environment variables so that everything is wired up correctly.

I wonder if there may be an issue with the PATH and how ZSH is configured?

As a troubleshooting step, can we get a closer look at your `$PATH` as well as get a better idea of how you have zsh configured? For example, from the terminal prompt, it looks like it’s styled by Oh-my-zsh.

For the PATH part, I usually run this command in the terminal:

```auto
echo $PATH | tr ':' '\n'

```

For the zsh config, I’d be most interested in any config that configures wpcli. Also, if you have your config files in a dot-files repo, that would be great to get a better idea of what’s going on. For example, while I don’t have your same prompt style, here’s my ZSH config on Github: [.zshrc](https://github.com/bgturner/dot-files/blob/master/.zshrc)

---

<div class="post-metadata">

**Author:** ![andfinally](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/andfinally/32/19242_2.png) [@andfinally](https://community.localwp.com/u/andfinally)\
**Post date:** [August 24, 2023, 10:55am UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/13 "2023-08-24T10:55:47Z")

</div>

Thanks @ben.turner, I really appreciate the thought you guys are putting into this! Path is below, and `.zshrc` attached. (I had to delete a few sensitive aliases and functions, but I’m pretty confident they have no impact.) There is no mention of WP-CLI and I don’t have installed on my host machine. I have it inside some Docker containers, but it isn’t exposed to the outside.

```auto
❯ echo $PATH | tr ':' '\n'
/Users/administrator/.nvm/versions/node/v16.18.0/bin
/Users/administrator/.rvm/gems/ruby-2.4.1/bin
/Users/administrator/.rvm/gems/ruby-2.4.1@global/bin
/Users/administrator/.rvm/rubies/ruby-2.4.1/bin
/Users/administrator/Library/pnpm
/usr/local/opt/openssl@1.1/bin
/Users/administrator/.pyenv/shims
/usr/local/opt/openjdk@11/bin
/usr/local/opt/inetutils/libexec/gnubin
/Users/administrator/.composer/vendor/bin
/usr/local/sbin
/usr/local/mysql/bin
/usr/local/bin
/Users/administrator/bin
/usr/local/bin
/System/Cryptexes/App/usr/bin
/usr/bin
/bin
/usr/sbin
/sbin
/Library/Apple/usr/bin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
/Users/administrator/shell-scripts
/Users/administrator/.rvm/bin

```

[zshrc.txt.zip](https://community.localwp.com/uploads/short-url/pGNbdwuxKCpFfAPDOGANH2lYqEC.zip) (4.2 KB)

---

<div class="post-metadata">

**Author:** ![ben.turner](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ben.turner/32/5366_2.png) [@ben.turner](https://community.localwp.com/u/ben.turner)\
**Post date:** [August 24, 2023, 3:54pm UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/14 "2023-08-24T15:54:54Z")

</div>

Nice! Thanks for providing that info!

That path looks normal, and it appears that this is withough clicking through Local’s “Open site shell”

That’s fine, but you’ll notice additional paths if you go through Local.

After looking at your PATH output and the previous screenshots, I noticed something that I missed when I was initially trying to replicate. It looks like on my machine, I get a odd, though less “noisy,” output when I use PHP 8.2.8.

 ![Image 2023-08-24 at 8.19.10 AM.jpg](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/c/b/cbdb408a8ed5cf0253b3cfabf57faf1bcd69ee6c.jpeg)

I see from your PATH and the zshrc file that you have some logic in there for running PHP/Composer – do you do Laravel/vanilla PHP work?

I wonder if the reason for our different experiences boils down to a PHP configuration issue – ie, maybe you have a PHP config setting that is more strict and bombs out on deprecation notices, while my system is using the Local default config and just does the PHP thing of happily going along even though something is deprecated 😂

To get a better idea of the environment of the Local site shell, can you:

1. Open a new Local site shell, but clicking “Open site shell”
2. Provide the output of the PATH variable
3. Let us know which php/composer binary the shell is using
4. Get an idea of what PHP config is used. The awk statement below looks gnarly, but basically just outputs the first part of the `php --info` section that includes “Configuration File”

```auto
echo $PATH | tr ':' '\n'
which php
which composer

php --info | awk 'BEGIN{ RS = "" ; FS = "\n" }$0 ~ /Configuration File/{print $0}'

```

Here’s my output with the above commands for my 8.2.8 site:

 ![Image 2023-08-24 at 8.45.56 AM.jpg](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/1/3/13a5a4a76a936631a066ce43d9c5094fad9804a4.jpeg)

I’d be curious if:  
a. you have a different “Configuration file” than me  
b. you have any “Additional .ini files parsed”

Lastly, for reference, here’s the “Error Reporting” settings for the PHP config for the Local site I’m using for QA:

```auto
awk 'BEGIN{ RS = "" ; FS = "\n" }$0 ~ /Error Handling/{print "\n" $0 "\n"}' /Users/ben.turner/Library/Application\ Support/Local/run/EwESiiV6Z/conf/php/php.ini            

; Error Handling
error_reporting = E_ALL & ~E_DEPRECATED
error_log = "/Users/ben.turner/Local Sites/cli-implode/logs/php/error.log"
log_errors = On
display_errors = On
display_startup_errors = On
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
html_errors = On

```

Can you take a look at things and let us know the output of those things?

---

<div class="post-metadata">

**Author:** ![andfinally](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/andfinally/32/19242_2.png) [@andfinally](https://community.localwp.com/u/andfinally)\
**Post date:** [August 29, 2023, 7:36am UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/15 "2023-08-29T07:36:23Z")

</div>

Cheers for the careful look @ben.turner, I’m learning some useful stuff! Here’s the path from “Open site shell”

```auto
❯ echo $PATH | tr ':' '\n'
/Users/administrator/Library/pnpm
/usr/local/opt/openssl@1.1/bin
/Users/administrator/.pyenv/shims
/usr/local/opt/openjdk@11/bin
/usr/local/opt/inetutils/libexec/gnubin
/Users/administrator/.composer/vendor/bin
/usr/local/sbin
/usr/local/mysql/bin
/usr/local/bin
/Users/administrator/bin
/Applications/Local.app/Contents/Resources/extraResources/bin/composer/posix
/Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/posix
/Users/administrator/Library/Application Support/Local/lightning-services/php-8.2.8+1/bin/darwin-arm64/bin
/Applications/Local.app/Contents/Resources/extraResources/lightning-services/mysql-8.0.16+6/bin/darwin/bin
/Users/administrator/.rvm/gems/ruby-2.4.1/bin
/Users/administrator/.rvm/gems/ruby-2.4.1@global/bin
/Users/administrator/.rvm/rubies/ruby-2.4.1/bin
/Users/administrator/Library/pnpm
/usr/local/opt/openssl@1.1/bin
/Users/administrator/.pyenv/shims
/usr/local/opt/openjdk@11/bin
/usr/local/opt/inetutils/libexec/gnubin
/Users/administrator/.composer/vendor/bin
/usr/local/sbin
/usr/local/mysql/bin
/usr/local/bin
/Users/administrator/bin
/usr/local/bin
/System/Cryptexes/App/usr/bin
/usr/bin
/bin
/usr/sbin
/sbin
/Library/Apple/usr/bin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
/Users/administrator/shell-scripts
/Users/administrator/.rvm/bin
/Users/administrator/shell-scripts

```

Composer and PHP locations:

```auto
❯ which php
/usr/local/bin/php
❯ which composer
/usr/local/bin/composer

```

PHP info output:

```auto
❯ php --info | awk 'BEGIN{ RS = "" ; FS = "\n" }$0 ~ /Configuration File/{print $0}'
Failed loading /Users/administrator/Library/Application Support/Local/lightning-services/php-8.2.8+1/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20220829/opcache.so: dlopen(/Users/administrator/Library/Application Support/Local/lightning-services/php-8.2.8+1/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20220829/opcache.so, 0x0009): tried: '/usr/local/Cellar/openssl@1.1/1.1.1j/lib/opcache.so' (no such file), '/opcache.so' (no such file), '/Users/administrator/Library/Application Support/Local/lightning-services/php-8.2.8+1/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20220829/opcache.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/administrator/Library/Application Support/Local/lightning-services/php-8.2.8+1/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20220829/opcache.so' (no such file), '/Users/administrator/Library/Application Support/Local/lightning-services/php-8.2.8+1/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20220829/opcache.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
Failed loading /Users/administrator/Library/Application Support/Local/lightning-services/php-8.2.8+1/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20220829/xdebug.so: dlopen(/Users/administrator/Library/Application Support/Local/lightning-services/php-8.2.8+1/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20220829/xdebug.so, 0x0009): tried: '/usr/local/Cellar/openssl@1.1/1.1.1j/lib/xdebug.so' (no such file), '/xdebug.so' (no such file), '/Users/administrator/Library/Application Support/Local/lightning-services/php-8.2.8+1/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20220829/xdebug.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/administrator/Library/Application Support/Local/lightning-services/php-8.2.8+1/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20220829/xdebug.so' (no such file), '/Users/administrator/Library/Application Support/Local/lightning-services/php-8.2.8+1/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20220829/xdebug.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
System => Darwin bras-base-marvpq1603w-grc-01-142-122-13-2.dsl.bell.ca 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:52:24 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6000 x86_64
Build Date => Aug 16 2023 21:18:20
Build System => Darwin Ventura 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 x86_64
Configure Command => './configure' '--prefix=/usr/local/Cellar/php/8.2.9' '--localstatedir=/usr/local/var' '--sysconfdir=/usr/local/etc/php/8.2' '--with-config-file-path=/usr/local/etc/php/8.2' '--with-config-file-scan-dir=/usr/local/etc/php/8.2/conf.d' '--with-pear=/usr/local/Cellar/php/8.2.9/share/php/pear' '--enable-bcmath' '--enable-calendar' '--enable-dba' '--enable-exif' '--enable-ftp' '--enable-fpm' '--enable-gd' '--enable-intl' '--enable-mbregex' '--enable-mbstring' '--enable-mysqlnd' '--enable-pcntl' '--enable-phpdbg' '--enable-phpdbg-readline' '--enable-shmop' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--with-apxs2=/usr/local/opt/httpd/bin/apxs' '--with-bz2=/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr' '--with-curl' '--with-external-gd' '--with-external-pcre' '--with-ffi' '--with-fpm-user=_www' '--with-fpm-group=_www' '--with-gettext=/usr/local/opt/gettext' '--with-gmp=/usr/local/opt/gmp' '--with-iconv=/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr' '--with-kerberos' '--with-layout=GNU' '--with-ldap=/usr/local/opt/openldap' '--with-libxml' '--with-libedit' '--with-mhash=/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr' '--with-mysql-sock=/tmp/mysql.sock' '--with-mysqli=mysqlnd' '--with-ndbm=/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr' '--with-openssl' '--with-password-argon2=/usr/local/opt/argon2' '--with-pdo-dblib=/usr/local/opt/freetds' '--with-pdo-mysql=mysqlnd' '--with-pdo-odbc=unixODBC,/usr/local/opt/unixodbc' '--with-pdo-pgsql=/usr/local/opt/libpq' '--with-pdo-sqlite' '--with-pgsql=/usr/local/opt/libpq' '--with-pic' '--with-pspell=/usr/local/opt/aspell' '--with-sodium' '--with-sqlite3' '--with-tidy=/usr/local/opt/tidy-html5' '--with-unixODBC' '--with-xsl' '--with-zip' '--with-zlib' '--enable-dtrace' '--with-ldap-sasl' '--with-os-sdkpath=/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk' 'PKG_CONFIG_PATH=/usr/local/opt/apr/lib/pkgconfig:/usr/local/opt/openssl@3/lib/pkgconfig:/usr/local/opt/apr-util/lib/pkgconfig:/usr/local/opt/argon2/lib/pkgconfig:/usr/local/opt/brotli/lib/pkgconfig:/usr/local/opt/libidn2/lib/pkgconfig:/usr/local/opt/libnghttp2/lib/pkgconfig:/usr/local/opt/libssh2/lib/pkgconfig:/usr/local/opt/openldap/lib/pkgconfig:/usr/local/opt/rtmpdump/lib/pkgconfig:/usr/local/opt/lz4/lib/pkgconfig:/usr/local/opt/xz/lib/pkgconfig:/usr/local/opt/zstd/lib/pkgconfig:/usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/unixodbc/lib/pkgconfig:/usr/local/opt/libpng/lib/pkgconfig:/usr/local/opt/freetype/lib/pkgconfig:/usr/local/opt/fontconfig/lib/pkgconfig:/usr/local/opt/jpeg-turbo/lib/pkgconfig:/usr/local/opt/highway/lib/pkgconfig:/usr/local/opt/imath/lib/pkgconfig:/usr/local/opt/libtiff/lib/pkgconfig:/usr/local/opt/little-cms2/lib/pkgconfig:/usr/local/opt/openexr/lib/pkgconfig:/usr/local/opt/webp/lib/pkgconfig:/usr/local/opt/jpeg-xl/lib/pkgconfig:/usr/local/opt/libvmaf/lib/pkgconfig:/usr/local/opt/aom/lib/pkgconfig:/usr/local/opt/libavif/lib/pkgconfig:/usr/local/opt/gd/lib/pkgconfig:/usr/local/opt/gmp/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/krb5/lib/pkgconfig:/usr/local/opt/libpq/lib/pkgconfig:/usr/local/opt/libsodium/lib/pkgconfig:/usr/local/opt/libzip/lib/pkgconfig:/usr/local/opt/oniguruma/lib/pkgconfig:/usr/local/opt/pcre2/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig:/usr/local/opt/tidy-html5/lib/pkgconfig' 'PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/13' 'KERBEROS_CFLAGS= ' 'SASL_CFLAGS=-I/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sasl' 'SASL_LIBS=-lsasl2'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/etc/php/8.2
Loaded Configuration File => /Users/administrator/Library/Application Support/Local/run/TnqkNkB1r/conf/php/php.ini
Scan this dir for additional .ini files => /usr/local/etc/php/8.2/conf.d
Additional .ini files parsed => /usr/local/etc/php/8.2/conf.d/ext-opcache.ini

```

I see there seems to be some issue with opcache.

Output of the additional ini file:

```auto
❯ cat /usr/local/etc/php/8.2/conf.d/ext-opcache.ini
───────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /usr/local/etc/php/8.2/conf.d/ext-opcache.ini
───────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1 │ [opcache]
   2 │ zend_extension=/usr/local/opt/php/lib/php/20220829/opcache.so
───────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

```

Error reporting settings:

```auto
; Error Handling
error_reporting = E_ALL & ~E_DEPRECATED
error_log = "/Users/administrator/Local Sites/wordpress/logs/php/error.log"
log_errors = On
display_errors = On
display_startup_errors = On
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
html_errors = On

```

---

<div class="post-metadata">

**Author:** ![philby](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/philby/32/4565_2.png) [@philby](https://community.localwp.com/u/philby)\
**Post date:** [September 8, 2023, 6:46am UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/16 "2023-09-08T06:46:39Z")

</div>

> [@austinwendt](#):
>
> Second, if you’re on the Apple Silicon build, do you have Rosetta 2 installed on your machine?

Sorry to barge in like that into an unrelated thread, but out of curiosity: is there finally a LocalWP Apple Silicon Build that would even work without Rosetta because it uses ARM-native lighning-services mysql, NGiNX and Mailhog?

The latest I could find is 7.1.2+6410, and it still opens the only intel-compiled processes to be found on my Mac, making me somewhat sceptical as to if there ever will be a truly ARM-native LocalWP.

---

<div class="post-metadata">

**Author:** ![afragen](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/afragen/32/31_2.png) [@afragen](https://community.localwp.com/u/afragen)\
**Post date:** [September 8, 2023, 3:48pm UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/17 "2023-09-08T15:48:40Z")

</div>

I think it’s all about the lightning-services.

---

<div class="post-metadata">

**Author:** ![ben.turner](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ben.turner/32/5366_2.png) [@ben.turner](https://community.localwp.com/u/ben.turner)\
**Post date:** [September 8, 2023, 7:09pm UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/18 "2023-09-08T19:09:39Z")

</div>

Hey @andfinally – Thanks for your patience with this!

It definitely looks like the system version of PHP is taking precedence over Local’s version of PHP:

 ![Image 2023-09-05 at 7.58.29 AM.jpg](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/b/0/b07382f1969428de66dcd60c851a0db6f60cf48c.jpeg)

Note that because the `/usr/local/bin` is “higher” than the folder’s that Local adds, when your shell looks for the php binary, it stops when it finds the system one.

This is usually due to the shell config re-adding items to the PATH.

I’m going to do some tinkering to see if there is a better way to guard against this kind of problem, but as a work-around, I wonder if you were to update your ZSH config. Looking at the output from the PATH command, you might try moving these lines from a `.zshrc` file to a `.zprofile` file:

```auto
/Users/administrator/Library/pnpm
/usr/local/opt/openssl@1.1/bin
/Users/administrator/.pyenv/shims
/usr/local/opt/openjdk@11/bin
/usr/local/opt/inetutils/libexec/gnubin
/Users/administrator/.composer/vendor/bin
/usr/local/sbin
/usr/local/mysql/bin
/usr/local/bin
/Users/administrator/bin

```

Judging from the output, I’m guessing that `.rvm` config would also be in the `.zprofile` file?

After you do this, you’d need to log back out and back in again. The reason for moving to `.zprofile` is that the items in that file are sourced just once when you log in. The items in the `.zshrc` file are sourced every time a shell is spawned, which is why you see the above lines repeated after Local’s lines.

I realize this is annoying and consider this more of a workaround, but I am curious if that fixes things so that you don’t get that output in your shell.

---

<div class="post-metadata">

**Author:** ![ben.turner](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ben.turner/32/5366_2.png) [@ben.turner](https://community.localwp.com/u/ben.turner)\
**Post date:** [September 8, 2023, 7:15pm UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/19 "2023-09-08T19:15:59Z")

</div>

> [@philby](#):
>
> is there finally a LocalWP Apple Silicon Build that would even work without Rosetta because it uses ARM-native lighning-services mysql, NGiNX and Mailhog?

No “only Apple Silicon” build yet – as you and @afragen say, the Nginx, Mailhog, and Mysql lightning services need to be compiled.

Most of our recent effort has been improving our CI/CD processes for PHP so that it doesn’t take a year to come around and compile new patch versions of PHP. I don’t have an ETA for when we’ll get to those other services.

@philby – it’s probably a good idea to create a #Feature requests to get those other Lightning Services worked on so we can communicate and prioritize the work!

---

<div class="post-metadata">

**Author:** ![austinwendt](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/austinwendt/32/13912_2.png) [@austinwendt](https://community.localwp.com/u/austinwendt)\
**Post date:** [September 8, 2023, 7:19pm UTC](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610/20 "2023-09-08T19:19:03Z")

</div>

@philby Hey Phil - no worries, thanks for hopping in.

Not yet, there isn’t an Apple Silicon build of Local that doesn’t require Rosetta 2. Like @afragen mentioned, it is about the lightning services (PHP, mySQL, nginx, Apache, etc). The app itself + PHP are compiled for Apple Silicon, and that is where 90%+ of the performance improvements came from. Beyond the app + PHP, we saw diminishing returns as we looked into the other services.

That’s not to say it won’t happen, or that it isn’t still on the radar. It is something we plan to do! We’ve been heads down in PHP land and pipeline automation to make that smooth going forward - and frankly, so we have time to do other things like this rather than get pulled into PHP updates several times a year 🙂

Edit: Ben must have been typing at the same time, ha! I think we have an existing feature request, but yes, we’re on it and I appreciate the bump.

[Next page](https://community.localwp.com/t/macos-ventura-wp-cli-fatal-error-typeerror-implode/38610.md?page=2)
