I couldn't get JSON to work since I really don't know how to send a JSON message via php.
However, I did find a (not so pretty) solution! Instead of directly executing the effect script, I placed it in a shell script that I uploaded to the remote Pi.
The php file now executes the shell script using:
And this works! It seems that Hyperion won't start the effect if the command comes from a remote machine - even though it outputs that the effect has started. One disadvantage though: there's a huge delay (multiple seconds) between calling the php script and the effect execution. So if there's a way to pass the command directly to the remote machine using JSON, that would still be an improvement.
In case anyone's interested: using the mobile app Tasker, Hyperion will now show the Knight Rider effect when somebody calls me on my mobile phone Now that I have Tasker and Hyperion working together, imagine the possibilities! Effects for receiving email, change of colour according to my phone's battery life, etc etc.