# Fatal errors on local sites which work perfectly online

**URL:** <https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327>\
**Category:** Bug Reports\
**Created:** [June 29, 2023, 2:25pm UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327 "2023-06-29T14:25:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christoph](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/christoph/32/2188_2.png) [@Christoph](https://community.kinsta.com/u/Christoph)\
**Post date:** [June 29, 2023, 2:25pm UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/1 "2023-06-29T14:25:25Z")

</div>

**Q: Date/Time this occurred (Provide your time zone also)**  
**A:** 29.06.2023 (EEST)

**Q: DevKinsta Version**  
**A:** 2.11.0

**Q: OS Version**  
**A:** Windows 11

**Q: Docker Desktop Version**  
**A:** 4.20.1 (110738)

**Q: Were any error codes or messages observed? If so, what were they?**  
**A:** Fatal error: Uncaught Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of ‘256’ frames in /www/kinsta/public/xxxxxx/wp-includes/plugin.php on line _1013_  
( ! ) Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of ‘256’ frames in /www/kinsta/public/xxxxxx/wp-includes/plugin.php on line _1013_

Fatal error: Uncaught ValueError: Path cannot be empty in /www/kinsta/public/xxxxxx/wp-admin/includes/class-wp-filesystem-direct.php on line _66_  
( ! ) ValueError: Path cannot be empty in /www/kinsta/public/xxxxxx/wp-admin/includes/class-wp-filesystem-direct.php on line _66_

**Q: Detailed Description of the Problem**  
**A:** I have just started working with DevKinsta, got all the installation right and downloaded two of our sites locally. When I run them I first only got “There has been a critical error on this website.”  
When I switched on WP\_DEBUG in the DevKinsta settings the error messages above showed up - with both of my sites. As the pages work perfectly fine online I assume there is a but in the DevKinsta environment.  
What I’ve done to trouble shoot:

- Restart of DevKinsta,
- reboot of the entire system

---

<div class="post-metadata">

**Author:** ![ZachE](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/zache/32/1683_2.png) [@ZachE](https://community.kinsta.com/u/ZachE)\
**Post date:** [June 29, 2023, 11:35pm UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/2 "2023-06-29T23:35:40Z")

</div>

Hi @Christoph!

Welcome to the DevKinsta Community!

It sounds like you have XDebug enabled, and are trying to do something like this:

> **[Xdebug Support](https://kinsta.com/knowledgebase/devkinsta/xdebug-support/)**
>
> Xdebug is included with the FPM Docker image for DevKinsta. In this guide, we'll show you how to configure it with your site in DevKinsta.

To resolve the top error, can you try to adjust `xdebug.max_nesting_level=256` to something with a higher value e.g. 512, 1024, 2048, and restart the site to retry the debugging. I mention this option because it’s the only setting which defaults to 256 - [Xdebug: Documentation » All settings](https://xdebug.org/docs/all_settings)

That should at least allow you dig a little deeper past the initial XDebug stack depth limit issue, into the root of the actual issue using your IDE.

Given XDebug has detected an infinite loop it sounds like the stack isn’t transmitting to your IDE, the error suggests the issue is to do with a plugin (wp-includes/plugin.php).

To identify the plugin responsible, would you be able to sequentially disable the latest updated and added plugins to test if the error goes away, if just to identify the plugin which triggers the issue when it is re-enabled. Either via WP Admin or via WP-CLI should be fine. Probably best to disable MU plugins as well.

If the only change you made was to enable WP\_DEBUG true in wp-config.php then that suggests a plugin detects and/or extends WP\_DEBUG when enabled, and attempts to access a blank filename on the filesystem further down the stack.

If that doesn’t resolve the issue or help you get closer to a solution, feel free to DM either myself, @Agus or @Alessandro your Logs ([Logging and Site Debugging in DevKinsta - Kinsta®](https://kinsta.com/knowledgebase/devkinsta/logging/)) or the hostnames of the sites in MyKinsta with the issue and we’ll check for any issues with the environment configuration

Best regards,  
Zach

---

<div class="post-metadata">

**Author:** ![Christoph](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/christoph/32/2188_2.png) [@Christoph](https://community.kinsta.com/u/Christoph)\
**Post date:** [June 30, 2023, 10:00am UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/3 "2023-06-30T10:00:16Z")

</div>

Thanks a lot! I’ve set the value all the way to 2048 only with the very same effect - just a different number. 🙂  
But I was able to figure out which plugin is the culprit: It’s the Popup Maker ([https://wppopupmaker.com/](https://wppopupmaker.com/)). It works perfectly fine within our Kinsta live environment, just not locally. Any idea for the further trouble shooting?

---

<div class="post-metadata">

**Author:** ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)\
**Post date:** [June 30, 2023, 11:29am UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/4 "2023-06-30T11:29:57Z")

</div>

Hello @Christoph,

when enabling WordPress debug log, does any debug.log file gets created? If so is there any more specific error?  
Without looking, if the plugin is a premium plugin, I could guess that it returns a fatal error when the domain isn’t recognised. Most of the licenses are linked to the domain registered when purchasing/setting up the pro plugin.

Regards,  
Alessandro

---

<div class="post-metadata">

**Author:** ![Christoph](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/christoph/32/2188_2.png) [@Christoph](https://community.kinsta.com/u/Christoph)\
**Post date:** [July 3, 2023, 3:42pm UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/5 "2023-07-03T15:42:22Z")

</div>

Hi @Alessandro! Thanks for the advice. I have whitelisted the .local domain within the plugins license environment. The problem rather seems to originate in an error in the file system in the sense of missing accessing/reading/writing user rights.

This is the debug.log from the local environment (see attached file). I sense the error might be connected with the fact that the file system paths rather look like in the live environment and not the local one. So probably something went wrong in the syncing transaction while getting the files/database from the live server to the local environment.

First lines here:

[03-Jul-2023 15:24:36 UTC] PHP Fatal error: Uncaught Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of ‘256’ frames in /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php:1013  
Stack trace:  
#0 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(1013): spl\_object\_hash()  
#1 /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-hook.php(75): \_wp\_filter\_build\_unique\_id()  
#2 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(128): WP\_Hook-\>add\_filter()  
#3 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(442): add\_filter()  
#4 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Utils/Logging.php(76): add\_action()  
#5 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Utils/Logging.php(65): PUM\_Utils\_Logging-\>\_\_construct()  
#6 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Helpers.php(134): PUM\_Utils\_Logging::instance()  
#7 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Utils/Logging.php(82): PUM\_Helpers::get\_upload\_dir()  
#8 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Utils/Logging.php(65): PUM\_Utils\_Logging-\>\_\_construct()  
#9 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Helpers.php(134): PUM\_Utils\_Logging::instance()  
#10 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Utils/Logging.php(82): PUM\_Helpers::get\_upload\_dir()  
#11 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Utils/Logging.php(65): PUM\_Utils\_Logging-\>\_\_construct()  
#12 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Helpers.php(134): PUM\_Utils\_Logging::instance()  
#13 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Utils/Logging.php(82): PUM\_Helpers::get\_upload\_dir()  
#14 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Utils/Logging.php(65): PUM\_Utils\_Logging-\>\_\_construct()  
#15 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Helpers.php(134): PUM\_Utils\_Logging::instance()  
#16 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Utils/Logging.php(82): PUM\_Helpers::get\_upload\_dir()

And the bottom of the file:

#242 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/AssetCache.php(204): PUM\_Helpers::get\_upload\_dir\_path()  
#243 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/AssetCache.php(79): PUM\_AssetCache::get\_cache\_dir()  
#244 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/popup-maker.php(323): PUM\_AssetCache::init()  
#245 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/popup-maker.php(189): Popup\_Maker-\>init()  
#246 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/popup-maker.php(366): Popup\_Maker::instance()  
#247 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/popup-maker.php(381): pum()  
#248 /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-hook.php(308): pum\_init()  
#249 /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-hook.php(332): WP\_Hook-\>apply\_filters()  
#250 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(517): WP\_Hook-\>do\_action()  
#251 /www/kinsta/public/xxxxxxxx/wp-settings.php(486): do\_action()  
#252 /www/kinsta/public/xxxxxxxx/wp-config.php(207): require\_once(‘…’)  
#253 /www/kinsta/public/xxxxxxxx/wp-load.php(50): require\_once(‘…’)  
#254 /www/kinsta/public/xxxxxxxx/wp-admin/admin.php(34): require\_once(‘…’)  
#255 /www/kinsta/public/xxxxxxxx/wp-admin/update-core.php(10): require\_once(‘…’)  
#256 {main}  
thrown in /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php on line 1013  
[03-Jul-2023 15:24:37 UTC] Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: host.docker.internal:9000 (through xdebug.client\_host/xdebug.client\_port).  
[03-Jul-2023 15:24:37 UTC] PHP Notice: Function is\_embed was called **incorrectly**. Conditional query tags do not work before the query is run. Before then, they always return false. Please see [Debugging in WordPress](https://wordpress.org/documentation/article/debugging-in-wordpress/) for more information. (This message was added in version 3.1.0.) in /www/kinsta/public/xxxxxxxx/wp-includes/functions.php on line 5865  
[03-Jul-2023 15:24:37 UTC] PHP Stack trace:  
[03-Jul-2023 15:24:37 UTC] PHP 1. WP\_Fatal\_Error\_Handler-\>handle() /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-fatal-error-handler.php:0  
[03-Jul-2023 15:24:37 UTC] PHP 2. WP\_Fatal\_Error\_Handler-\>display\_error\_template($error = [‘type’ =\> 1, ‘message’ =\> ‘Uncaught Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames in /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php:1013\nStack trace:\n#0 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(1013): spl\_object\_hash()\n#1 /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-hook.php(75): \_wp\_filter\_build\_unique\_id()\n#2 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(128): WP\_Hook-\>add\_filter()\n#3 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(442): add\_filt’…, ‘file’ =\> ‘/www/kinsta/public/xxxxxxxx/wp-includes/plugin.php’, ‘line’ =\> 1013], $handled = class WP\_Error { public $errors = [‘invalid\_source’ =\> […]]; public $error\_data = ; protected $additional\_data = }) /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-fatal-error-handler.php:58  
[03-Jul-2023 15:24:37 UTC] PHP 3. WP\_Fatal\_Error\_Handler-\>display\_default\_error\_template($error = [‘type’ =\> 1, ‘message’ =\> ‘Uncaught Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames in /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php:1013\nStack trace:\n#0 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(1013): spl\_object\_hash()\n#1 /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-hook.php(75): \_wp\_filter\_build\_unique\_id()\n#2 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(128): WP\_Hook-\>add\_filter()\n#3 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(442): add\_filt’…, ‘file’ =\> ‘/www/kinsta/public/xxxxxxxx/wp-includes/plugin.php’, ‘line’ =\> 1013], $handled = class WP\_Error { public $errors = [‘invalid\_source’ =\> […]]; public $error\_data = ; protected $additional\_data = }) /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-fatal-error-handler.php:154  
[03-Jul-2023 15:24:37 UTC] PHP 4. wp\_die($message = class WP\_Error { public $errors = [‘internal\_server\_error’ =\> […]]; public $error\_data = [‘internal\_server\_error’ =\> […]]; protected $additional\_data = }, $title = ‘’, $args = [‘response’ =\> 500, ‘exit’ =\> FALSE]) /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-fatal-error-handler.php:239  
[03-Jul-2023 15:24:37 UTC] PHP 5. \_default\_wp\_die\_handler($message = class WP\_Error { public $errors = [‘internal\_server\_error’ =\> […]]; public $error\_data = [‘internal\_server\_error’ =\> […]]; protected $additional\_data = }, $title = ‘’, $args = [‘response’ =\> 500, ‘exit’ =\> FALSE]) /www/kinsta/public/xxxxxxxx/wp-includes/functions.php:3722  
[03-Jul-2023 15:24:37 UTC] PHP 6. wp\_robots() /www/kinsta/public/xxxxxxxx/wp-includes/functions.php:3798  
[03-Jul-2023 15:24:37 UTC] PHP 7. apply\_filters($hook\_name = ‘wp\_robots’, $value = ) /www/kinsta/public/xxxxxxxx/wp-includes/robots-template.php:32  
[03-Jul-2023 15:24:37 UTC] PHP 8. WP\_Hook-\>apply\_filters($value = , $args = [0 =\>]) /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php:205  
[03-Jul-2023 15:24:37 UTC] PHP 9. wp\_robots\_noindex\_embeds($robots = ) /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-hook.php:308  
[03-Jul-2023 15:24:37 UTC] PHP 10. is\_embed() /www/kinsta/public/xxxxxxxx/wp-includes/robots-template.php:93  
[03-Jul-2023 15:24:37 UTC] PHP 11. \_doing\_it\_wrong($function\_name = ‘is\_embed’, $message = ‘Conditional query tags do not work before the query is run. Before then, they always return false.’, $version = ‘3.1.0’) /www/kinsta/public/xxxxxxxx/wp-includes/query.php:882  
[03-Jul-2023 15:24:37 UTC] PHP 12. trigger\_error($message = ‘Function is\_embed was called **incorrectly**. Conditional query tags do not work before the query is run. Before then, they always return false. Please see [Debugging in WordPress](https://wordpress.org/documentation/article/debugging-in-wordpress/) for more information. (This message was added in version 3.1.0.)’, $error\_level = 1024) /www/kinsta/public/xxxxxxxx/wp-includes/functions.php:5865  
[03-Jul-2023 15:24:37 UTC] PHP Notice: Function is\_search was called **incorrectly**. Conditional query tags do not work before the query is run. Before then, they always return false. Please see [Debugging in WordPress](https://wordpress.org/documentation/article/debugging-in-wordpress/) for more information. (This message was added in version 3.1.0.) in /www/kinsta/public/xxxxxxxx/wp-includes/functions.php on line 5865  
[03-Jul-2023 15:24:37 UTC] PHP Stack trace:  
[03-Jul-2023 15:24:37 UTC] PHP 1. WP\_Fatal\_Error\_Handler-\>handle() /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-fatal-error-handler.php:0  
[03-Jul-2023 15:24:37 UTC] PHP 2. WP\_Fatal\_Error\_Handler-\>display\_error\_template($error = [‘type’ =\> 1, ‘message’ =\> ‘Uncaught Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames in /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php:1013\nStack trace:\n#0 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(1013): spl\_object\_hash()\n#1 /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-hook.php(75): \_wp\_filter\_build\_unique\_id()\n#2 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(128): WP\_Hook-\>add\_filter()\n#3 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(442): add\_filt’…, ‘file’ =\> ‘/www/kinsta/public/xxxxxxxx/wp-includes/plugin.php’, ‘line’ =\> 1013], $handled = class WP\_Error { public $errors = [‘invalid\_source’ =\> […]]; public $error\_data = ; protected $additional\_data = }) /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-fatal-error-handler.php:58  
[03-Jul-2023 15:24:37 UTC] PHP 3. WP\_Fatal\_Error\_Handler-\>display\_default\_error\_template($error = [‘type’ =\> 1, ‘message’ =\> ‘Uncaught Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames in /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php:1013\nStack trace:\n#0 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(1013): spl\_object\_hash()\n#1 /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-hook.php(75): \_wp\_filter\_build\_unique\_id()\n#2 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(128): WP\_Hook-\>add\_filter()\n#3 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(442): add\_filt’…, ‘file’ =\> ‘/www/kinsta/public/xxxxxxxx/wp-includes/plugin.php’, ‘line’ =\> 1013], $handled = class WP\_Error { public $errors = [‘invalid\_source’ =\> […]]; public $error\_data = ; protected $additional\_data = }) /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-fatal-error-handler.php:154  
[03-Jul-2023 15:24:37 UTC] PHP 4. wp\_die($message = class WP\_Error { public $errors = [‘internal\_server\_error’ =\> […]]; public $error\_data = [‘internal\_server\_error’ =\> […]]; protected $additional\_data = }, $title = ‘’, $args = [‘response’ =\> 500, ‘exit’ =\> FALSE]) /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-fatal-error-handler.php:239  
[03-Jul-2023 15:24:37 UTC] PHP 5. \_default\_wp\_die\_handler($message = class WP\_Error { public $errors = [‘internal\_server\_error’ =\> […]]; public $error\_data = [‘internal\_server\_error’ =\> […]]; protected $additional\_data = }, $title = ‘’, $args = [‘response’ =\> 500, ‘exit’ =\> FALSE]) /www/kinsta/public/xxxxxxxx/wp-includes/functions.php:3722  
[03-Jul-2023 15:24:37 UTC] PHP 6. wp\_robots() /www/kinsta/public/xxxxxxxx/wp-includes/functions.php:3798  
[03-Jul-2023 15:24:37 UTC] PHP 7. apply\_filters($hook\_name = ‘wp\_robots’, $value = ) /www/kinsta/public/xxxxxxxx/wp-includes/robots-template.php:32  
[03-Jul-2023 15:24:37 UTC] PHP 8. WP\_Hook-\>apply\_filters($value = , $args = [0 =\>]) /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php:205  
[03-Jul-2023 15:24:37 UTC] PHP 9. wp\_robots\_noindex\_search($robots = ) /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-hook.php:308  
[03-Jul-2023 15:24:37 UTC] PHP 10. is\_search() /www/kinsta/public/xxxxxxxx/wp-includes/robots-template.php:119  
[03-Jul-2023 15:24:37 UTC] PHP 11. \_doing\_it\_wrong($function\_name = ‘is\_search’, $message = ‘Conditional query tags do not work before the query is run. Before then, they always return false.’, $version = ‘3.1.0’) /www/kinsta/public/xxxxxxxx/wp-includes/query.php:700  
[03-Jul-2023 15:24:37 UTC] PHP 12. trigger\_error($message = ‘Function is\_search was called **incorrectly**. Conditional query tags do not work before the query is run. Before then, they always return false. Please see [Debugging in WordPress](https://wordpress.org/documentation/article/debugging-in-wordpress/) for more information. (This message was added in version 3.1.0.)’, $error\_level = 1024) /www/kinsta/public/xxxxxxxx/wp-includes/functions.php:5865  
[03-Jul-2023 15:24:37 UTC] Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: host.docker.internal:9000 (through xdebug.client\_host/xdebug.client\_port).  
[03-Jul-2023 15:24:37 UTC] PHP Fatal error: Uncaught ValueError: Path cannot be empty in /www/kinsta/public/xxxxxxxx/wp-admin/includes/class-wp-filesystem-direct.php:66  
Stack trace:  
#0 /www/kinsta/public/xxxxxxxx/wp-admin/includes/class-wp-filesystem-direct.php(66): fopen()  
#1 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Utils/Logging.php(286): WP\_Filesystem\_Direct-\>put\_contents()  
#2 /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-hook.php(308): PUM\_Utils\_Logging-\>save\_logs()  
#3 /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-hook.php(332): WP\_Hook-\>apply\_filters()  
#4 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(517): WP\_Hook-\>do\_action()  
#5 /www/kinsta/public/xxxxxxxx/wp-includes/load.php(1144): do\_action()  
#6 [internal function]: shutdown\_action\_hook()  
#7 {main}  
thrown in /www/kinsta/public/xxxxxxxx/wp-admin/includes/class-wp-filesystem-direct.php on line 66

[debug.log](https://community.kinsta.com/uploads/short-url/ydvCMymwzokizBbb5pSpZ5TVwou.log) (41.6 KB)

---

<div class="post-metadata">

**Author:** ![ZachE](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/zache/32/1683_2.png) [@ZachE](https://community.kinsta.com/u/ZachE)\
**Post date:** [July 3, 2023, 11:40pm UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/6 "2023-07-03T23:40:14Z")

</div>

Hi @Christoph 👋

It seems like `host.docker.internal` might be the wrong hostname, perhaps it should be using `localhost:9000` if your IDE is running outside of Docker waiting for XDebug connections.

I have downloaded the `popup-maker` plugin and looked through the code, and it seems like you’re missing a value or one was serialized in the database or wasn’t handled by the search/replace. The `wp_options` class prefix for popup-maker, by it’s class functions, seems to be `popmake_` so we’ll need to at least see the settings there with e.g. `wp option list | grep popmake_` and check that those are correct given you’re running it locally.

That at least, should lead us closer to why it’s looking for a nonexistant path when $this-\>file is referenced. Perhaps something regarding the path to wp-content/uploads/ or a permission/ownership issue on that folder?

Let us know please if that helps to reveal any further information!

Best regards,  
Zach

---

<div class="post-metadata">

**Author:** ![Christoph](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/christoph/32/2188_2.png) [@Christoph](https://community.kinsta.com/u/Christoph)\
**Post date:** [July 4, 2023, 9:52am UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/7 "2023-07-04T09:52:43Z")

</div>

Thanks, @ZachE. As I’m far less of an expert than you are: Can you provide me with a bit more of a step by step instruction?  
Where would I need to enter this command?

> wp option list | grep popmake\_

---

<div class="post-metadata">

**Author:** ![Christoph](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/christoph/32/2188_2.png) [@Christoph](https://community.kinsta.com/u/Christoph)\
**Post date:** [July 4, 2023, 10:13am UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/8 "2023-07-04T10:13:51Z")

</div>

Ah, found the WP-CLI and shell thing. Using it for the first time. Here are the results:

www-data@1227f39a6de1:/www/kinsta/public/xxxxxxxx$ wp option list | grep popmake\_

Xdebug: [Log Files] File ‘/var/log/fpm/xdebug.log’ could not be opened.  
Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: host.docker.internal:9000 (through xdebug.client\_host/xdebug.client\_port) ☹  
PHP Fatal error: Uncaught Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of ‘256’ frames in /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php:1013  
Stack trace:  
#0 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(1013): spl\_object\_hash()  
#1 /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-hook.php(75): \_wp\_filter\_build\_unique\_id()  
#2 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(128): WP\_Hook-\>add\_filter()  
#3 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(442): add\_filter()  
#4 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Utils/Logging.php(76): add\_action()  
#5 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Utils/Logging.php(65): PUM\_Utils\_Logging-\>\_\_construct()  
#6 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Helpers.php(134): PUM\_Utils\_Logging::instance()  
#7 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Utils/Logging.php(82): PUM\_Helpers::get\_upload\_dir()  
#8 /www/kinsta/public/xxxxxxxx/wp-conte in /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php on line 1013  
Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: host.docker.internal:9000 (through xdebug.client\_host/xdebug.client\_port) ☹  
Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.

---

<div class="post-metadata">

**Author:** ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)\
**Post date:** [July 4, 2023, 3:10pm UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/9 "2023-07-04T15:10:12Z")

</div>

Hey @Christoph , I’m wondering, does the site loads fine if you temporarily disable Xdebug? To do so, open your site in DevKinsta, click on the wrench icon at the left, and then toggle Xdebug

 ![Screenshot 2023-07-04 at 16.09.44](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/5/5a804e86a98ac15884dd77e3dc3cbd60d9c51fda.png)

Regards,  
Alessandro

---

<div class="post-metadata">

**Author:** ![Christoph](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/christoph/32/2188_2.png) [@Christoph](https://community.kinsta.com/u/Christoph)\
**Post date:** [July 4, 2023, 3:51pm UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/10 "2023-07-04T15:51:41Z")

</div>

Funny, @Alessandro! Even when I deactivate Xdebug there and even here (including restarting the page) I still get this error message

 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/a/a47e0eca70ef49f1ad6a1762a44267bfb86a17da.png)

_Fatal error: Uncaught Error: **Xdebug** has detected a possible infinite loop, and aborted your script with a stack depth of ‘256’ frames in /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php on line 1013_  
_( ! ) Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of ‘256’ frames in /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php on line 1013_

---

<div class="post-metadata">

**Author:** ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)\
**Post date:** [July 4, 2023, 3:55pm UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/11 "2023-07-04T15:55:14Z")

</div>

Try to click the “Save changes” button under the PHP .INI section after disabling xdebug

---

<div class="post-metadata">

**Author:** ![Christoph](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/christoph/32/2188_2.png) [@Christoph](https://community.kinsta.com/u/Christoph)\
**Post date:** [July 5, 2023, 8:23am UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/12 "2023-07-05T08:23:53Z")

</div>

This is what it looks like, saved, restarted. Deactivated the xdebug PHP extension entirely.  
And still the same error message:

_Fatal error: Uncaught Error: **Xdebug** has detected a possible infinite loop, …_

 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/c/ca5acd42228cde158089510ae4ee3b032a4d4ea9.png)

I’m going on an offline trip tomorrow and thought getting this started a week in advance should be good enough. But looks like the DevKinsta software isn’t keeping its promises. Frustrating.

---

<div class="post-metadata">

**Author:** ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)\
**Post date:** [July 5, 2023, 8:31am UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/13 "2023-07-05T08:31:11Z")

</div>

Based on what I see in this screenshot the Xdebug used by DevKinsta is indeed disabled. Can you please create a phpinfo.php file inside the public folder of your site and share a full page screenshot of it from the browser?  
The content of the file will need to be the following:

```auto

<?php

phpinfo();

phpinfo(INFO_MODULES);

?>

```

---

<div class="post-metadata">

**Author:** ![Christoph](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/christoph/32/2188_2.png) [@Christoph](https://community.kinsta.com/u/Christoph)\
**Post date:** [July 5, 2023, 8:46am UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/14 "2023-07-05T08:46:41Z")

</div>

Sure, will share with you in a private message.

---

<div class="post-metadata">

**Author:** ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)\
**Post date:** [July 5, 2023, 9:12am UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/15 "2023-07-05T09:12:41Z")

</div>

Thank you for sharing the screenshot Christoph, let’s try to disable the mod entirely. Open docker and use the left sidebar to move into the _Containers_ tab. Once there, click on devkinsta\_fpm and move into the Terminal tab. Write the command `phpdismod xdebug` press enter and then click on the restart button at the top right (the circled arrow icon). If you now open your phpinfo.php file in the browser once again (perhaps be sure to append ?test at the URL so that the browser won’t show you a cached version of it) you should no longer see xdebug in the list.

Regards,  
Alessandro

---

<div class="post-metadata">

**Author:** ![Christoph](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/christoph/32/2188_2.png) [@Christoph](https://community.kinsta.com/u/Christoph)\
**Post date:** [July 5, 2023, 9:38am UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/16 "2023-07-05T09:38:55Z")

</div>

Done so. Runs now without XDebug - and the page shows a whole new set of errors (still not working as it should).

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php on line 173

Notice: Function is\_home was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /www/kinsta/public/xxxxxxxx/wp-includes/functions.php on line 5865

Notice: Function is\_post\_type\_archive was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /www/kinsta/public/xxxxxxxx/wp-includes/functions.php on line 5865

Notice: Function is\_front\_page was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /www/kinsta/public/xxxxxxxx/wp-includes/functions.php on line 5865

Notice: Function is\_home was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /www/kinsta/public/xxxxxxxx/wp-includes/functions.php on line 5865

Notice: Function is\_singular was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /www/kinsta/public/xxxxxxxx/wp-includes/functions.php on line 5865

Notice: Function is\_front\_page was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /www/kinsta/public/xxxxxxxx/wp-includes/functions.php on line 5865

Notice: Function is\_home was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /www/kinsta/public/xxxxxxxx/wp-includes/functions.php on line 5865

Notice: Function is\_singular was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /www/kinsta/public/xxxxxxxx/wp-includes/functions.php on line 5865

Notice: Function is\_embed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /www/kinsta/public/xxxxxxxx/wp-includes/functions.php on line 5865

Notice: Function is\_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /www/kinsta/public/xxxxxxxx/wp-includes/functions.php on line 5865  
There has been a critical error on this website.

Learn more about troubleshooting WordPress.

Fatal error: Uncaught ValueError: Path cannot be empty in /www/kinsta/public/xxxxxxxx/wp-admin/includes/class-wp-filesystem-direct.php:66 Stack trace: #0 /www/kinsta/public/xxxxxxxx/wp-admin/includes/class-wp-filesystem-direct.php(66): fopen() #1 /www/kinsta/public/xxxxxxxx/wp-content/plugins/popup-maker/classes/Utils/Logging.php(286): WP\_Filesystem\_Direct-\>put\_contents() #2 /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-hook.php(308): PUM\_Utils\_Logging-\>save\_logs() #3 /www/kinsta/public/xxxxxxxx/wp-includes/class-wp-hook.php(332): WP\_Hook-\>apply\_filters() #4 /www/kinsta/public/xxxxxxxx/wp-includes/plugin.php(517): WP\_Hook-\>do\_action() #5 /www/kinsta/public/xxxxxxxx/wp-includes/load.php(1144): do\_action() #6 [internal function]: shutdown\_action\_hook() #7 {main} thrown in /www/kinsta/public/xxxxxxxx/wp-admin/includes/class-wp-filesystem-direct.php on line 66

---

<div class="post-metadata">

**Author:** ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)\
**Post date:** [July 5, 2023, 9:45am UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/17 "2023-07-05T09:45:40Z")

</div>

I can assist you in increasing the PHP memory limit, but I am not sure if this would solve the Fatal error caused by the popup-maker plugin. I am not sure what type of `Path` the plugin is referring to. Anyway, let’s try to increase the PHP memory limit to see if the first Fatal error goes away.  
Open your site in DevKinsta, click on the wrench icon, and add the following line to the PHP INI file, being sure to click on Save changes:

memory\_limit = 512M

---

<div class="post-metadata">

**Author:** ![Christoph](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/christoph/32/2188_2.png) [@Christoph](https://community.kinsta.com/u/Christoph)\
**Post date:** [July 5, 2023, 10:14am UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/18 "2023-07-05T10:14:28Z")

</div>

Thanks! To little surprise:

**Fatal error** : Allowed memory size of 536870912 bytes exhausted (tried to allocate 20971520 bytes) in **/www/kinsta/public/xxxxxxxx/wp-includes/class-wp-hook.php** on line **79**  
…

---

<div class="post-metadata">

**Author:** ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)\
**Post date:** [July 5, 2023, 10:30am UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/19 "2023-07-05T10:30:47Z")

</div>

So the site now requires even more than 512MB, which is a very unusual requirement for a standard site. I believe something might be off, either a plugin is causing this or something inside the database. You can give a try to change that 512M to 1024M

---

<div class="post-metadata">

**Author:** ![Christoph](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/christoph/32/2188_2.png) [@Christoph](https://community.kinsta.com/u/Christoph)\
**Post date:** [July 5, 2023, 10:45am UTC](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327/20 "2023-07-05T10:45:38Z")

</div>

😃

**Fatal error** : Allowed memory size of 1073741824 bytes exhausted (tried to allocate 41943040 bytes) in **/www/kinsta/public/xxxxxxxx/wp-includes/class-wp-hook.php** on line **79**

I don’t feel we’re getting closer to the root of the problem. From my non-expert background it looks like there is a loop somewhere that tries to access a file to which’s path it doesn’t have access. And as the same site works on the live (and on the staging) server but not in the DevKinsta local environment most probably something with the change in paths and URLs doesn’t work properly here.  
How can we debug this?

[Next page](https://community.kinsta.com/t/fatal-errors-on-local-sites-which-work-perfectly-online/2327.md?page=2)
