It always helps to post the whole code, so we know what you're talking about.
The great thing about php's safe mode that it's not safer than the normal mode and that it applies very many limitations into a programmer.
I'm assuming you are using the imagettftext() function. The [url=http://php.net/manual/en/function.imagettftext.php]php manual page[/url] is the one that has the code you are using. I've tested it, and the putenv is not needed. The text at the manual implies that it's only required for some old GD versions. You should be fine with leaving it out.