Unhandled Error!

Error writing to the cache file

Document /modules/core/classes/core_filecache.php
Document type PHP document
Line 54
Exception class Phpr_SystemException

Code Highlight

 
			$key = $this->fix_key($key);
			$dest_path = $this->dir_path.'/'.$key;
 
			$fp = @fopen($dest_path, 'w');
			if (!$fp)
				throw new Phpr_SystemException('Error writing to the cache file');
 
			try
			{
				if (flock($fp, LOCK_EX | LOCK_NB))
				{
					@fwrite($fp, $value);
# Call Stack Code Document Line
15 Core_FileCache->set_value('nthsv3-partial_shop-product_list_trade_only_21_2_row_bdabad0e0a0869c206d394e284e1b0f7312bc585', '<!-- --> ', 86400) /modules/core/classes/core_cachebase.php 262
14 Core_CacheBase->set('nthsv3-partial_shop-product_list_trade_only_21_2_row_bdabad0e0a0869c206d394e284e1b0f7312bc585', '<!-- --> ', 86400) /modules/cms/classes/cms_controller.php 1031
13 Cms_Controller->render_partial('shop:product_list_trade_only_21_2_row', array(6) [products => object(Shop_Product), class => 'three mobile-two', records_per_page => '80', paginate => '1', pagination_base_url => '/category/forklift-hire', page_index => 'forklift-hire'], array(4) [cache => '1', cache_vary_by => array(1), cache_versions => array(1), cache_ttl => '86400']) /modules/cms/classes/cms_controller.php(383) : eval()'d code 231
12 eval(()) /modules/cms/classes/cms_controller.php 383
11 Cms_Controller->evalWithException('?><section class="content" style="padding:0px;"> <section class="category <?php echo $category->url_name; ?>"> <div class="row"> <!--<div class="two columns"> <? foreach ($category->images as $image): ?> <img src="<?= $image->getThumbnailPath(400, 400) ?>"/> <? endforeach ?> </div>--> <div class="twelve columns"> <div id="category-page"> <? if ($category): $subcategories = $category->list_children('front_end_sort_order'); $has_subcategories = $subcategories->count; $has_products = $category->eval_num_of_products(); ?> <? if ($category): ?> <?php $this->render_partial('category_breadcrumb'); ?> <? endif ?> <h1><?php if(!empty($category->title)): ?><?= $category->title ?><?php else: ?><?= $category->name ?><?php endif; ?></h1> <? if ($category->short_description): ?> <div class="description"> <p class="description" style="font-size: 1.1em;"><?= ($category->short_description) ?></p> </div> <? endif ?> <?php $this->render_partial('free_delivery_cat'); ?> <? if ($has_subcategories): ?> <ul class="product-list"> <? $i=0 ; $showEvery = 4 ; foreach ($subcategories as $subcategory): ?> <?php if( is_int(($i-0) / $showEvery) && $i >0 ): ?> <? $this->render_partial('random_usp_drama') ?> <?php endif ?> <li class="<?php echo isset($class) ? $class : 'four'; ?> columns catcol" style="height: 100%;"> <div class="images" style="border: 0.1em solid #404040; margin: 0.5em; text-align: center; padding: 1em;"> <div class="desc"> <h2 style="font-size: 1.5em;"> <? if(!empty($subcategory->x_catfalse)): ?> <a href="<?= $subcategory->x_catfalse ?>" data-gtm="SubCat Name (C)" title="<?= h($subcategory->name) ?>" class="product-list"><?= h($subcategory->name) ?></a> <? else: ?> <a href="<?= $subcategory->page_url('category') ?>/" data-gtm="SubCat Name (C)" title="<?= h($subcategory->name) ?>" class="product-list"><?= h($subcategory->name) ?></a> <? endif ?> </h2> <div> <? if(!empty($subcategory->x_catfalse)): ?> <a href="<?= $subcategory->x_catfalse ?>" data-gtm="SubCat Image (C)" title="<?= h($subcategory->name) ?>" class="product-list" style="padding: 1em 0;"> <? else: ?> <a href="<?= $subcategory->page_url('category') ?>/" data-gtm="SubCat Image (C)" title="<?= h($subcategory->name) ?>" class="product-list" style="padding: 1em 0;"> <? endif ?> <img class="primary" style="display: block; margin-left: auto; margin-right: auto;" src="<?= $subcategory->image_url(0, 260, 'auto') ?>" title="<?= h($subcategory->name) ?>" width="260" height="260" alt="<?= h($subcategory->name) ?>" loading="eager" max-width="100%" max-height="100%"/> </a> </div> <div class="row"> <div class="twelve columns"> <p class="hide-for-small" style="padding: 0 1em;"><?= ($subcategory->x_catcontext) ?></p> <? if(!empty($subcategory->x_catfalse)): ?> <a href="<?= $subcategory->x_catfalse ?>" data-gtm="Button: View the Range (C)" title="View the Range" class="button expand quotebutton">View the Range</a> <? else: ?> <a href="<?= $subcategory->page_url('category') ?>/" data-gtm="Button: View the Range (C)" title="View the Range" class="button expand quotebutton">View the Range</a> <? endif ?> </div> </div> </li> <?php $i++; ?> <? endforeach ?> </ul> <? endif ?> </div> </div> </div> </section> <? if ($has_subcategories): ?> <? if ($category->description): ?> <section class="category-description"> <div class="row"> <div class="twelve columns"> <div class="description"> <p class="description"> <?= ($category->description) ?> <? if(strpos($_SERVER['REQUEST_URI'], 'power-and-lighting-hire') !== false):?> <?php $this->render_partial('dlink_power_lighting'); ?> <? elseif(strpos($_SERVER['REQUEST_URI'], 'plant-hire') !== false):?> <?php $this->render_partial('dlink_plant'); ?> <? elseif(strpos($_SERVER['REQUEST_URI'], 'powered-access-hire') !== false):?> <?php $this->render_partial('dlink_powered_access'); ?> <? elseif(strpos($_SERVER['REQUEST_URI'], 'cleaning-equipment-hire') !== false):?> <?php $this->render_partial('dlink_cleaning'); ?> <? elseif(strpos($_SERVER['REQUEST_URI'], 'access-equipment-hire') !== false):?> <?php $this->render_partial('dlink_access'); ?> <? elseif(strpos($_SERVER['REQUEST_URI'], 'lifting-equipment-hire') !== false):?> <?php $this->render_partial('dlink_lifting'); ?> <? elseif(strpos($_SERVER['REQUEST_URI'], 'climate-control-hire') !== false):?> <?php $this->render_partial('dlink_climate'); ?> <? elseif(strpos($_SERVER['REQUEST_URI'], 'garden-tool-hire') !== false):?> <?php $this->render_partial('dlink_gardening'); ?> <? elseif(strpos($_SERVER['REQUEST_URI'], 'building') !== false):?> <?php $this->render_partial('dlink_building'); ?> <? endif ?> </p> <p class="description"><?php $this->render_partial('category_qa'); ?></p> </div> </div> </div> </section> <? endif ?> <? if(!empty($category->x_popular_group)): ?> <hr /> <section class="productslatest" style="background-color: #ffffff; margin-bottom: 1em;"> <div class="row"> <div class="twelve columns"> <h2>Popular <?php echo $category->name; ?> Products</h2> <?php $group = Shop_CustomGroup::create()->find_by_code($category->x_popular_group); if($group): ?> <?php $this->render_partial('shop:product_list_popular_products', array( 'products' => $group->list_products() ), array( 'cache'=>true, 'cache_vary_by'=>array('url'), 'cache_versions'=>array('catalog'), 'cache_ttl'=>86400 )); ?> <?php endif; ?> </div> </div> </section> <? endif ?> <? endif ?> <!--<div id="category-products"> <? $this->render_partial('shop:categories') ?> </div>--> <? if (!$has_subcategories && !$has_products): ?> <p>This category does not contain any products or subcategories.</p> <p><a href="<?= root_url('/')?>" title="Return to the home page">Return to the home page</a></p> <? endif ?> <? else: ?> <h1>Category not found</h1> <p>Sorry, the specified category cannot be found.</p> <p><a href="<?= root_url('/')?>" title="Return to the home page">Return to the home page</a></p> <? endif ?> </div> <div class="clearfix"></div> </div> </div> </section> </section> <? if (!$has_subcategories && $has_products): ?> <section class="content category-products"> <section class="category <?php echo $category->url_name; ?>"> <div class="row"> <div class="nine columns"> <div class="product-list-diy-trade"> <?php $this->render_partial('shop:product_list_diy_trade_21_2_row', array( 'products' => $category->list_products(array('sorting'=>array('price desc'))), 'class' => 'four mobile-four', 'records_per_page' => 80, 'paginate'=> true, 'pagination_base_url' => $category->page_url('/category'), 'page_index' => $this->request_param(-1, 0) ), array( 'cache'=>true, 'cache_vary_by'=>array('url'), 'cache_versions'=>array('catalog'), 'cache_ttl'=>86400 )); ?> </div> <div id="product_list" class="product-list-trade-only"> <?php $this->render_partial('shop:product_list_trade_only_21_2_row', array( 'products' => $category->list_products(array('sorting'=>array('price desc'))), 'class' => 'three mobile-two', 'records_per_page' => 80, 'paginate'=> true, 'pagination_base_url' => $category->page_url('/category'), 'page_index' => $this->request_param(-1, 0) ), array( 'cache'=>true, 'cache_vary_by'=>array('url'), 'cache_versions'=>array('catalog'), 'cache_ttl'=>86400 )); ?> </div> <div class="product-list-training"> <!--<div id="product_list">--> <?php $this->render_partial('shop:product_list_training_21_2_row', array( 'products' => $category->list_products(array('sorting'=>array('price desc'))), 'class' => 'three mobile-two', 'records_per_page' => 80, 'paginate'=> true, 'pagination_base_url' => $category->page_url('/category'), 'page_index' => $this->request_param(-1, 0) ), array( 'cache'=>true, 'cache_vary_by'=>array('url'), 'cache_versions'=>array('catalog'), 'cache_ttl'=>86400 )); ?> <!--</div>--> </div> <div class="product-list-sale" id="product_list"> <?php $this->render_partial('shop:product_list_for_sale', array( 'products' => $category->list_products(array('sorting'=>array('price desc'))), 'class' => 'three mobile-two', 'records_per_page' => 80, 'paginate'=> true, 'pagination_base_url' => $category->page_url('/category'), 'page_index' => $this->request_param(-1, 0) ), array( 'cache'=>true, 'cache_vary_by'=>array('url'), 'cache_versions'=>array('catalog'), 'cache_ttl'=>86400 )); ?> </div> <? if ($category->description): ?> <!--<p class="description"><?= ($category->description) ?></p>--> <div class="description"> <?= $category->description ?> <?php $this->render_partial('category_qa'); ?> </div> <? endif ?> <!--<p class="description"><?= ($category->description) ?></p>--> </div> <div class="three columns" style="position: -webkit-sticky; /* Safari */ position: sticky; top: 1rem;"> <?php $this->render_partial('call_free') ?> <div class="twelve columns random-usp"> <?php $this->render_partial('random_usp') ?> </div> <div class="twelve columns random-blog"> <?php $this->render_partial('random_blog') ?> </div> </div> </div> </section> </section> <? endif ?> <?= $this->render_partial('white_diesel_modal') ?> <?= $this->render_partial('insurance_modal') ?> <script> function showSameDayCatBanners() { let date = new Date(); let sameDayBanners = document.getElementsByClassName('same-day-loading'); for (let i = 0, len = sameDayBanners.length; i < len; i++) { console.log(sameDayBanners[i].dataset.bookingDelay); if (sameDayBanners[i].dataset.bookingDelay <= 0) { console.log('booking delay'); let startTime = sameDayBanners[i].dataset.cutOffStart.split(':'); let endTime = sameDayBanners[i].dataset.cutOffEnd.split(':'); let startDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), startTime[0], startTime[1]); let endDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), endTime[0], endTime[1]); if (startDate < date && endDate > date) { sameDayBanners[i].style.display = 'block'; } } } } showSameDayCatBanners(); </script> ', 'CMS page', 'Forklift Hire') /modules/cms/classes/cms_controller.php 608
10 Cms_Controller->eval_page_content(()) /modules/cms/classes/cms_controller.php 198
9 Cms_Controller->open(object(Cms_Page), array(1) [0 => 'forklift-hire']) /controllers/application.php 72
8 Application->On404(())
7 call_user_func_array(array(2) [0 => object(Application), 1 => 'On404'], array(0)) /phproad/modules/phpr/classes/phpr_controller.php 170
6 Phpr_Controller->executeAction('On404', array(0)) /phproad/modules/phpr/classes/phpr_controller.php 84
5 Phpr_Controller->_run('On404', array(0)) /phproad/modules/phpr/classes/phpr_response.php 64
4 Phpr_Response->open404(()) /phproad/modules/phpr/classes/phpr_response.php 37
3 Phpr_Response->open('/category/forklift-hire') /phproad/system/phproad.php 31
2 include('/var/www/vhosts/nationaltoolhireshops.co.uk/httpdocs/phproad/system/phproad.php') /boot.php 114
1 require_once('/var/www/vhosts/nationaltoolhireshops.co.uk/httpdocs/boot.php') /index.php 3