Page 1 of 1

tmp_cache_location + home.pl + cache error

Posted: Wed May 06, 2020 2:42 pm
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.

Re: tmp_cache_location + home.pl + cache error

Posted: Wed May 06, 2020 3:55 pm
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.

Re: tmp_cache_location + home.pl + cache error

Posted: Wed May 06, 2020 4:05 pm
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

Re: tmp_cache_location + home.pl + cache error

Posted: Wed May 06, 2020 4:14 pm
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...

Re: tmp_cache_location + home.pl + cache error

Posted: Wed May 06, 2020 4:27 pm
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!