Re: execute compressed PHP command-line application

From: Date: Thu, 18 Jul 2013 09:25:26 +0000
Subject: Re: execute compressed PHP command-line application
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 07/18/2013 03:05 AM, Yasuo Ohgaki wrote:
Hi, You may use register_shutdown_function() to clean things up after exit() http://jp2.php.net/manual/en/function.register-shutdown-function.php So simply extract files to tmp dir and delete everything after execution. I guess this is what you need.
I would expect that if the target application also registers a shutdown function there could be problems, but its potential nesting is something to look into. I suppose it would also be possible to fork the application and delete the temp file once the "child" fork had completed, which /might/ be less prone to being overridden by an arbitrary application.
BTW, I don't think eval() is evil as long as programmers know what they are doing.
Neither do I, but that in itself doesn't change the way it works. <g> Thanks for your suggestion.

Thread (11 messages)

« previous php.internals (#68153) next »