Okay, I've got a site on a hosted server, meaning that many of us share the same server. As such, the server runs as user_id "nobody" and group id "nobody". The site account runs as user_id "myIDhere" , group_id "customer".
Most of the site is PHP using mod_php 4.0 and includes sessions and various other features only found using the mod_php. The problem is a couple of the function create directories and symlinks.
Since they are created by the mod_php, the show up as user_id "nobody" group_id "nobody", and thus create permission problems. The hosting providers suggested that I break those functions out into a seperate PHP script (or Perl script) that is then called with a CGI extension and compiled using the installed binary instead of mod_php. That way, the directories, files, symlinks, etc created by the called script will have the correct user_id and group_id. ('myIDhere:customer).
How do I do this? More imporantly how does the calling mod_php script know that the called CGI script executed correctly so I can build in error handling in case one or the other script "times out"?