Hey guys,
This is a problem due to having safe_mode enabled. What you may want to do is use a CGI script to perform the selected tasks instead of invoking it directly from PHP. Since CGI is run via suexec, security isn't really an issue but PHP is not quite as easy to deal with due to Apache 1.3 limitations.
Alternatively, a CGI version of PHP can be used but you'll likely have to create a separate directory with your "unsafe" scripts and a .htaccess control file that looks like this:
Code:
AddType application/cgi-php php
Action application/cgi-php /usr/local/bin/php
Now each .php file within this directory will be executed via CGI/suexec, safely but without the safe_mode limitations. I hope that helps at least a little.
** EDIT **
I was wrong.

It can be made to work using the above method, but .htaccess files use relative paths so the php binary has to be copied into your web space, presumably into cgi-bin as php.cgi (for clarity) and the "Action" part of the .htaccess file should read "Action application/cgi-php /cgi-bin/php.cgi" instead of what I wrote above. Sorry for the confusion!