execute c compiler from Php page

Problems with the Windows version of XAMPP, questions, comments, and anything related.

execute c compiler from Php page

Postby pascal2020 » 13. January 2020 20:51

Hi everyone,
I'm doing a website to collect C scripts. Pages allow to upload users' pages and get compiler feedback. I would know how to install C compiler not as standalone application but rather directly into web server.
Thank you
pascal2020
 
Posts: 3
Joined: 13. January 2020 20:41
XAMPP version: 3.2.2
Operating System: Windows 7 and 10

Re: execute c compiler from Php page

Postby Nobbie » 13. January 2020 22:03

pascal2020 wrote:I would know how to install C compiler not as standalone application but rather directly into web server.


I have no idea what you mean by that. What is "not a standalone app" and what is meant by "directly into web server". Anyway, there is NO WAY to configure Apache to compile C programs. Apache is not a Compiler. C programs need a C compiler, which of course is a "standalone"(?) application.

On the other hand, there is no problem to invoke a C compiler from Apache and/or from PHP scripts. Therefore i struggle to understand, what you are meaning.
Nobbie
 
Posts: 11315
Joined: 09. March 2008 13:04

Re: execute c compiler from Php page

Postby nemesis » 13. January 2020 22:46

https://www.google.com/search?q=c+compiler+for+the+web
https://repl.it/languages/c seems to do what you want. It is up to you, to finde someone that maybe released such a software as opensource.
It should also be running in a good sandbox.
I only know it for typesetting of TeX-Documents as https://katex.org/.
Ubuntu 18.04 | SMP P3 1.4 GHz | 6 GByte RegECC | 74 GByte Seagate 15k5 system | 3Ware 9550SXU-4LP with 4x 500 GByte Seagate ES2 Raid 10 data | StoreCase DE400 | PX-230A | Intel Pro/1000MT Dual PCI-X
User avatar
nemesis
AF Moderator
 
Posts: 1040
Joined: 29. December 2002 13:14
Location: Ingolstadt
XAMPP version: depends
Operating System: Linux, BSD, Win, iOS, Android

Re: execute c compiler from Php page

Postby pascal2020 » 14. January 2020 09:18

Thank you Nobbie,
At the moment my site works properly. I installed on my pc Xampp, to manage my pages, and MinGW to allow executing GCC. My database collect any user C script file and compiler feedback. Well, I would try to do the same things without calling GCC, for example I would like know If exists a C compiler plugin for Xampp. I hope to have explained myself well. Have a nice day
pascal2020
 
Posts: 3
Joined: 13. January 2020 20:41
XAMPP version: 3.2.2
Operating System: Windows 7 and 10

Re: execute c compiler from Php page

Postby pascal2020 » 14. January 2020 09:35

Thank you Nemesis for the good advice. I'll see it in the afternoon
pascal2020
 
Posts: 3
Joined: 13. January 2020 20:41
XAMPP version: 3.2.2
Operating System: Windows 7 and 10

Re: execute c compiler from Php page

Postby Nobbie » 14. January 2020 13:09

pascal2020 wrote:I would like know If exists a C compiler plugin for Xampp.


What is a "plugin for Xampp"? Xampp is not a software, its only a name for a distribution. And there are no "plugins" anyway. There are extensions for PHP and modules for Apache and engines for MySQL, but there is no such a huge thing like a C compiler? That request is still a little bit weird.

Of course you can implement a CGI script which is invoked to run on C-source and which triggers the C-Compiler, but that is a question of Apache configuration and/or creating some basic CGI scripts. Still, the C-Compiler itself will be gcc or similar, there is no builtin C-Compiler in Apache or so.
Nobbie
 
Posts: 11315
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 35 guests