Login   Register  
PHP Classes
elePHPant
Icontem

PHP Sandbox: Execute external PHP scripts in a separate process

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Paul Fryer
Name: Paul Fryer <contact>
Classes: 1 package by
Country: United Kingdom United Kingdom
Age: ???
All time rank: 2506112 in United Kingdom United Kingdom
Week rank: 1125 Up51 in United Kingdom United Kingdom Up
Innovation award
Innovation award
Nominee: 1x


  Detailed description   Download Download .zip .tar.gz  
This class can execute external PHP scripts in a separate process.

It uses PHP CLI version to execute a given external scripts as a separate process, so if it fails the calling script does not fail too.

The class provides options to change the root file system path before executing, pass GET, POST, COOKIE and SESSION variables, as well other PHP options like display_errors, memory_limit, max_execution_time, disable_functions, etc..

  Classes of Paul Fryer  >  PHP Sandbox  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP Sandbox
Base name: php-sandbox
Description: Execute external PHP scripts in a separate process
Version: 1
PHP version: 5.2
License: GNU Lesser General Public License (LGPL)
All time users: 709 users
All time rank: 4219
Week users: 1 user
Week rank: 1459 Up
 
  Groups   Rate classes User ratings   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Language Constructs to assist in the language control View top rated classes


  Innovation Award  
PHP Programming Innovation award nominee
July 2011
Number 2


Prize: One subscription to the PDF edition of the PHP Architect magazine
Sometimes you may need to execute PHP scripts from third parties that you may not be able to trust, as such scripts can do something harmful.

This class provides a clever solution to execute untrusted PHP scripts by running them with the PHP cli program as a separate process.

It passes a separate set of values to request variables and changes the root of the file system, so the untrusted scripts do not have access to privileged information.

Clever approach to execute untrusted PHP scripts securely.

Manuel Lemos

  User ratings  
Not enough user ratings

  Applications that use this package  
No pages of applications that use this class were specified.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Files folder imagesamples (6 files)
Accessible without login Plain text file COPYING Lic. Copyright Information LGPL
Accessible without login Plain text file COPYING.LESSER Lic. LGPL
Accessible without login Plain text file example.php Example Example usage files
Accessible without login Plain text file phpsandbox-prepend.php Aux. An auto prepend file to configure the enviroment
Plain text file phpsandbox.php Class The main class
Accessible without login Plain text file README Doc. README file

  Files folder image Files  /  samples  
File Role Description
  Accessible without login Plain text file invalid.php Data Invalid PHP file to fail lint test
  Accessible without login Plain text file malicious.php Data A sample malicious PHP file
  Accessible without login Plain text file recon.php Data An enviroment based PHP reconisence script
  Accessible without login Plain text file slow.php Data A sample script that runs longer than the time limit
  Accessible without login Plain text file trusted.php Data A trusted PHP script
  Accessible without login Plain text file valid.php Data A sample valid PHP file

Download Download all files: php-sandbox.tar.gz php-sandbox.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.