Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: PHP Sandbox

  1. #1
    Regular Coder
    Join Date
    Apr 2007
    Griffith. Australia
    Thanked 4 Times in 4 Posts

    PHP Sandbox

    Hey All,

    I'm trying to write something similar to the facebook sandbox so that people can add functionality to my site through their own custom written mini programs but I don't want it ti have full access to the complete site. I was looking at PHP runkit but was struggling to follow the concepts, it seems like it is almost a sub-compiler to the main compiler, any advice?

  2. #2
    Regular Coder djh101's Avatar
    Join Date
    May 2009
    Thanked 67 Times in 67 Posts
    Letting users run code on the server isn't an easy thing to do without leaving a whole bunch of security wholes. I don't know of any pre-made sandboxes. It will be a lot of work, but you could operate a white list system. What this would do is execute only pre-determined safe code (e.g. an echo command isn't going to hurt you or your system at all; allowing mysql queries, however, would be... very stupid).
    "Yeah science!"


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts