-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when switch to PHP 8.2 #162
Comments
Please locate and attach the crash log, and I can take a look. Without more information, I cannot help you. You can find out how to do so in the README. |
Nothing to show, and I can not found crash log. |
Hmm... Are there any crash reports in /Applications/Utilities/Console.app? (Under Reports > Crash Reports). Without a crash log, I currently cannot determine what is going wrong, sadly :( The other thing you can try is launching PHP Monitor via the terminal and reporting the output. You can launch the app via the terminal this way:
That should show you some output, like this:
You can use the app like normal, and try switching then. Do you get any errors or crashes as reported in the terminal? In case none of that helps, I do have the following generic advice: Have you tried the First Aid options in the app? If you're having issues, I can also recommend reinstalling the Homebrew dependencies, i.e.:
At the very least, the interactive log from the app if launching through the terminal should be of some use if the app does indeed crash, and you might find the crash logs in Console.app instead. Good luck, and please report back if you find more info that could help me here! |
Run Output when using php 8.0: ==================================
PHP MONITOR by Nico Verbruggen
Version 5.2.1 (757)
==================================
[ARCH] The user is running PHP Monitor with the architecture: arm64
[OK] `/opt/homebrew/bin/brew` exists
[OK] `/opt/homebrew/bin/php` exists
[OK] `ls /opt/homebrew/opt | grep php` returned php result
[OK] `valet` binary exists
[OK] `/private/etc/sudoers.d/brew` contains brew
[OK] `/private/etc/sudoers.d/valet` contains valet
[OK] `sudo /opt/homebrew/bin/brew services info` JSON loaded
[OK] `config.json` was valid
[OK] `valet --version` was loaded
==================================
PHP Monitor has determined the application has successfully passed all checks.
When on your system, the `php` formula means version 8.1!
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pm70” in the folder “bin”." UserInfo={NSFilePath=/usr/local/bin/pm70, NSUserStringVariant=Folder, NSUnderlyingError=0x600000f31c80 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
[E] Could not write PHP Monitor helper for PHP 7.0 to /usr/local/bin/pm70
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pm71” in the folder “bin”." UserInfo={NSFilePath=/usr/local/bin/pm71, NSUserStringVariant=Folder, NSUnderlyingError=0x600000f37270 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
[E] Could not write PHP Monitor helper for PHP 7.1 to /usr/local/bin/pm71
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pm72” in the folder “bin”." UserInfo={NSFilePath=/usr/local/bin/pm72, NSUserStringVariant=Folder, NSUnderlyingError=0x600000f374b0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
[E] Could not write PHP Monitor helper for PHP 7.2 to /usr/local/bin/pm72
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pm73” in the folder “bin”." UserInfo={NSFilePath=/usr/local/bin/pm73, NSUserStringVariant=Folder, NSUnderlyingError=0x600000f376c0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
[E] Could not write PHP Monitor helper for PHP 7.3 to /usr/local/bin/pm73
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pm74” in the folder “bin”." UserInfo={NSFilePath=/usr/local/bin/pm74, NSUserStringVariant=Folder, NSUnderlyingError=0x600000f378d0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
[E] Could not write PHP Monitor helper for PHP 7.4 to /usr/local/bin/pm74
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pm80” in the folder “bin”." UserInfo={NSFilePath=/usr/local/bin/pm80, NSUserStringVariant=Folder, NSUnderlyingError=0x600000f37ae0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
[E] Could not write PHP Monitor helper for PHP 8.0 to /usr/local/bin/pm80
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pm81” in the folder “bin”." UserInfo={NSFilePath=/usr/local/bin/pm81, NSUserStringVariant=Folder, NSUnderlyingError=0x600000f37cf0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
[E] Could not write PHP Monitor helper for PHP 8.1 to /usr/local/bin/pm81
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pm82” in the folder “bin”." UserInfo={NSFilePath=/usr/local/bin/pm82, NSUserStringVariant=Folder, NSUnderlyingError=0x600000f37e70 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
[E] Could not write PHP Monitor helper for PHP 8.2 to /usr/local/bin/pm82
The PHP versions that were detected are: ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]
The user DOES have the following tapped: shivammathur/php
Checking for `php` formula conflicts...
All seems to be OK. No conflicts, both are PHP 8.1.
Determining broken PHP-FPM...
Setting up watchers...
Detecting applications...
There was no .phpmon.conf.json file to be loaded.
No watcher currently active...
Detected applications: ["Visual Studio Code", "iTerm"]
No global hotkey was saved in preferences. None set.
PHP Monitor has extracted the version number of Valet: 3.1.3
This version of Valet supports isolation.
Valet version 3.1.3 is recent enough, OK (recommended: 2.16.2)
Fewer than or 50 sites found, preloading list of sites...
PHP Monitor is ready to serve! Output when using php8.2: ==================================
PHP MONITOR by Nico Verbruggen
Version 5.2.1 (757)
==================================
[ARCH] The user is running PHP Monitor with the architecture: arm64
[OK] `/opt/homebrew/bin/brew` exists
[OK] `/opt/homebrew/bin/php` exists
[OK] `ls /opt/homebrew/opt | grep php` returned php result
[OK] `valet` binary exists
[OK] `/private/etc/sudoers.d/brew` contains brew
[OK] `/private/etc/sudoers.d/valet` contains valet
[OK] `sudo /opt/homebrew/bin/brew services info` JSON loaded
[OK] `config.json` was valid
[OK] `valet --version` was loaded
==================================
PHP Monitor has determined the application has successfully passed all checks.
When on your system, the `php` formula means version 8.1!
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pm70” in the folder “bin”." UserInfo={NSFilePath=/usr/local/bin/pm70, NSUserStringVariant=Folder, NSUnderlyingError=0x60000096de00 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
[E] Could not write PHP Monitor helper for PHP 7.0 to /usr/local/bin/pm70
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pm71” in the folder “bin”." UserInfo={NSFilePath=/usr/local/bin/pm71, NSUserStringVariant=Folder, NSUnderlyingError=0x60000093bf00 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
[E] Could not write PHP Monitor helper for PHP 7.1 to /usr/local/bin/pm71
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pm72” in the folder “bin”." UserInfo={NSFilePath=/usr/local/bin/pm72, NSUserStringVariant=Folder, NSUnderlyingError=0x600000934150 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
[E] Could not write PHP Monitor helper for PHP 7.2 to /usr/local/bin/pm72
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pm73” in the folder “bin”." UserInfo={NSFilePath=/usr/local/bin/pm73, NSUserStringVariant=Folder, NSUnderlyingError=0x6000009343c0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
[E] Could not write PHP Monitor helper for PHP 7.3 to /usr/local/bin/pm73
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pm74” in the folder “bin”." UserInfo={NSFilePath=/usr/local/bin/pm74, NSUserStringVariant=Folder, NSUnderlyingError=0x6000009345d0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
[E] Could not write PHP Monitor helper for PHP 7.4 to /usr/local/bin/pm74
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pm80” in the folder “bin”." UserInfo={NSFilePath=/usr/local/bin/pm80, NSUserStringVariant=Folder, NSUnderlyingError=0x6000009347e0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
[E] Could not write PHP Monitor helper for PHP 8.0 to /usr/local/bin/pm80
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pm81” in the folder “bin”." UserInfo={NSFilePath=/usr/local/bin/pm81, NSUserStringVariant=Folder, NSUnderlyingError=0x6000009349f0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
[E] Could not write PHP Monitor helper for PHP 8.1 to /usr/local/bin/pm81
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pm82” in the folder “bin”." UserInfo={NSFilePath=/usr/local/bin/pm82, NSUserStringVariant=Folder, NSUnderlyingError=0x600000934c00 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
[E] Could not write PHP Monitor helper for PHP 8.2 to /usr/local/bin/pm82
The PHP versions that were detected are: ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]
The user DOES have the following tapped: shivammathur/php
Checking for `php` formula conflicts...
All seems to be OK. No conflicts, both are PHP 8.1.
Determining broken PHP-FPM...
Setting up watchers...
Detecting applications...
There was no .phpmon.conf.json file to be loaded.
Detected applications: ["Visual Studio Code", "iTerm"]
No global hotkey was saved in preferences. None set.
PHP Monitor has extracted the version number of Valet: 3.1.3
This version of Valet supports isolation.
Valet version 3.1.3 is recent enough, OK (recommended: 2.16.2)
Fewer than or 50 sites found, preloading list of sites...
[1] 97004 trace trap '/Applications/PHP Monitor.app/Contents/MacOS/PHP Monitor'
Saving session...completed. |
Homebrew installed on |
So, I noticed this line:
The app did indeed crash. So there should be a crash log somewhere! Can you tell me the output of:
|
~ » cd ~/Library/Logs/DiagnosticReports && ls -la 1 ↵ hdj@huangdijiadeMacBook-Air
total 304
drwxrwx--- 20 root _analyticsusers 640 4 20 12:02 .
drwxr-xr-x@ 40 hdj staff 1280 4 15 09:11 ..
-rw-------@ 1 hdj _analyticsusers 9807 4 14 08:15 Moom-2022-04-14-081520.ips
-rw-------@ 1 hdj _analyticsusers 18744 4 18 07:36 PHP Monitor-2022-04-18-073602.ips
-rw-------@ 1 hdj _analyticsusers 20788 4 20 07:13 PHP Monitor-2022-04-20-071350.ips
-rw-------@ 1 hdj _analyticsusers 27362 4 20 07:15 PHP Monitor-2022-04-20-071513.ips
drwxrwx--- 2 root _analyticsusers 64 4 11 20:27 Retired
-rw-------@ 1 hdj _analyticsusers 17496 4 14 08:15 RunCatLauncher-2022-04-14-081519.ips
-rw-------@ 1 hdj _analyticsusers 321 4 19 10:59 SiriSearchFeedback-2022-04-19-105923.diag
-rw-------@ 1 hdj _analyticsusers 323 4 19 10:59 SiriSearchFeedback-2022-04-19-105924.diag
-rw-------@ 1 hdj _analyticsusers 321 4 19 11:30 SiriSearchFeedback-2022-04-19-113027.diag
-rw-------@ 1 hdj _analyticsusers 321 4 19 15:20 SiriSearchFeedback-2022-04-19-152042.diag
-rw-------@ 1 hdj _analyticsusers 321 4 19 19:11 SiriSearchFeedback-2022-04-19-191138.diag
-rw-------@ 1 hdj _analyticsusers 321 4 19 19:41 SiriSearchFeedback-2022-04-19-194140.diag
-rw-------@ 1 hdj _analyticsusers 321 4 19 23:31 SiriSearchFeedback-2022-04-19-233156.diag
-rw-------@ 1 hdj _analyticsusers 321 4 20 03:22 SiriSearchFeedback-2022-04-20-032212.diag
-rw-------@ 1 hdj _analyticsusers 321 4 20 03:52 SiriSearchFeedback-2022-04-20-035213.diag
-rw-------@ 1 hdj _analyticsusers 321 4 20 07:42 SiriSearchFeedback-2022-04-20-074229.diag
-rw-------@ 1 hdj _analyticsusers 321 4 20 11:32 SiriSearchFeedback-2022-04-20-113242.diag
-rw-------@ 1 hdj _analyticsusers 321 4 20 12:02 SiriSearchFeedback-2022-04-20-120244.diag |
Aha, so there you go! There are some crash logs here. Can you run |
Thanks! I can reproduce the issue now, and I will attempt to have this fixed when I'm done with work :) |
Thanks! |
- Renaming the configuration files from `www.conf` to the backup (`disabled-by-phpmon`) will now succeed if the `disabled-by-phpmon` file already exists. This would fail if the `disabled-by-phpmon` file already existed in previous builds. - The PHP-FPM alert when there's an issue with a missing socket configuration file has been tweaked and now contains a workaround if you want to run a newer version of PHP (e.g. PHP 8.2) that is not officially supported by Valet yet. - When attempting to list the PHP version numbers, the `parse()` method is now used, as opposed to `PhpVersionNumber.make()`, which couldn't correctly handle pre-release versions of PHP. - Updated tests to reflect these changes to `PhpVersionNumber`.
Okay, so I was able to fix the crash, but sadly Valet does not officially support PHP 8.2 yet. No worries, there is a workaround: you can fix this by going to Thanks for bringing this to my attention. You can try a build with this fix here. Let me know if this build in combination with the workaround fixes your issue. If it all works correctly, I will release that build as the new bugfix release (v5.2.2) later this week. |
Looks like it doesn't crash anymore? :) Does the workaround I describe in the alert work for you? (Adding |
This is a known issue with Valet. Here's the workaround:
Run that first, and |
@huangdijia Did that fix the issue? If so, let me know so I can confirm this is OK :D |
Not yet |
@huangdijia What issue are you still seeing then? The app doesn't crash anymore, right? If you're having issues with Unless the app still crashes or something is obviously broken, I would prefer to close the issue. |
Crash when switch to PHP 8.2
The text was updated successfully, but these errors were encountered: