What OS are we talking about? If it's Windows I don't think you should have the quotes (") around the parameters.
What is "PATH_TO_FILE"? And environment variable? What is it's value? Have you checked that it doesn't include a final backslash? Have you restarted after changing the environment variable. Is it a system wide or user level environment variable. Remember that if you are running the SVN server as a service it's under a different user so the env var might not be defined for that user. Why don't you just put the full path in directly for now just to test it's nothing to do with an incorrect environment variable.
You say "it gets stuck" do you get an error? What happens exactly? Some more details of how it fails might help.
If this is Windows you are using, you can redirect any errors to a file by doing this:
PATH_TO_FILE\print.exe %1 %2 > c:\output.txt
Is this a plain SVN server or are you using visualSVN Server?