I get an error message “Could not write to counter file: x/y/sample.dat”. Whats the problem?
That means the user running the web server can not write to the datafile. The correct way to make it work is to change the owner of the datafile to the user running the web server and give read/write permission to that user only. You can only do that if you’re the super user. If you are not the super user, you have to give read/write permission to world. In Unix, “chmod 666 file” will do that. But this will allow anyone to edit or delete your datafile.