w00fz / xdebug-osx

Simple bash script to toggle xdebug on/off in OSX
MIT License
274 stars 23 forks source link

Issue with restarting php-fpm #12

Open sjelfull opened 7 years ago

sjelfull commented 7 years ago

I got this error when trying disable for the first time:

$ xdebug-toggle off

Xdebug has been disabled, restarting php-fpm
/Users/fred/Library/LaunchAgents/homebrew.mxcl.php70.plist: Could not find specified service

When looking at brew services list, this is the line for php-70:

php70                      started root /Library/LaunchDaemons/homebrew.mxcl.php70.plist
w00fz commented 7 years ago

Which macOS is this?

sjelfull commented 7 years ago

It's Sierra, 10.12.3.

w00fz commented 7 years ago

I'm having trouble also restarting the plist you pointed out from the services list, via launchctl. I think I'll fallback to just use brew services manager for restarting the service, which seems to automatically tap to and install if missing.

Can you try my last commit and see if that makes it work?

glaubersp commented 7 years ago

Using brew services restart php${php_version} works for me. Thanks!

sjelfull commented 7 years ago

Same here 🎉

sgtlambda commented 7 years ago

Same problem here with PHP 7.1

xdebug-toggle on

Xdebug has been enabled, restarting php-fpm
/Users/JM/Library/LaunchAgents/homebrew.mxcl.php71.plist: Could not find specified service

You are running PHP v7.1 with Xdebug enabled

Running brew services restart php71 unfortunately didn't fix it

w00fz commented 7 years ago

@sgtlambda is the php71.plist file the only one missing in that folder? I don't have FPM in my setup but that sounds like it should be there, unless it has changed?