tmp_cache_location + home.pl + cache error

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
User avatar
Cyc
Forum Members
Forum Members
Posts: 91
Joined: Wed Nov 18, 2015 11:54 pm

tmp_cache_location + home.pl + cache error

Post by Cyc »

I try to move website of my client to home.pl hosting (one of the largest hosting provider) and folder tmp is blocked, so I changed:

Code: Select all

$config['tmp_cache_location'] = $config['root_path'].'/templates/cache';
$config['tmp_templates_c_location'] = $config['root_path'].'/templates/templates_c';
So now I have few bugs:
1. In front I have:

Code: Select all

The following directories must be writable by the web server:
tmp/cache
tmp/templates_c

Please correct by executing:
chmod 777 tmp/cache
chmod 777 tmp/templates_c
or the equivalent for your platform before continuing.
2. In backend, when I try edit content page:

Code: Select all


Warning: PHP Startup: failed to open stream: No such file or directory in /modules/MicroTiny/lib/class.microtiny_utils.php on line 115

Fatal error: Uncaught CmsFileSystemException: Problem writing data to //tmp/cache/mt_e31547a1da5578a393dc5f68db6cbda8.js in /modules/MicroTiny/lib/class.microtiny_utils.php:116 Stack trace: #0 /modules/MicroTiny/lib/class.microtiny_utils.php(102): microtiny_utils::_save_static_config('//tmp/cache/mt_...', false, NULL, NULL, 'pl') #1 /modules/MicroTiny/MicroTiny.module.php(43): microtiny_utils::WYSIWYGGenerateHeader(NULL, NULL) #2 /admin/footer.php(88): MicroTiny->WYSIWYGGenerateHeader() #3 /admin/moduleinterface.php(104): include_once('/admin/footer.p...') #4 {main} thrown in /modules/MicroTiny/lib/class.microtiny_utils.php on line 116
3. When I try clear cache:

Code: Select all

Fatal error: Uncaught UnexpectedValueException: PHP Startup: failed to open dir: No such file or directory in /lib/classes/class.CmsApp.php:505 Stack trace: #0 /lib/classes/class.CmsApp.php(505): RecursiveDirectoryIterator->__construct('/templates/cach...') #1 /admin/systemmaintenance.php(159): CmsApp->clear_cached_files(0) #2 {main} thrown in /lib/classes/class.CmsApp.php on line 505
Path is correct because CMS created few files in templates folder.

PLS Help me.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1973
Joined: Mon Jan 29, 2007 4:47 pm

Re: tmp_cache_location + home.pl + cache error

Post by Jo Morg »

Replace those config entries with these:

Code: Select all

$config['tmp_cache_location'] = __DIR__ . '/temp/cache';
$config['tmp_templates_c_location'] = __DIR__ . '/temp/templates_c';
$config['public_cache_location'] = $config['tmp_cache_location'];
$config['public_cache_url'] = './temp/cache';
 
That should solve it.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
Cyc
Forum Members
Forum Members
Posts: 91
Joined: Wed Nov 18, 2015 11:54 pm

Re: tmp_cache_location + home.pl + cache error

Post by Cyc »

Thx for reply, unfortunately your solution doesn't work. I have still all errors, for example error from cache cleaning:
Fatal error: Uncaught UnexpectedValueException: PHP Startup: failed to open dir: No such file or directory in /lib/classes/class.CmsApp.php:505 Stack trace: #0 /lib/classes/class.CmsApp.php(505): RecursiveDirectoryIterator->__construct('//temp/cache') #1 /admin/systemmaintenance.php(159): CmsApp->clear_cached_files(0) #2 {main} thrown in /lib/classes/class.CmsApp.php on line 505
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1973
Joined: Mon Jan 29, 2007 4:47 pm

Re: tmp_cache_location + home.pl + cache error

Post by Jo Morg »

That's something different I'm afraid... I have tested that very solution on a 2.2.14 install of CMSMS with a few modules and all works fine here. Can't reproduce the error.
In any case please always post your system info. It may be a PHP version mismatch or something similar... but at this point I can only guess...
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
Cyc
Forum Members
Forum Members
Posts: 91
Joined: Wed Nov 18, 2015 11:54 pm

Re: tmp_cache_location + home.pl + cache error

Post by Cyc »

Jo Morg wrote:That's something different I'm afraid... I have tested that very solution on a 2.2.14 install of CMSMS with a few modules and all works fine here. Can't reproduce the error.
In any case please always post your system info. It may be a PHP version mismatch or something similar... but at this point I can only guess...
Your comment gave me a thought, why I have folder "templates_c" in FTP and why folder "cache: doesn't appear. I created "cache" folder and gave 777 permission. That resolved my problem. THX!
Locked

Return to “CMSMS Core”