The perforce client inherits a lot of stuff (such as the username) from the shell's environment. When you run something in apache, you probably need to set those environment variables first. You can do that by just: