My PHP script for updating some static HTML pages no longer works on a
commercial host that changed their setup so PHP can't write files to the
public_html directory. The host's tech support says that a PHP script
executed as a CGI can still write to public_html.

The site has PHP 4.3.2 on Apache 1.3.28, with passthru, shell_exec, and
system disabled. I'm not sure how to approach converting my script to work
as a CGI -- if I need to execute the update from a content management system
link, do I use exec()? Does exec() take a Unix command? If so, would that
command just reference my PHP script headed with "#!/usr/bin/php -q"? And
how do I return something to tell me if execution was successful?

I'm searching through the manual, but links to good examples (or outright
explanations) would be greatly appreciated.

--
Lowell Allen