britait Posted April 20, 2020 Posted April 20, 2020 (edited) Hello, I just register in this host service, I like it I trying to run a small cgi script (just a "hello world" written and compiled in c) uploaded to cgi-bin folder via FTP, I try to run it using direct url (http://user.helionet/cgi-bin/code.cgi) but not runs. I make a unix permissions 755 to folder and file, but server send me a 500 internal error anyway Server does support cgi files written in c? I create the account precisely for it, I want a small personal page with running old scripts written in c/cgi My server is johnny Thanks anyway Edited April 20, 2020 by britait
wolstech Posted April 20, 2020 Posted April 20, 2020 What language is the script in? Also, make sure your files use Unix line endings. If they have windows line endings, they won't work. You can use something like notepad++ to convert them if needed.
wolstech Posted April 20, 2020 Posted April 20, 2020 Totally missed that. I don't believe we support old C scripts, but could be wrong. Most users are running Python scripts these days. I'll have Krydos answer this one since I'm not sure.
britait Posted April 20, 2020 Author Posted April 20, 2020 It would be nice to know it, to install a VM and compile the sources in unix mode or not, thanks
Krydos Posted April 21, 2020 Posted April 21, 2020 My guess is you're not compiling the C code on the server. Check out https://wiki.helionet.org/C%2B%2B/C_as_CGI
britait Posted April 22, 2020 Author Posted April 22, 2020 (edited) no, I compile over a copy in my localhost, upload later to server I readed the link, sounds some odd to use cgi scripts, but at least is a doc document, I understand is a server code security issue. I'll try thanks for the help PD: I want save the input in a file located in server by php code before call cgi, then read it in code and paste output mods in the same file or maybe another, is legal in server create new binary files in runtime mode? or at least modify already created ascii files? Edited April 22, 2020 by britait
Recommended Posts