try {$exitCode = $process->run();$commandLine = $process->getCommandLine();$output = $process->getOutput().PHP_EOL.$process->getErrorOutput();if($exitCode == 127) {throw new CommandNotFound(sprintf('Command "%s" not found.', $this->cmd));}if($exitCode !== 0 || stripos($output, 'error') !== false || stripos($output, 'permission') !== false) {throw new Exception(sprintf('Command failed, return code: %d, command: %s, stderr: %s', $exitCode, $commandLine, trim($output)));}} catch(RuntimeException $e) {throw new Exception($e->getMessage(), $e->getCode(), $e);
-rw-r--r-- 10008 1005 1.85KB Sep 30 2021 /var/www/vhosts/shoptillyoudrop.deals/httpdocs/_app/vendor/ps/image-optimizer/src/ImageOptimizer/Command.php
/var/www/vhosts/shoptillyoudrop.deals/httpdocs/_app/vendor/ps/image-optimizer/src/ImageOptimizer/Command.php
if($this->extraArgs) {$customArgs = array_merge(is_callable($this->extraArgs) ? call_user_func($this->extraArgs, $filepath) : $this->extraArgs,$customArgs);}$this->command->execute($customArgs);}}
if ($outputChanaged) {copy($filepath, $outputFilepath);$filepath = $outputFilepath;}try {$this->optimizer->optimize($filepath);} catch (\Throwable $exception) {if ($outputChanaged) {unlink($filepath);}throw $exception;}
$this->optimizer = $optimizer;$this->logger = $logger;}public function optimize(string $filepath): void{try {$this->optimizer->optimize($filepath);} catch (Exception $e) {$this->logger->error('Error during image optimization. See exception for more details.', [ 'exception' => $e ]);}}public function unwrap(): Optimizer{
$image->save($this->cacheFolder . '/' . $this->cfName . '_social' . '.' . $ext);} else {$image = new ImageResize($path);$image->resizeToWidth(1200);$image->save($resizedPath);}$customOptimizer = $factory->get('compress_image')->optimize($resizedPath);if ($ext == 'png') {$img = imagecreatefrompng($resizedPath);} else {$img = imagecreatefromjpeg($resizedPath);}
}$optimizerChain = OptimizerChainFactory::create();if ($this->is_social) {$this->copyImg($url, $this->cached_social_url);$this->imgResize($this->cached_social_url, true);} else {$this->copyImg($url, $this->cachedurl);$this->imgResize($this->cachedurl);}}}function copFakeImg($src){
$this->theme = isset($params['theme']) ? $params['theme'] : '';$this->module = isset($params['module']) ? $params['module'] : '';$this->img = isset($params['image']) ? $params['image'] : '';$this->cfName = '';$this->cacheFolder = '';$this->utils = new Utilities();$this->conn = new ConnectionMngr();$this->createImage();$this->serve();die();}private function copyImg($url, $to){$ch = curl_init($url);
<?phprequire_once('../_app/_constants.php');use Aristoteles\Controllers\Images;new Images([], $_REQUEST);
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> ImageOptimizer\Exception\CommandNotFound: Command "/usr/bin/jpegoptim" not found. in /var/www/vhosts/shoptillyoudrop.deals/httpdocs/_app/vendor/ps/image-optimizer/src/ImageOptimizer/Command.php on line <i>44</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0003</td><td bgcolor='#eeeeec' align='right'>363800</td><td bgcolor='#eeeeec'>{main}( )</td><td title='/var/www/vhosts/shoptillyoudrop.deals/httpdocs/public/image.php' bgcolor='#eeeeec'>.../image.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.0130</td><td bgcolor='#eeeeec' align='right'>378456</td><td bgcolor='#eeeeec'>Aristoteles\Controllers\Images->__construct( <span>$methods = </span><span>[]</span>, <span>$params = </span><span>['theme' => 'shoptillyoudrop', 'module' => 'products', 'image' => '8-vero-moda-dames-snglt-knit-mock-oranje_image.jpg']</span> )</td><td title='/var/www/vhosts/shoptillyoudrop.deals/httpdocs/public/image.php' bgcolor='#eeeeec'>.../image.php<b>:</b>5</td></tr> <tr><td bgcolor='#eeeeec' align='center'>3</td><td bgcolor='#eeeeec' align='center'>0.0329</td><td bgcolor='#eeeeec' align='right'>381544</td><td bgcolor='#eeeeec'>Aristoteles\Controllers\Images->createImage( )</td><td title='/var/www/vhosts/shoptillyoudrop.deals/httpdocs/_app/Aristoteles/Controllers/Images.php' bgcolor='#eeeeec'>.../Images.php<b>:</b>31</td></tr> <tr><td bgcolor='#eeeeec' align='center'>4</td><td bgcolor='#eeeeec' align='center'>0.1196</td><td bgcolor='#eeeeec' align='right'>397168</td><td bgcolor='#eeeeec'>Aristoteles\Controllers\Images->imgResize( <span>$path = </span><span>'/var/www/vhosts/shoptillyoudrop.deals/httpdocs/_app/../public/cache/a97a76a4f8a56546334bd834501e5605.jpg'</span>, <span>$masked = </span>??? )</td><td title='/var/www/vhosts/shoptillyoudrop.deals/httpdocs/_app/Aristoteles/Controllers/Images.php' bgcolor='#eeeeec'>.../Images.php<b>:</b>181</td></tr> <tr><td bgcolor='#eeeeec' align='center'>5</td><td bgcolor='#eeeeec' align='center'>0.1833</td><td bgcolor='#eeeeec' align='right'>1419840</td><td bgcolor='#eeeeec'>ImageOptimizer\SuppressErrorOptimizer->optimize( <span>$filepath = </span><span>'/var/www/vhosts/shoptillyoudrop.deals/httpdocs/_app/../public/cache/a97a76a4f8a56546334bd834501e5605.jpg'</span> )</td><td title='/var/www/vhosts/shoptillyoudrop.deals/httpdocs/_app/Aristoteles/Controllers/Images.php' bgcolor='#eeeeec'>.../Images.php<b>:</b>119</td></tr> <tr><td bgcolor='#eeeeec' align='center'>6</td><td bgcolor='#eeeeec' align='center'>0.1833</td><td bgcolor='#eeeeec' align='right'>1419840</td><td bgcolor='#eeeeec'>ImageOptimizer\ChangedOutputOptimizer->optimize( <span>$filepath = </span><span>'/var/www/vhosts/shoptillyoudrop.deals/httpdocs/_app/../public/cache/a97a76a4f8a56546334bd834501e5605.jpg'</span> )</td><td title='/var/www/vhosts/shoptillyoudrop.deals/httpdocs/_app/vendor/ps/image-optimizer/src/ImageOptimizer/SuppressErrorOptimizer.php' bgcolor='#eeeeec'>.../SuppressErrorOptimizer.php<b>:</b>24</td></tr>