You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+49-16Lines changed: 49 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,20 @@
1
1
# PHP Monitor
2
2
3
-
PHP Monitor (or phpmon) is a macOS utility that runs on your Mac and displays the active PHP version in your status bar.
3
+
PHP Monitor (or phpmon) is a macOS utility that runs on your Mac and displays the active PHP version in your status bar. It also gives you quick access to various useful functionality (like switching PHP versions, restarting services, accessing configuration files, and more).
For me, it comes in handy when running multiple versions of PHP with Homebrew and you wish to be able to see at a glance which version is currently linked & active with Laravel Valet, and switch between versions.
8
8
9
9
## System requirements
10
10
11
-
**Minimal system requirements**
12
-
13
-
* macOS 10.14 or higher
14
-
* PHP 7.4 installed via Homebrew
15
-
* Laravel Valet 2.3 or higher installed
16
-
17
-
**Recommended system**
18
-
19
11
* macOS 10.15 Catalina
20
-
* PHP 7.4 installed with Homebrew 2.2
12
+
* PHP 7.4 installed with Homebrew 2.x
21
13
- other versions of PHP are optional
22
14
- includes support for PHP 5.6 and PHP 7.0 [as well](https://github.com/eXolnet/homebrew-deprecated)
23
-
* Laravel Valet 2.5.x installed
15
+
* Laravel Valet 2.8
16
+
17
+
If you're looking to run PHP Monitor in combination with an older version of macOS or Laravel Valet, please check out the older releases of the software.
24
18
25
19
## Why I built this
26
20
@@ -48,8 +42,9 @@ The utility runs the following commands:
48
42
49
43
- Unlink all detected PHP versions
50
44
- Switch to PHP 7.4 (this is done in order to ensure that Valet works, even when attempting to use PHP 5.6)
51
-
-Tell Valet to switch to a specific PHP version
45
+
-Stop all php-fpm service instances
52
46
- Link the desired version of PHP
47
+
- Start the correct php-fpm service for the desired PHP version
53
48
54
49
### Want to know more?
55
50
@@ -59,6 +54,8 @@ This app isn't very complicated after all. In the end, this just (conveniently)
59
54
60
55
## Troubleshooting
61
56
57
+
---
58
+
62
59
### Reasons for alerts at startup
63
60
64
61
PHP Monitor performs some integrity checks to ensure a good experience when using the app. You'll get a message telling you that PHP Monitor won't work correctly in the following scenarios:
@@ -71,12 +68,48 @@ PHP Monitor performs some integrity checks to ensure a good experience when usin
71
68
72
69
Follow instructions as specified in the alert in order to resolve any issues.
73
70
74
-
### Still seeing another PHP version (from before switching versions)?
71
+
---
72
+
73
+
### Laravel Valet is using a different version of PHP than what is active in PHP Monitor and in my terminal!
74
+
75
+
If you're still seeing another version of PHP in your scripts β e.g. when running `phpinfo()` β I recommend you shut down all PHP services that are currently active. You can find out what services are active by running:
76
+
77
+
sudo brew services list | grep php
78
+
79
+
This will present to you a list of services, like so (depending on the installed versions of PHP):
75
80
76
-
If you're still seeing an old version of PHP in your scripts β e.g. when running `phpinfo()` β I recommend you shut down the PHP service by running:
81
+
```
82
+
php started root /Library/LaunchDaemons/homebrew.mxcl.php.plist
Then, in PHP Monitor, select "Restart php-fpm service", which should start the service. Alternatively, you can run `sudo brew services start php@{x}` where `{x}` is your preferred version of PHP (for the latest version of PHP, you can omit `@{x}`).
79
112
80
-
Please note that PHP Monitor will not be able to stop this service (it doesn't run as an administrator), so you'll need to handle this yourself.
113
+
---
81
114
82
-
You should only have to do this **once**, and then PHP Monitor should work as usual.
115
+
If this software has been useful to you, star the repository so I know that the software is being used. I did not include any tracking or analytics software, so if you encounter issues, let me know via an issue.
0 commit comments