예제 #1
0
 function __construct($suppress_output = false)
 {
     $this->quiet = !!$suppress_output;
     $this->debug = !empty($_REQUEST['debug']);
     if ($this->memprof = isset($_REQUEST['MEMPROF']) && function_exists('memprof_enable')) {
         memprof_enable();
         $this->Log("Memprof enabled!");
     }
 }
예제 #2
0
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*
* Consult LICENSE file for details
************************************************/
ob_start(null, 1048576);
// ignore user abortions because this can lead to weird errors - see ZP-239
ignore_user_abort(true);
require_once 'vendor/autoload.php';
require_once 'config.php';
if (defined('LOG_MEMORY_PROFILER') && LOG_MEMORY_PROFILER) {
    if (function_exists('memprof_enable')) {
        memprof_enable();
    } else {
        ZLog::Write(LOGLEVEL_WARN, "Memory profiler is enabled but the php-pecl-memprof extension was not found. Install and enable it");
    }
}
// Attempt to set maximum execution time
ini_set('max_execution_time', SCRIPT_TIMEOUT);
set_time_limit(SCRIPT_TIMEOUT);
try {
    // check config & initialize the basics
    ZPush::CheckConfig();
    Request::Initialize();
    ZLog::Initialize();
    $autenticationInfo = Request::AuthenticationInfo();
    $GETUser = Request::GetGETUser();
    ZLog::Write(LOGLEVEL_DEBUG, "-------- Start");
예제 #3
0
 public static function upMemProfiler()
 {
     if (function_exists('memprof_enable')) {
         memprof_enable();
     }
 }