I know C++ very, very well, but I havn't done anything major with PHP for years.
Not to mention things like creating a zip file based on input are a hell of a lot easier in C++ from what I've seen.
Also, this will allow me to sync. up stuff with a blockland server if I host one later on.
That, and the server will also need to be a server on another port for the cross server chat I hope to implement.
You should generally have the chat server in another process for performance reasons.
Also, you could still make the server-sided stuff in C++ by writing it as a module (or by using FastCGI) for the web server of your choice.
This gives you the cache, compression, etc of the web server but you could still make the rest in the language of your choice (C++).
Oh, and you *COULD* use regular CGI, but that is crap. Period.
Also, it's not a good idea to mix the webserver and the scripts in the same codebase, since if you make one runtime error in a page, the whole webserver application will probably go down, requiring a manual restart. Yes, I know you *COULD* work around that, but getting decent error handling, etc is probably gonna take more work than integrating it into the ecosystem of an existing web server.
Or, better yet, learn Django.