I'm basically making a webpage that can play spotify music on my computer using a Mac spotify api. You access it by typing spotify <command>
on command line, and I got it to work perfectly in my PHP script using the exec()
command, and this was working for a week or so.
Today, after a computer reboot, it isn't working. I've tried everything. When I execute the php script via command line, it works perfectly, but when I access the same exact file via the web, it doesn't work.
The odd thing is: when I try to get the output, it outputs exactly as if it was working (example: spotify play
doesn't play music but it gives the correct output of Playing music
, etc). I read on another StackOverflow that if you add 2>&1
to the end of the command, it gives the full output -- and this is where I found what is wrong. It gives the error 30:95: execution error: An error of type -10810 has occurred. (-10810)
. I have no idea what this is and Googling it yields no helpful results.
Any ideas? Thanks.