You should put your compiled binaries (your C++ code must implement the CGI interface) in whichever folder your web server treats as active (i.e. CGI). If there is a folder where PHP files are run using the CGI interface, then putting the C++ binaries in the same folder should work (unless the server is set up with special filters to block running binaries for security purposes).
And yes. This isn't a very common problem. Though when I did it, it was very straight forward (I just dropped the binaries in and off it went).