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 #186000 is a reply to message #185999] Wed, 28 May 2014 12:32 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
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.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
[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: Tue Dec 03 19:29:24 GMT 2024

Total time taken to generate the page: 0.06836 seconds