FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Add compiler to Page
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Add compiler to Page [message #186001 is a reply to message #186000] Wed, 28 May 2014 13:28 Go to previous messageGo to previous message
Robert Heller is currently offline  Robert Heller
Messages: 60
Registered: December 2010
Karma:
Member
At Wed, 28 May 2014 08:32:36 -0400 Jerry Stuckle <jstucklex(at)attglobal(dot)net> wrote:

>
> On 5/28/2014 8:10 AM, Denis McMahon wrote:
>> On Wed, 28 May 2014 07:38:32 -0400, bill wrote:
>>
>>> On 5/28/2014 7:06 AM, jalaf28(at)gmail(dot)com wrote:
>>
>>>> Hello All I want to add gcc comnpiler online to page how can i do it .
>>>> i dont know please help me.
>>
>>> Perhaps others can discern your intent, but I can't.
>>> Please explain what you are trying to do with an overview and then more
>>> detail of what you have tried.
>>
>> My first guess was that OP wishes to upload a c or c++ source file to a
>> web server and then receive an executable back .... but that seems such a
>> daft thing to try and do that I assumed I must be wrong.
>>
>> Reasons it's daft:
>>
>> Libraries - how do you know the compiler is linking the right ones.
>> Bits - or the right number of bits.
>> OS - or even for the right OS.
>>
>> And - do I really want someone elses arbitrary code sitting in a compiled
>> executable on my server? Why yes, of course I do, I can't
>> see any way in which that could possibly go wrong or introduce any
>> security vulnerabilities at all.[/mode]
>>
>
> Denis,
>
> That was my thought, but you beat me to it :)
>
> I thought about doing this a number of years ago for online training,
> but decided against it. It *could* be possible to safely compile an
> executable on the server using a chroot jail. However, that setup would
> be very prone to errors, opening the system up wide to hacking. I
> wouldn't trust many Linux admins (including myself) to do it properly.
>
> I just installed an SSH server and gave each student their own id (and
> home directory). It was much cleaner.
>
> However, if the OP insists on exposing his system (he won't get this to
> work on a shared host for the reasons you mentioned), passthru() would
> be able to call the compiler.
>
> But please let us know the URL so we can stay away from that site.

Way back in the dim dark past, there used to be something called 'crobots'.
This was a *simple* self-contained C compiler system, with a very limited
library that compiled to a VM byte-code (ala Java). The only sorts of programs
that were possible were programs to automate a 'virtual' robot tank that could
sense and shoot at another 'virtual' robot tank. Typically you would 'load'
two of these 'programs' and the two robot tanks would shoot at each other until
one was destroyed. I had this installed on my FidoNet BBS and BBS users could
upload little C programs that could be loaded into this program. The library
that the crobots supplied was very similar to the sorts of libraries supplied
with the Ardunio IDE -- I guess building Ardunio-based tank robots equiped
with sensors and (Nerf warhead!) cannons would be one way to resurect crobots
with 'modern' hardware...

>

--
Robert Heller -- 978-544-6933 / heller(at)deepsoft(dot)com
Deepwoods Software -- http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: mysqli bind_param reports error with COLLATE
Next Topic: PHP SoapClient?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 21 22:09:04 GMT 2024

Total time taken to generate the page: 0.04942 seconds