What's sometimes helpful to debug this type of problem is to monitor the server logs as you use the script. So if its a Unix box and Apache do a
tail -f /usr/local/apache/logs/access.log
or similiar. If its a busy production server, (maybe you should'nt be using it for devel work), you can always grep for your script.
On NT, if God-help-us, you are using IIS, then logfiles default to
\Winnt\system32\LogFiles\W3SVC3\