* @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; } /** try { if ($isCacheEnabled) { return self::getRepository() ->remember( $key, $ttl, $closure ); } else { return $closure(); FileCacheHelper::ALL_SQL_PRODUCTS_IDS_KEY . '_' . md5($listing_sql), fn() => array_column( tep_db_query($listing_sql)->fetch_all(MYSQLI_ASSOC), 'products_id' ), null );}function tep_get_all_pids_price_exclude($listing_sql, $excluded_statement){function tep_get_query_products_info($listing_sql, $limit = 10){ global $languages_id, $customer_price, $listing_add_fields, $spec_array, $all_pids; $all_pids = tep_get_all_sql_products_ids($listing_sql); if (!empty($all_pids)) { $specials = getSpecials($all_pids); $specialPrices = []; foreach ($specials as $special) { AND p2c.categories_id = '" . (int)$current_category_id . "' ORDER BY " . $order_by . " " . 'LIMIT ' . ($tpl_settings['limit'] ? (int)$tpl_settings['limit'] : 10);// split query to 2 small queries: 1) find all products ids, 2) get info for each product$drugie_query = tep_get_query_products_info($listing_sql, $tpl_settings['limit']);$drugie = tep_db_query($drugie_query);if (!empty($drugie)) { $salemakers_array = get_salemakers($drugie); tep_db_data_seek($drugie, 0); } require_once DIR_WS_EXT . "last_viewed_products/last_viewed_products.php"; } break; case 'P_DRUGIE': include(DIR_WS_MODULES . 'drugie.php'); break; case 'P_XSELL': if (is_file(DIR_WS_EXT . 'xsell_products_buynow/' . FILENAME_XSELL_PRODUCTS)) { require_once DIR_WS_EXT . 'xsell_products_buynow/' . FILENAME_XSELL_PRODUCTS; } <?php echo $breadcrumb->trail(' '); ?> <!-- END BREADCRUMBS --> <!-- CONTENT --> <?php if (file_exists(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/content/' . $content . '.tpl.php')) { require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/content/' . $content . '.tpl.php'); // content from current template (if exists) } else { require(DIR_WS_CONTENT . $content . '.tpl.php'); // content from default template } ?> <!-- END CONTENT --> }} else { http_response_code(404); $content = CONTENT_ERROR_404;}require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_MAIN_PAGE);require(DIR_WS_INCLUDES . 'application_bottom.php');|
ErrorException
|
|---|
ErrorException:
file_put_contents(/mnt/test_sites/sites_new/wellcraft.com.ua/storage/cache/all_sql_products_ids/all_sql_products_ids$_8b0208446aa703035594107d6b4bc444): failed to open stream: No such file or directory
at /home/solomono/web/solomono.net/sites/demo/app/Classes/Filesystem/Filesystem.php:140
at Bootstrap\HandleExceptions->handleError()
(/home/solomono/web/solomono.net/sites/demo/bootstrap/HandleExceptions.php:32)
at Bootstrap\HandleExceptions->Bootstrap\{closure}()
at file_put_contents()
(/home/solomono/web/solomono.net/sites/demo/app/Classes/Filesystem/Filesystem.php:140)
at App\Classes\Filesystem\Filesystem->put()
(/home/solomono/web/solomono.net/sites/demo/app/Classes/Cache/Store/FileStore.php:64)
at App\Classes\Cache\Store\FileStore->put()
(/home/solomono/web/solomono.net/sites/demo/app/Classes/Cache/Store/FileStore.php:131)
at App\Classes\Cache\Store\FileStore->forever()
(/home/solomono/web/solomono.net/sites/demo/app/Classes/Cache/Repository.php:301)
at App\Classes\Cache\Repository->forever()
(/home/solomono/web/solomono.net/sites/demo/app/Classes/Cache/Repository.php:160)
at App\Classes\Cache\Repository->put()
(/home/solomono/web/solomono.net/sites/demo/app/Classes/Cache/Repository.php:328)
at App\Classes\Cache\Repository->remember()
(/home/solomono/web/solomono.net/sites/demo/app/Classes/Cache/Helpers/FileCacheHelper.php:186)
at App\Classes\Cache\Helpers\FileCacheHelper::remember()
(/home/solomono/web/solomono.net/sites/demo/includes/functions/general.php:70)
at tep_get_all_sql_products_ids()
(/home/solomono/web/solomono.net/sites/demo/includes/functions/general.php:85)
at tep_get_query_products_info()
(/home/solomono/web/solomono.net/sites/demo/includes/modules/drugie.php:31)
at include('/home/solomono/web/solomono.net/sites/demo/includes/modules/drugie.php')
(/mnt/test_sites/sites_new/wellcraft.com.ua/templates/default/content/product_info.tpl.php:412)
at require('/mnt/test_sites/sites_new/wellcraft.com.ua/templates/default/content/product_info.tpl.php')
(/mnt/test_sites/sites_new/wellcraft.com.ua/templates/default/main_page.tpl.php:121)
at require('/mnt/test_sites/sites_new/wellcraft.com.ua/templates/default/main_page.tpl.php')
(/mnt/test_sites/sites_new/wellcraft.com.ua/product_info.php:338)
|