First of all, I hope you are aware of the big security risks
of running LilyPond on a server in this way. There are flags
to run in safe mode, check the documentation and the mailing
list archives.
Regarding your problems, the first thing I would try would be
to add the flag --verbose to get more
I'm developing a web app using LilyPond, and version 2.10.10 is behaving
differently on my production server than it does on my development
server. It seems to work fine on my development server, but on my
production server I get errors like this:
LilyPond --png C:\WebSites\HymnScores\Temp\L