While I am not familiar with osnuke, what you are describing looks very much like the software is using an environment variable that returns the wrong (or, at least, an “unexpected”) path when using PHP-CGI.
I’ve run across this before, and the fix is generally pretty simple: just find the code that is generating the path, and replace the environment variable they are using with a different environment variable that returns the appropriate path in the PHP-CGI environment.
Depending upon how the application is programmed, it may just be a single substitution in a “config” file or a single change in a single script,k or it may be scattered through out the code .
As a “quick check” to confirm that this is, in fact, the problem, you could always “temporarily” set your environment to run PHP as mod_php (see this information - be sure to read through the comments!), and see if that problem is resolved. This presumes the application can run under PHP4, which is what is available for mod_php. If running mod_php eliminates the problem, you can bet that what I suspect is actually the issue.