christiaan / php-sandbox

Php Sandbox in a child process which should make it possible to run user supplied code safely
MIT License
4 stars 0 forks source link

When I run the code in a .phar it doesn't create the child process #3

Open adrianorosa opened 2 years ago

adrianorosa commented 2 years ago

Hi,

When I package my code in a .phar and try to run it, this error occurs below. Could it be some limitation for being running in a .phar?

PHP Fatal error:  Uncaught Christiaan\PhpSandbox\Exception: Child Process died in phar:///Users/adriano/Labs/chatbot/app.phar/vendor/christiaan/php-sandbox/src/Christiaan/PhpSandbox/PhpSandbox.php:86
Stack trace:
#0 phar:///Users/adriano/Labs/chatbot/app.phar/vendor/christiaan/php-sandbox/src/Christiaan/PhpSandbox/PhpSandbox.php(74): Christiaan\PhpSandbox\PhpSandbox->call('execute', Array)
#1 phar:///Users/adriano/Labs/chatbot/app.phar/src/States/Script.php(32): Christiaan\PhpSandbox\PhpSandbox->execute('if ($context->g...')
#2 phar:///Users/adriano/Labs/chatbot/app.phar/src/States/Script.php(19): Xpbox\Chatbot\States\Script->runScript()
#3 phar:///Users/adriano/Labs/chatbot/app.phar/src/States/State.php(40): Xpbox\Chatbot\States\Script->doAction()
#4 phar:///Users/adriano/Labs/chatbot/app.phar/src/Context.php(46): Xpbox\Chatbot\States\State->run()
#5 phar:///Users/adriano/Labs/chatbot/app.phar/src/States/State.php(46): Xpbox\Chatbot\Context->run()
#6 phar:///Users/adriano/Labs/chatbot/app.phar/src/Context.php(46): Xpbox\Chatb in phar:///Users/adriano/Labs/chatbot/app.phar/vendor/christiaan/php-sandbox/src/Christiaan/PhpSandbox/PhpSandbox.php on line 86