/opt/sellingo/sellingo-vendor-php84/16337809/mpdf/mpdf/src/Cache.php
namespace Mpdf;
use DirectoryIterator;
class Cache
{
private $basePath;
private $cleanupInterval;
public function __construct($basePath, $cleanupInterval = 3600)
{
if (!is_int($cleanupInterval) && false !== $cleanupInterval) {
throw new \Mpdf\MpdfException('Cache cleanup interval has to be an integer or false');
}
if (!$this->createBasePath($basePath)) {
throw new \Mpdf\MpdfException(sprintf('Temporary files directory "%s" is not writable', $basePath));
}
$this->basePath = $basePath;
$this->cleanupInterval = $cleanupInterval;
}
protected function createBasePath($basePath)
{
if (!file_exists($basePath)) {
if (!$this->createDirectory($basePath)) {
return false;
}
}
if (!is_writable($basePath) || !is_dir($basePath)) {
return false;
}
return true;
}
Arguments
"Temporary files directory "/tmp/sllgo28403/domains/testowy001.devsel.pl/public_html/application/mpdf//mpdf" is not writable"
/opt/sellingo/sellingo-vendor-php84/16337809/mpdf/mpdf/src/ServiceFactory.php
$scriptToLanguage,
$fontDescriptor,
$bmp,
$directWrite,
$wmf
) {
$sizeConverter = new SizeConverter($mpdf->dpi, $mpdf->default_font_size, $mpdf, $logger);
$colorModeConverter = new ColorModeConverter();
$colorSpaceRestrictor = new ColorSpaceRestrictor(
$mpdf,
$colorModeConverter
);
$colorConverter = new ColorConverter($mpdf, $colorModeConverter, $colorSpaceRestrictor);
$tableOfContents = new TableOfContents($mpdf, $sizeConverter);
$cacheBasePath = $config['tempDir'] . '/mpdf';
$cache = new Cache($cacheBasePath, $config['cacheCleanupInterval']);
$fontCache = new FontCache(new Cache($cacheBasePath . '/ttfontdata', $config['cacheCleanupInterval']));
$fontFileFinder = new FontFileFinder($config['fontDir']);
if ($this->container && $this->container->has('httpClient')) {
$httpClient = $this->container->get('httpClient');
} elseif (\function_exists('curl_init')) {
$httpClient = new CurlHttpClient($mpdf, $logger);
} else {
$httpClient = new SocketHttpClient($logger);
}
$localContentLoader = $this->container && $this->container->has('localContentLoader')
? $this->container->get('localContentLoader')
: new LocalContentLoader();
$assetFetcher = $this->container && $this->container->has('assetFetcher')
? $this->container->get('assetFetcher')
: new AssetFetcher($mpdf, $localContentLoader, $httpClient, $logger);
/opt/sellingo/sellingo-vendor-php84/16337809/mpdf/mpdf/src/Mpdf.php
$mode,
$format,
$default_font_size,
$default_font,
$mgl,
$mgr,
$mgt,
$mgb,
$mgh,
$mgf,
$orientation
) = $this->initConstructorParams($config);
$this->logger = new NullLogger();
$originalConfig = $config;
$config = $this->initConfig($originalConfig);
$serviceFactory = new ServiceFactory($container);
$services = $serviceFactory->getServices(
$this,
$this->logger,
$config,
$this->languageToFont,
$this->scriptToLanguage,
$this->fontDescriptor,
$this->bmp,
$this->directWrite,
$this->wmf
);
$this->container = $container;
$this->services = [];
foreach ($services as $key => $service) {
$this->{$key} = $service;
$this->services[] = $key;
}
$this->time0 = microtime(true);
/home/sllgo28403/domains/testowy001.devsel.pl/public_html/modules/sellingo/classes/esprzedaz/mpdf.php
}
define('_MPDF_TEMP_PATH', $mpdf_temp_path);
}
if (!defined('_MPDF_TTFONTDATAPATH')) {
$mpdf_font_path = APPPATH.'mpdf/fonts/';
if (!is_dir($mpdf_font_path)) {
@mkdir($mpdf_font_path, 0755);
}
define('_MPDF_TTFONTDATAPATH', $mpdf_font_path);
}
// require_once SYSPATH.'vendor/vendor/mpdf/mpdf/mpdf.php';
}
public static function getMpdf($config)
{
$appath = str_replace(['/home/', '/var/www/clients/', 'client0/', '//'], ['', '', '', '/'], APPPATH);
$config['tempDir'] = '/tmp/'.$appath.'mpdf/';
$mpdf = new Mpdf($config);
if (is_dir('/tmp/'.$appath)) {
$fileowner = fileowner(APPPATH.'bootstrap.php');
$filegroup = filegroup(APPPATH.'bootstrap.php');
system('chown '.$fileowner.':'.$filegroup.' /tmp/'.$appath.' -R', $foo);
}
return $mpdf;
}
}
/home/sllgo28403/domains/testowy001.devsel.pl/public_html/modules/sellingo/classes/controller/catalog/products.php
'breadcrumb_path' => $breadcrumb_path,
'attributes' => $attributes,
'opinions' => $opinions,
'average' => $average,
'opinion_errors' => $opinion_errors,
'variants_all' => $variants_all,
'options' => $options,
'options_all' => $options_all,
'props' => $propss,
'url' => $url,
]
)->render();
KCache::instance()->set($cachename, $data);
}
// require Kohana::find_file('vendor/MPDF57', 'mpdf');
Esprzedaz_Mpdf::setConfig();
$this->response->headers('Content-Type', 'application/pdf');
$this->response->send_headers();
$mpdf = Esprzedaz_Mpdf::getMpdf(
[
'format' => 'A4',
'default_font_size' => 9,
'default_font' => 'DejaVuSans',
]
);
// $mpdf = new mPDF('iso-8859-2', 'A4', 9, 'DejaVuSans');
$mpdf->WriteHTML($data);
$mpdf->SetHTMLFooter(
'<div style="text-align: right; font-size: 2mm; font-family: oswaldcondensed; "><a href="https://sellingo.pl" style="text-decoration: none; color: #000;">Oprogramowanie sklepu internetowego Sellingo.pl</a></div>'
);
$mpdf->Output(url::title($item->title).'.pdf', 'D');
exit;
}
}
throw new Kohana_Http_Exception_404();
}
/home/sllgo28403/domains/testowy001.devsel.pl/public_html/system/classes/kohana/request/client/internal.php
// If the action doesn't exist, it's a 404
if (!$class->hasMethod('action_'.$action)) {
throw new Http_Exception_404('The requested URL :uri was not found on this server.',
[':uri' => $request->param('uri')]);
}
$method = $class->getMethod('action_'.$action);
/**
* Execute the main action with the parameters
*
* @deprecated $params passing is deprecated since version 3.1
* will be removed in 3.2.
*/
if (!empty($params) && array_keys($params) !== range(0, count($params) - 1)) {
$params = array_values($params);
}
$method->invokeArgs($controller, $params);
// Execute the "after action" method
$class->getMethod('after')->invoke($controller);
// Stop response time
$this->_response_time = (time() - $this->_response_time);
// Add the default Content-Type header to initial request if not present
if ($initial_request AND !$request->headers('content-type')) {
$request->headers('content-type', Kohana::$content_type.'; charset='.Kohana::$charset);
}
} catch (Http_Exception_404 $e) {
if (Request::$find_in_shop) {
// Restore the previous request
Request::$current = $previous;
if (isset($benchmark)) {
// Delete the benchmark, it is invalid
Profiler::delete($benchmark);
}
/home/sllgo28403/domains/testowy001.devsel.pl/public_html/modules/sellingo/classes/kohana/request.php
*
* $request->execute();
*
* @return Response
*
* @throws Kohana_Exception
*
* @uses [Kohana::$profiling]
* @uses [Profiler]
*/
public function execute()
{
if (!$this->_client instanceof Kohana_Request_Client) {
throw new Kohana_Request_Exception(
'Unable to execute :uri without a Kohana_Request_Client',
[':uri', $this->uri]
);
}
return $this->_client->execute($this);
}
public static function factory($uri = true, ?Kohana_Cache $cache = null)
{
// If this is the initial request
if (!Request::$initial) {
if (Kohana::$is_cli) {
// Default protocol for command line is cli://
$protocol = 'cli';
// Get the command line options
$options = CLI::options('uri', 'method', 'get', 'post', 'referrer');
if (isset($options['uri'])) {
// Use the specified URI
$uri = $options['uri'];
}
if (isset($options['method'])) {
// Use the specified method
/home/sllgo28403/domains/testowy001.devsel.pl/public_html/index.php
if (!defined('KOHANA_START_MEMORY')) {
define('KOHANA_START_MEMORY', memory_get_usage());
}
// Bootstrap the application
require APPPATH.'bootstrap'.EXT;
/**
* Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
* If no source is specified, the URI will be automatically detected.
*/
if (PHP_SAPI == 'cli' && defined('USE_MINION')) // Try and load minion
{
class_exists('Minion_Task') OR die('Please enable the Minion module for CLI support.'.PHP_EOL);
set_exception_handler(['Minion_Exception', 'handler']);
Minion_Task::factory(Minion_CLI::options())->execute();
} else {
$data = Request::factory()
->execute()
->send_headers()
->body();
}
echo $data;
if (isset($blackfire)) {
$profile = $blackfire->endProbe($probe);
}