Question

I am brand new to C++. I am creating AJAX files in the cgi-bin for maximum speed vs PHP.

My host is no help, I can find no docs on this, and searches return nothing (probably because of my limited vocabulary on the subject).

I want to upload cpp files to my WHM/cPanel VPS to compile for the cgi-bin. I have no idea what directory to put these for compiling or how exactly to do it.

How do I upload cpp files to a WHM/cPanel VPS, compile them, and move them to the cgi-bin?

Many thanks in advance!

Was it helpful?

Solution

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).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top