turn them all off...
As far as I know, the magic_quotes_sybase is only relevant if you're using they sybase DB platform. Using magic_quotes at runtime or gpc (Get, Post, Cookies) is a bad ideas is it can mess with the input.
General rule:
Code to a more general standard, and see if magic_quotes_gpc is on, if so, stripslashes, else, dont' worry about it.
To make it secure, I'd say magic_quotes is better off, but safe-mode has it's good and bad points. What makes PHP insecure is code, not the core program itself.
Code to a strict security standard, and you should be fine.