# Problem with missing PHP extensions

**URL:** <https://community.localwp.com/t/problem-with-missing-php-extensions/43007>\
**Category:** Support\
**Created:** [May 22, 2024, 12:45am UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007 "2024-05-22T00:45:24Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikemuller](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mikemuller](https://community.localwp.com/u/mikemuller)\
**Post date:** [May 22, 2024, 12:45am UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/1 "2024-05-22T00:45:24Z")

</div>

I run a command line script that will download a production server to my local. It’s been working great for a long time. All of the sudden I’m getting errors like this:

Output: Failed loading /Users/mikemuller/Library/Application Support/Local/lightning-services/php-7.4.30+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20190902/opcache.so:

Is there a reason those extensions are not loading or not present? How can they be re-installed easliy?

---

<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:** [May 22, 2024, 4:34pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/2 "2024-05-22T16:34:13Z")

</div>

It’s hard to know for sure what’s going on without a little more detail.

From that path, it looks like you’re using an Intel Mac (the `darwin` part of the path) – can you give a little more detail around the OS version that’s running as well as the version of Local that’s being used?

Also, what kind of remote environment is the script pulling from? It’s possible that the remote server added something like an `mu-plugin` that tries to leverage some kind of opcache features and which weren’t present in earlier versions of the site.

You might also try a different version of PHP. PHP 7.4.x reached its EOL back in 2022: [PHP: Supported Versions](https://www.php.net/supported-versions.php) and we haven’t made any updates to it for a long time.

---

<div class="post-metadata">

**Author:** ![mikemuller](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mikemuller](https://community.localwp.com/u/mikemuller)\
**Post date:** [May 22, 2024, 5:08pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/3 "2024-05-22T17:08:22Z")

</div>

I’m actually an MI mac. I’m pulling from a Cloudways/Digital Ocean server. I was uninstalling some PHP that was installed with Homebrew a week ago and then this started happening. Should I completely uninstall Local and then reinstall it?

---

<div class="post-metadata">

**Author:** ![mikemuller](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mikemuller](https://community.localwp.com/u/mikemuller)\
**Post date:** [May 22, 2024, 5:21pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/4 "2024-05-22T17:21:36Z")

</div>

Forgot to mention that this is happening during the database import process. The error occurs when the dump.sql.gz file it tring to be imported into the local database.

---

<div class="post-metadata">

**Author:** ![mikemuller](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mikemuller](https://community.localwp.com/u/mikemuller)\
**Post date:** [May 23, 2024, 9:01pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/5 "2024-05-23T21:01:42Z")

</div>

Also getting this error with the xdebug extension:

Output: Failed loading /Users/mikemuller/Library/Application Support/Local/lightning-services/php-8.1.23+0/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/opcache.so: dlopen(/Users/mikemuller/Library/Application Support/Local/lightning-services/php-8.1.23+0/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/opcache.so, 0x0009): symbol not found in flat namespace ‘\_pcre2\_code\_free\_8’  
Failed loading /Users/mikemuller/Library/Application Support/Local/lightning-services/php-8.1.23+0/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so: dlopen(/Users/mikemuller/Library/Application Support/Local/lightning-services/php-8.1.23+0/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so, 0x0009): symbol not found in flat namespace ‘\_\_zend\_get\_parameters\_array\_ex’

---

<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:** [May 24, 2024, 3:56pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/6 "2024-05-24T15:56:54Z")

</div>

So this is only happening when trying to import this specific site from Cloudways but not on any other sites?

How are you “pulling” the site? Using a migration plugin?

As a workaround, are you able to use any of our alternative import methods? Like importing a zip file or manually moving over the WP Content and SQL?

> **[Import/Export a WordPress Site](https://localwp.com/help-docs/getting-started/how-to-import-a-wordpress-site-into-local/)**
>
> This help document will walk you through how to import and export a site to and from Local. It will also go over how to restore from only Local site files. Table of Contents: Local is pretty flexible…

---

<div class="post-metadata">

**Author:** ![mikemuller](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mikemuller](https://community.localwp.com/u/mikemuller)\
**Post date:** [May 24, 2024, 4:51pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/7 "2024-05-24T16:51:26Z")

</div>

It seems to be only cloudways but is happening on multiple differeent servers from different cloud hosting platforms. This was working perfectly about 1 week or so ago and then stopped working and throwing that error. It’s been working with no error for at least a year. Just trying to figure out what changed. Nothing changed on the cloudways side of things. The error that is most concerning is the xbdebug one as that 's a native plugin for Local.

---

<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:** [May 24, 2024, 5:06pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/8 "2024-05-24T17:06:17Z")

</div>

Hi @mikemuller

Have you tried downgrading to see if that resolves the issue since it seems to be with the recent release?

> **[Downgrade Local Version](https://localwp.com/help-docs/troubleshooting/downgrade-local-version/)**
>
> Downgrading Local may be used to troubleshoot issues presented with a newer version or other various reasons. We recommend running Local on the latest version available when possible.

---

<div class="post-metadata">

**Author:** ![mikemuller](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mikemuller](https://community.localwp.com/u/mikemuller)\
**Post date:** [May 24, 2024, 5:20pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/9 "2024-05-24T17:20:56Z")

</div>

I did downgrade and that did not help. Could this be a problem with my local machine? I did uninstall some stuff that was installed via homebrew.

symbol not found in flat namespace ‘\_pcre2\_code\_free\_8’  
Failed loading /Users/mikemuller/Library/Application Support/Local/lightning-services/php-8.1.23+0/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so: dlopen(/Users/mikemuller/Library/Application Support/Local/lightning-services/php-8.1.23+0/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so, 0x0009): symbol not found in flat namespace ‘\_\_zend\_get\_parameters\_array\_ex’

This seems like an issue with the php extension?

---

<div class="post-metadata">

**Author:** ![mikemuller](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mikemuller](https://community.localwp.com/u/mikemuller)\
**Post date:** [May 24, 2024, 5:30pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/10 "2024-05-24T17:30:51Z")

</div>

Not sure if this helps but I found this document about the change:

> **[MariaDB Dump File Compatibility Change - MariaDB.org](https://mariadb.org/mariadb-dump-file-compatibility-change/)**
>
> To improve security, we had to break compatibility with older MariaDB dump files. This is why and how to workaround any issues.

Would updating the version of MySQL in Local fix this?

---

<div class="post-metadata">

**Author:** ![mikemuller](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mikemuller](https://community.localwp.com/u/mikemuller)\
**Post date:** [May 24, 2024, 5:44pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/11 "2024-05-24T17:44:11Z")

</div>

Sorry for the multiple threads but I get this when doing a standard wp export db command inside local on my machine:

Launching shell: /bin/zsh …  
mikemuller@Mikes-MacBook-Pro-3 public % wp export db dump.sql  
Failed loading /Users/mikemuller/Library/Application Support/Local/lightning-services/php-8.1.23+0/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/opcache.so: dlopen(/Users/mikemuller/Library/Application Support/Local/lightning-services/php-8.1.23+0/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/opcache.so, 0x0009): symbol not found in flat namespace ‘\_pcre2\_code\_free\_8’  
Failed loading /Users/mikemuller/Library/Application Support/Local/lightning-services/php-8.1.23+0/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so: dlopen(/Users/mikemuller/Library/Application Support/Local/lightning-services/php-8.1.23+0/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so, 0x0009): symbol not found in flat namespace ‘\_\_zend\_get\_parameters\_array\_ex’

Warning: Module “imagick” is already loaded in Unknown on line 0  
Error: Too many positional arguments: db dump.sql  
mikemuller@Mikes-MacBook-Pro-3 public % wp db export dump.sql  
Failed loading /Users/mikemuller/Library/Application Support/Local/lightning-services/php-8.1.23+0/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/opcache.so: dlopen(/Users/mikemuller/Library/Application Support/Local/lightning-services/php-8.1.23+0/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/opcache.so, 0x0009): symbol not found in flat namespace ‘\_pcre2\_code\_free\_8’  
Failed loading /Users/mikemuller/Library/Application Support/Local/lightning-services/php-8.1.23+0/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so: dlopen(/Users/mikemuller/Library/Application Support/Local/lightning-services/php-8.1.23+0/bin/darwin-arm64/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so, 0x0009): symbol not found in flat namespace ‘\_\_zend\_get\_parameters\_array\_ex’

Warning: Module “imagick” is already loaded in Unknown on line 0  
Success: Exported to ‘dump.sql’.  
mikemuller@Mikes-MacBook-Pro-3 public %

Any ideas?

---

<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:** [May 24, 2024, 6:27pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/12 "2024-05-24T18:27:29Z")

</div>

How many sites do you have in @mikemuller? It might be worth trying a full uninstall/reinstall but you’d want to make sure all of your sites/work is backed up and saved.

> **[Backup a Local Site](https://localwp.com/help-docs/getting-started/how-to-backup-a-local-site/)**
>
> Learn how to back up your Local Sites to avoid data loss and protect your hard work.

> **[Uninstall Local](https://localwp.com/help-docs/troubleshooting/uninstalling-local/)**
>
> We’re sorry to see you go! Follow the instructions below to remove Local. Table of Contents: There are three main parts to the Local app, and depending on what you are trying to do, you may want to…

---

<div class="post-metadata">

**Author:** ![mikemuller](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mikemuller](https://community.localwp.com/u/mikemuller)\
**Post date:** [May 24, 2024, 6:39pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/13 "2024-05-24T18:39:42Z")

</div>

Already did that as well. Deleted the app, Application Support files, etc.

I just tried the wp db export command using the same files (Imported from the exported zip file) on a different computer and it worked fine. It was an Intel computer though.

---

<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:** [May 24, 2024, 6:52pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/14 "2024-05-24T18:52:28Z")

</div>

So the one with the problems is an Apple Silicon? I’m assuming you have Rosetta 2 installed? Otherwise, you probably wouldn’t be able to start sites at all but just want to check.

---

<div class="post-metadata">

**Author:** ![mikemuller](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mikemuller](https://community.localwp.com/u/mikemuller)\
**Post date:** [May 24, 2024, 7:01pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/15 "2024-05-24T19:01:35Z")

</div>

Yes, it is the Apple Silicon mac. I did run the lates software update around the same time. Could that be it? I do have Rosetta 2 installed.

---

<div class="post-metadata">

**Author:** ![mikemuller](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mikemuller](https://community.localwp.com/u/mikemuller)\
**Post date:** [June 10, 2024, 8:41pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/16 "2024-06-10T20:41:23Z")

</div>

Any thoughts on this?

---

<div class="post-metadata">

**Author:** ![nickc](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nickc/32/21209_2.png) [@nickc](https://community.localwp.com/u/nickc)\
**Post date:** [June 11, 2024, 2:47pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/17 "2024-06-11T14:47:09Z")

</div>

Hi, @mikemuller.

> I was uninstalling some PHP that was installed with Homebrew a week ago and then this started happening.

Are you confident that there is now no other version of PHP installed on your system? If your shell environment tries to load another version of PHP in addition to Local’s version, it could result in the errors about incompatible libraries that you see.

Some things you can try:

1. Check that `brew info php` does not show “Installed”, like this:

2. Temporarily rename your shell config file (usually at `~/.zshrc`), restart Local, and see if you still see issues. If that fixes things, you may have something in your shell config that’s loading another version of PHP. (Some apps write to your shell config, so it might not be something you’ve added manually.)

If those ideas don’t help, you can also try removing the versions of PHP that Local installed to force it to redownload them [as described here](https://community.localwp.com/t/tried-to-change-php-version-on-1-site-local-crashed-now-no-sites-open/43195/2).

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [September 9, 2024, 2:47pm UTC](https://community.localwp.com/t/problem-with-missing-php-extensions/43007/18 "2024-09-09T14:47:12Z")

</div>

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