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
Switch to threaded view of this topic Create a new topic Submit Reply
Add compiler to Page [message #185997] Wed, 28 May 2014 11:06 Go to next message
jalaf28 is currently offline  jalaf28
Messages: 8
Registered: November 2013
Karma: 0
Junior Member
Hello All
I want to add gcc comnpiler online to page
how can i do it .
i dont know please help me.
Re: Add compiler to Page [message #185998 is a reply to message #185997] Wed, 28 May 2014 11:38 Go to previous messageGo to next message
bill is currently offline  bill
Messages: 310
Registered: October 2010
Karma: 0
Senior Member
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.

-bill
Re: Add compiler to Page [message #185999 is a reply to message #185998] Wed, 28 May 2014 12:10 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
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 McMahon, denismfmcmahon(at)gmail(dot)com
Re: Add compiler to Page [message #186000 is a reply to message #185999] Wed, 28 May 2014 12:32 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
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
==================
Re: Add compiler to Page [message #186001 is a reply to message #186000] Wed, 28 May 2014 13:28 Go to previous messageGo to next message
Robert Heller is currently offline  Robert Heller
Messages: 60
Registered: December 2010
Karma: 0
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
Re: Add compiler to Page [message #186002 is a reply to message #186001] Wed, 28 May 2014 13:58 Go to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 5/28/2014 9:28 AM, Robert Heller wrote:
> 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,

Ah yes, I remember crobots. It was a fun game. Unfortunately, I never
was very good at it :)

But why take all the fun out of it (Nerf warhead)? Why not make it
interesting. A nuclear warhead would be very enjoyable. It doesn't
have to be that big - 10K ton would do just fine :)

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Sun Dec 01 01:14:56 GMT 2024

Total time taken to generate the page: 0.02483 seconds