Closed simonjcarr closed 4 weeks ago
My guess is that there is somehow an old php process running and serving your requests. Could you please restart all Herd services via the dashboard or the system tray menu?
We have the same problem in Windows. Dumps have never worked for us (having restarted services, re-enabled in Dump Windows, etc.)
Is there any advice on what to check / how to debug?
@docmedicus-support We add a custom php.ini directive called auto_prepend_file
.
Does that exist for you? Also make sure that the dump server and internal API port are marked as "green"/available.
@mpociot We do have the following line in our php.ini:
auto_prepend_file=C:\\Program Files\\Herd\\resources\\app.asar.unpacked\\resources\\valet\\dump-loader.php
Dumps is green in Active Services, we also have a green dot in the Dumps tab.
We do have 2 PHP entries in Active Services (one seems to be debug), is that normal?
Just updated to 1.11.0, still not working
@docmedicus-support the two active services is normal, yeah.
Do you see dump
calls made via the CLI?
For example:
php artisan tinker
dump("test");
This should also show up in the Herd UI
No, no output in Dump Viewer:
Psy Shell v0.12.4 (PHP 8.3.7 — cli) by Justin Hileman
> dump('Test')
"Test" // vendor\psy\psysh\src\ExecutionLoopClosure.php(52) : eval()'d code:1
= "Test"
But this is using the correct PHP binary, right?
Just to double check:
ini_get('auto_prepend_file');
should point to the dump-loader.php file.
And what do you get when you run this in tinker:
\BeyondCode\HerdConfiguration\HerdConfiguration::load()->dumpsEnabled();
But this is using the correct PHP binary, right?
Well, I am not really sure how to check that tbh...should be though...
Just to double check:
ini_get('auto_prepend_file');
> ini_get('auto_prepend_file');
= "C:\\Program Files\\Herd\\resources\\app.asar.unpacked\\resources\\valet\\dump-loader.php"
And what do you get when you run this in tinker:
\BeyondCode\HerdConfiguration\HerdConfiguration::load()->dumpsEnabled();
This might actually be what makes this a bit tricky. This is a domain joind system, our profile is mapped to a server location via GPO. The output is:
Exception Herd configuration file not found at H:\\.config\herd\config\config.json.
H: being the mapped SMB share where my profile resides. The actual Herd config files are in:
C:\Users\{myuser}\.config\herd\config
Yeah this is what's causing issues here.
So we are building the path to check for your config.json like this:
if (array_key_exists('HOME', $_SERVER)) {
$path = $_SERVER['HOME'] . '\.config\herd\config';
} else if (array_key_exists('HOMEPATH', $_SERVER) && array_key_exists('HOMEDRIVE', $_SERVER)) {
$path = $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'] . '\.config\herd\config';
}
I don't think there's an easy way we can detect something like makked SMB shared with profiles though. Can you create a symlink so that herd can find the config file?
I tried but it wouldn't be possible without major hurdles. The home share is only available for the current user but I can only create the symlink with admin rights. The admin account cannot access the share though (and mklink cannot create links to targets that are not currently available).
Would it be possible to add a way to override the config location?
Hi @docmedicus-support – we discussed this internally and there is currently no way to make this work with your setup. We don't see a way to make that work in the mid-term (6 months) roadmap 🙈
In case that this is a dealbreaker for you and your license is less than 3 months old, can you please email us at support@beyondco.de so we can process a refund?
Hi @sschlein I would need to check but I think our license is older. We would really to prefer to keep using Herd though...to bad this seems to break functionality for us. I am a little puzzled as to why other parts of Herd seem to work normally. All the binaries, databases etc. don't seem to have any problems. What I can try is to mirror my config to the SMB share once a day or so. Would the config.json be enough? Should I mirror the whole structure (could be problematic due to the files in use). Really not ideal but I hope we can find some kind of workaround...
To follow up on this:
I copied all JSON files and the license to .config\herd\config on my share an Dumps started working immediately.
So while this is not really a solution at least we can use the Dumps now. Do you suspect any other part of the package to not work correctly in our setting?
To be honest, I wonder why it works at all 🙈
It's hard to tell if there are other features that could also break, can you try the Mail feature? The database of the Mail server should also live in the config directory.
It's awesome that it works when copying the files, the config files don't change that often on a day to day usage, the only thing that we write with every request is the last visited site – but even without that all related features should work you may only need to select a site or Mail inbox manually because Herd can't read the last (real) request localtion.
I will check and report back whether we have other problems. As I said, most features (seem to) work fine. The mysql database is in config as well, right. No problems there...
You seem to use different mechanisms to determine the location of the config directory in different parts of the package...which might not be ideal? 😏
Platform
Windows
Operating system version
Windows 11
System architecture
Intel (x86)
Herd Version
1.10.0
PHP Version
8.3.11
Bug description
I am not getting dumps in herd. I am using
Here is my composer.json
Steps to reproduce
I purchased Herd Pro I click show dumps I toggle Intercepting off and on I add both
dump
anddd
into my code. I refresh the browser Nothing is displayed in dumps Dumps status is greenHere is the controller method being run that contains a dump, but does not appear in herd.
Relevant log output
No response