* @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); if ($seconds <= 0) { return $this->forget($key); } $result = $this->store->put($this->itemKey($key), $value, $seconds); if ($result) { event(new CacheWritten($key, $value, $seconds)); } // 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; } /** try { if ($isCacheEnabled) { return self::getRepository() ->remember( $key, $ttl, $closure ); } else { return $closure(); if (!$force) { $data = FileCacheHelper::remember( FileCacheHelper::ALL_ATTRIBUTES_KEY . "_language({$languagesId})_" . $parameter, fn() => getArrayWithAllAttributesHandler($languagesId, $force), 300 ); } else { $data = getArrayWithAllAttributesHandler($languagesId, $force); }$counts_array = array();$counts_may_be = array(); // array with all selected attributes$show_options_arr = [];if ($content != CONTENT_INDEX_DEFAULT || !@file_get_contents(DIR_FS_CATALOG . 'temp/attributes_' . $languages_id . '.json')) { getArrayWithAllAttributes(); $attributesOptionsNames = getAttributesOptionsField('products_options_name'); $attributesValuesNames = getAttributesValuesField('name');}$options_string = generateOptionsString($attributesOptionsNames, $attributesValuesNames);if (!empty($options_string)) {|
ErrorException
|
|---|
ErrorException:
file_put_contents(): Only 1585152 of 1590064 bytes written, possibly out of free disk space
at /mnt/test_sites/sites_new/motofix.com.ua/app/Classes/Filesystem/Filesystem.php:140
at Bootstrap\HandleExceptions->handleError()
(/mnt/test_sites/sites_new/motofix.com.ua/bootstrap/HandleExceptions.php:32)
at Bootstrap\HandleExceptions->Bootstrap\{closure}()
at file_put_contents()
(/mnt/test_sites/sites_new/motofix.com.ua/app/Classes/Filesystem/Filesystem.php:140)
at App\Classes\Filesystem\Filesystem->put()
(/mnt/test_sites/sites_new/motofix.com.ua/app/Classes/Cache/Store/FileStore.php:64)
at App\Classes\Cache\Store\FileStore->put()
(/mnt/test_sites/sites_new/motofix.com.ua/app/Classes/Cache/Repository.php:169)
at App\Classes\Cache\Repository->put()
(/mnt/test_sites/sites_new/motofix.com.ua/app/Classes/Cache/Repository.php:328)
at App\Classes\Cache\Repository->remember()
(/mnt/test_sites/sites_new/motofix.com.ua/app/Classes/Cache/Helpers/FileCacheHelper.php:185)
at App\Classes\Cache\Helpers\FileCacheHelper::remember()
(/mnt/test_sites/sites_new/motofix.com.ua/includes/functions/attributes.php:373)
at getArrayWithAllAttributes()
(/mnt/test_sites/sites_new/motofix.com.ua/index.php:551)
|