$_GET is empty when the url has variables

When I run into something that stumps me like this, I always take my script right down to basics. Try this at the very top of your script:

var_dump($_GET);
exit;

Then you can see if in fact it is getting the vars from the hook. If not, then there may be something deeper... like is PHP really running with Apache? If it works, start adding in other things until it stops again and you can start narrowing down the culprit.


Moving this into an answer from my comments above. Two reasons your GET params might be missing. Either you have mode rewrite set up that removes them or you are using a framework, such as CodeIgniter that moves them elsewhere.

In case you are using CodeIgniter you can re-enable them with parse_str($_SERVER['QUERY_STRING'], $_GET);