I've set the IPN URL in PayPal to http://[my domain name here]/enrol/paypal/ipn.php
I have been able to access this URL from a browser and get the "Sorry, you can't use this script that way" message.
But when I actually use PayPal to attempt to enroll in the course, I get the following output in apache's access log:
66.211.170.66 - - [23/Nov/2011:15:54:34 +0000] "POST /enrol/paypal/ipn.php HTTP/1.0" 404 32648 "-" "-"
66.211.170.66 - - [23/Nov/2011:15:54:47 +0000] "POST /enrol/paypal/ipn.php HTTP/1.0" 404 32648 "-" "-"
66.211.170.66 - - [23/Nov/2011:15:55:10 +0000] "POST /enrol/paypal/ipn.php HTTP/1.0" 404 32648 "-" "-"
66.211.170.66 - - [23/Nov/2011:15:55:52 +0000] "POST /enrol/paypal/ipn.php HTTP/1.0" 404 32648 "-" "-"
66.211.170.66 - - [23/Nov/2011:15:57:15 +0000] "POST /enrol/paypal/ipn.php HTTP/1.0" 404 32648 "-" "-"
66.211.170.66 - - [23/Nov/2011:15:59:58 +0000] "POST /enrol/paypal/ipn.php HTTP/1.0" 404 32648 "-" "-"
I have the encoding in PayPal set to UTF-8.
Any ideas?