* @param bool $lock
* @return int
*/
public function put(string $path, $contents, $lock = false)
{
return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
}
/**
* Write the contents of a file, replacing it atomically if it already exists.
* @param string $path
//ini_set('error_log' , '/home/solomono/web/solomono.net/sites/dev/php.log');
error_reporting(E_ALL);
set_error_handler(function ($level, $message, $file = '', $line = 0) {
$this->handleError($level, $message, $file, $line);
});
set_exception_handler(function ($e) {
$this->handleException($e);
});
* @param bool $lock
* @return int
*/
public function put(string $path, $contents, $lock = false)
{
return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
}
/**
* Write the contents of a file, replacing it atomically if it already exists.
* @param string $path
$this->ensureCacheDirectoryExists($path = $this->path($key));
$result = $this->files->put(
$path,
$this->expiration($seconds) . serialize($value),
true
);
if ($result !== false && $result > 0) {
$this->ensureFileHasCorrectPermissions($path);
* @param mixed $value
* @return bool
*/
public function forever($key, $value): bool
{
return $this->put($key, $value, 0);
}
/**
* Remove an item from the cache.
* @param string $key
* @param mixed $value
* @return bool
*/
public function forever($key, $value)
{
$result = $this->store->forever($this->itemKey($key), $value);
if ($result) {
event(new CacheWritten($key, $value));
}
if (is_array($key)) {
return $this->putMany($key, $value);
}
if ($ttl === null) {
return $this->forever($key, $value);
}
$seconds = $this->getSeconds($ttl);
if ($seconds <= 0) {
// given number of seconds so it's available for all subsequent requests.
if (!is_null($value)) {
return $value;
}
$this->put($key, $value = $callback(), $ttl);
return $value;
}
/**
public static function remember(string $key, \Closure $closure, $ttl = null)
{
try {
return self::getRepository()
->remember(
$key,
$ttl,
$closure
);
} catch (\Exception $exception) {
Log::critical($exception->getMessage(), [
}
}
}
return $cat_urls;
},
null
);
}
function check_subcategories($tree, $current_category_id)
$cPathTree = null;
tep_get_cpath_global($cat_tree); // generate cPaths array
if (getConstantValue('SEO_ADD_PARENT_CATEGORIES_TO_URL') === 'true') {
$cPaths = $cPathTree; // add parent categories is to category URL
}
tep_get_categories_urls(); // generate categories urls
tep_make_cat_list();
if (!tep_session_is_registered('geopluginJSONE')) {
require(DIR_WS_CLASSES . 'geoplugin.class.php');
$geoplugin = new geoPlugin();
if($_GET['test_debug'] == '123') {
$timer_product_info = microtime(true);
$file = basename(__FILE__);
file_put_contents('test_speed.log', date('c') . ' "' . $_SERVER['REQUEST_URI'].'" Label 0 - ' . $file . ' - Start speed debug ' . PHP_EOL,FILE_APPEND);
}
require('includes/application_top.php');
checkTime('application_top');
includeLanguages(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);
if ($languages_id != $lng->defaultLanguage['id']) {
ErrorException
|
---|
ErrorException: file_put_contents(/var/www/astina/storage/cache/categories_urls/categories_urls$): failed to open stream: No such file or directory at /var/www/astina/app/Classes/Filesystem/Filesystem.php:140 at Bootstrap\HandleExceptions->handleError() (/var/www/astina/bootstrap/HandleExceptions.php:32) at Bootstrap\HandleExceptions->Bootstrap\{closure}() at file_put_contents() (/var/www/astina/app/Classes/Filesystem/Filesystem.php:140) at App\Classes\Filesystem\Filesystem->put() (/var/www/astina/app/Classes/Cache/Store/FileStore.php:64) at App\Classes\Cache\Store\FileStore->put() (/var/www/astina/app/Classes/Cache/Store/FileStore.php:131) at App\Classes\Cache\Store\FileStore->forever() (/var/www/astina/app/Classes/Cache/Repository.php:301) at App\Classes\Cache\Repository->forever() (/var/www/astina/app/Classes/Cache/Repository.php:160) at App\Classes\Cache\Repository->put() (/var/www/astina/app/Classes/Cache/Repository.php:328) at App\Classes\Cache\Repository->remember() (/var/www/astina/app/Classes/Cache/Helpers/FileCacheHelper.php:179) at App\Classes\Cache\Helpers\FileCacheHelper::remember() (/var/www/astina/includes/functions/general.php:2381) at tep_get_categories_urls() (/var/www/astina/includes/application_top.php:806) at require('/var/www/astina/includes/application_top.php') (/var/www/astina/product_info.php:12) |