Local Community

Local Lightning PHP 8 "Open Site Shell" does not work on ZSH

Bug Summary

I previously made a bug report about “open site shell” not working on zsh for php 7.4.1, which was solved by the Local dev team. The same exact bug is present on php 8.0, and is likely an easy fix, given that it has been fixed in 7.4.1. Here is the original bug report (with details on resolution): Open Site Shell fails on zsh, works on bash, for some php versions (ubuntu/linux)

Steps to reproduce

On Linux (.deb version), with zsh as your shell, create a site with php 8, and try to use “open site shell”. It will fail. Then change your shell to bash, and repeat. It will succeed.

Environment Info

  • What Operating System are you using?
    PopOS / Ubuntu / Debian
  • What versions of site software (Nginx, Apache, PHP, MySQL) is used?
    PHP 8, with any server and db
  • What version of Local is installed?
    6.3.x and all previous versions (I have been experiencing this for more than a year and just bringing it up again in hopes it can get some attention)

This one should be an easy win for the dev team. Any chance we’ll have a look?

Hi @tlock,

Thanks for bumping this, and apologies that you’re running into the issue with PHP 8! I found the ticket from your last post in our ticketing system, so that gives me some more details too. Let me duplicate this for PHP 8 and get it front of the dev team.

I don’t have an ETA yet, but I’ll link this thread in our ticket so that we make sure to come back here as soon as it is being worked.

Thanks,
Austin

Fantastic, thanks for the update!

Just a friendly check-up, did this get into the queue?

Hi Austin, did we get this into the queue?

Hi @tlock - it is at the top of our backlog right now, but it has not been worked yet. We’re wrapping up some Blueprints and accessibility improvements to the Local app; once those are finished, this bug and our bug around untrusted SSL certs are the first two in.

Unfortunately, no ETA yet, but I haven’t forgotten about you - you’ll be the first to know when we’ve pulled it in!

1 Like

Thanks for the update!

I have a similar issue. Open Site shell appears for a second then quits.

I have installed gnome-terminal bit still no luck.

I can see wp-cli is doing something…

where can I set which shell to use? zsh and bash work for me.

  • What Operating System are you using?
    Arch Linux
  • What versions of site software (Nginx, Apache, PHP, MySQL) is used?
    PHP 8, with any server and db
  • What version of Local is installed?
    6.3.x and all previous versions (I have been experiencing this for more than a year and just bringing it up again in hopes it can get some attention)

@ckid yup, that’s the same issue. If you need a workaround you can change to bash with chsh (chsh(1) - Linux manual page), log out, log back in.

@austinwendt any chance this is in the queue yet? Many platforms like WP Engine have already moved to PHP 8, which is really pressing this issue.

I reported this bug 1.5 years ago when it was affecting both 7.4.1 and 8, it was fixed for 7.4.1 after 4 months, but we’re still waiting on 8.0 for more than a year.

I really hate saying dramatic things like this but we’re considering moving away from LocalWP to https://lando.dev/.

@ckid I had a bit of time today to look into this, and I have a suitable fix/workaround which does not require changing shell to bash and/or logging out and back in.

I just sym-linked my system libm.so.6 into the Local Lightning php-8 shared libs directory.

Steps:

  1. Rename ~/.config/Local/lightning-services/php-8.0.0+3/bin/linux/shared-libs/libm.so.6 to libm.so.bak (your lightning services path may differ)
  2. Locate your system libm.so.6 with find /usr/lib -name 'libm.so.6'
  3. Sym-link it to into the local lightning location with ln -s <path-to-system-libm.so.6> <path-to-local-lightning-php-8-libm.so.6>

If you have doubts about what the exact issue is, and the exact location of this library file, or are trying to use another shell like fish, the following information will help you figure out anything you need:

  1. Change shell to bash, log out, log back in
  2. Open Site Shell via LocalWP menu for a site using PHP8
  3. Switch to the desired shell by calling it from the terminal directly: eg run zsh or fish, etc
  4. The shell change will fail, but the output will tell you exactly which libraries/versions are missing in Local Lightning, and their location
  5. Optional: Check your own system version with ldd --version (Optional because you already know you have the required libs by the fact that you already use that shell day to day).
  6. Sym link as per steps outlined above

@austinwendt I will stop monitoring this thread now, after 1.5 years over two tickets, but I emplore the LocalWP team to fix this issue for everyone else.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.